Advertisement
MurdockBleak

AS_AUTO_SCAN

Oct 14th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.59 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Description:
  4. # This script scans all the IP's in a Particular ASN and stores scanned target files in a directory eg: scanned_ASXXXX
  5. # Use it at your own Risk "Jai Sambho"
  6.  
  7. if [ -z "$1" ];then
  8.     echo "usage: ./masscan.sh ASXXXX"
  9. elif [ "$#" -gt 1 ];then
  10.     echo "usage: ./masscan.sh ASXXXX"
  11.     exit
  12. fi
  13. curl https://api.hackertarget.com/aslookup/?q=$1 > IP_LIST.txt
  14. x=0
  15. while read line;do
  16.     x=$(($x+1))
  17.     masscan -p 443 -sS -Pn -n --randomize-hosts -v $line > file.txt
  18.     mv file.txt file${x}.txt
  19. done < IP_LIST.txt
  20.  
  21. mkdir scanned_${1}
  22. mv file* scanned_${1}/
  23. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement