Skip to content

Instantly share code, notes, and snippets.

@insi2304
Created December 31, 2019 09:38
Show Gist options
  • Save insi2304/827643bd4874ee496e7676e1eff69dfa to your computer and use it in GitHub Desktop.
Save insi2304/827643bd4874ee496e7676e1eff69dfa to your computer and use it in GitHub Desktop.
Run Masscan on subdomains
#!/bin/bash
for i in `cat domains`;
do
j=`dig +short $i | tail -n1`
echo $j >> domain_ip.txt
done
for k in `cat domain_ip.txt | sort -u`
do
echo "Trying scanning hostname" $k
if [ -z "$k" ]
then
echo "No ip present corresponding to hostname" $k
else
echo "scanning" $k;
masscan -p1-65535 --banners $k --max-rate 1000 | tee -a domain_port_scan;
fi
done
@0xFLTNT
Copy link

0xFLTNT commented Apr 21, 2022

Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment