Skip to content

Instantly share code, notes, and snippets.

@zeropwn
Last active June 21, 2019 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeropwn/6de2c225d5bba79409438c074c53751f to your computer and use it in GitHub Desktop.
Save zeropwn/6de2c225d5bba79409438c074c53751f to your computer and use it in GitHub Desktop.
Resolve all hosts returned by spyse.
#!/bin/bash
# requires
# https://github.com/zeropwn/spyse.py
DOMAINS_LOC=/tmp/subdomains.txt
spyse -target $1 -param domain --sub > $DOMAINS_LOC;
domains=`cat $DOMAINS_LOC | sed '1,12d'`
for d in $domains;
do
getent hosts $d | awk '{print $1}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment