- Sleeping Sheep Hackers… - http://sleepingsheephackers.org -
Overview script for multiple nmap scans
Dieser Eintrag stammt von matti Am 9.10.2009 @ 13:51 In hacking | Keine Kommentare
#!/usr/local/bin/bash
# script for mass scans to keep track
# vars
HOSTS=`grep ‘Nmap done at’ *.nmap|wc -l | grep -oE ‘[0-9]{1,}’`
PORTS=`cat *.gnmap | grep -o ‘open’ | wc -l | grep -oE ‘[0-9]{1,}’`
HOSTS_NUMBER=`cat *.gnmap | grep open | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’ | wc -l | grep -oE ‘[0-9]{1,}’`
HOST_PROBLEMS=`cat *.nmap | grep ‘Skipping host’ | wc -l | grep -oE ‘[0-9]{1,}’`
NMAPS=`ps -ef | grep nmap | grep vvvv | wc -l | grep -Eo ‘[0-9]{1,}’`
PORTS_CLOSED=`cat *.gnmap | grep -o ‘open’ | wc -l | grep -oE ‘[0-9]{1,}’`
HOSTS_NUMBER_CLOSED=`cat *.gnmap | grep open | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’ | wc -l | grep -oE ‘[0-9]{1,}’`
#output
echo “”
echo “$HOSTS hosts have been scanned and $PORTS open ports discovered”
echo “”
echo “These were discovered on the following hosts: ”
cat *.gnmap | grep open | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’
echo “”
echo “This makes in total $HOSTS_NUMBER hosts”
echo “”
echo “Open ports that were discovered are : ”
cat *.nmap | grep ‘ open ‘ | cut -d ” ” -f 1 | sort -g | uniq
echo “”
echo “”
echo “Also $PORTS_CLOSED closed ports were discovered”
echo “”
echo “These were discovered on the following hosts: ”
cat *.gnmap | grep closed | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’
echo “”
echo “Closed ports that were discovered are : ”
cat *.nmap | grep ‘ closed ‘ | cut -d ” ” -f 1 | sort -g | uniq
echo “”
echo “Problems because of time out on $HOST_PROBLEMS differnt hosts!”
echo “”
echo “At the moment $NMAPS NMAP scans are running”
echo “”
exit 0
Dieser Artikel wurde ausgedruckt ab Sleeping Sheep Hackers…: http://sleepingsheephackers.org
URL zum Artikel: http://sleepingsheephackers.org/2009/10/09/handy-for-bigger-nmap-scans/
Klicken hier zum Drucken.