Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Description:
- # This script scans all the IP's in a Particular ASN and stores scanned target files in a directory eg: scanned_ASXXXX
- # Use it at your own Risk "Jai Sambho"
- if [ -z "$1" ];then
- echo "usage: ./masscan.sh ASXXXX"
- elif [ "$#" -gt 1 ];then
- echo "usage: ./masscan.sh ASXXXX"
- exit
- fi
- curl https://api.hackertarget.com/aslookup/?q=$1 > IP_LIST.txt
- x=0
- while read line;do
- x=$(($x+1))
- masscan -p 443 -sS -Pn -n --randomize-hosts -v $line > file.txt
- mv file.txt file${x}.txt
- done < IP_LIST.txt
- mkdir scanned_${1}
- mv file* scanned_${1}/
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement