Revision: 25378
Updated Code
at April 8, 2010 10:35 by blackthorne
Updated Code
#!/usr/bin/env /bin/bash LOG_FILE=$2 TARGET=$1 CSV_FILE="$LOG_FILE.csv" echo "Porto,Serviço" > $CSV_FILE nmap -v -sS $TARGET > $LOG_FILE CUTLINE=`grep -n "PORT" $LOG_FILE | cut -d':' -f1` let CUTLINE=CUTLINE+1 ENDLINE=`grep -nw "^$" $LOG_FILE|tail -n 1|cut -d ':' -f1` let ENDLINE=ENDLINE-1 sed -n "${CUTLINE},${ENDLINE}p" $LOG_FILE|awk '{print $1","$3}' >> $CSV_FILE echo "done"
Revision: 25377
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 29, 2010 09:32 by blackthorne
Initial Code
#!/usr/bin/env /bin/bash LOG_FILE=$2 TARGET=$1 CSV_FILE="$LOG_FILE.csv" echo "Porto,Serviço" > $CSV_FILE nmap -v -sS $TARGET > $LOG_FILE CUTLINE=`grep -n "PORT" $LOG_FILE | cut -d':' -f1` let CUTLINE=CUTLINE+1 ENDLINE=`grep -nw "^$" $LOG_FILE|tail -n 1|cut -d ':' -f1` let ENDLINE=ENDLINE-1 sed -n "${CUTLINE},${ENDLINE}p" $LOG_FILE|awk '{print $1","$3}' >> $CSV_FILE echo "done"
Initial URL
Initial Description
requires nmap ./scanner.sh ip_addr output shall generate a CSV file named output.csv with the results of the port scan
Initial Title
Port Scanner to CSV
Initial Tags
Initial Language
Bash