Last active
October 6, 2023 11:52
-
-
Save LevitatingBusinessMan/7d3e32fdf66e5bf8b02692e5a4854b4a to your computer and use it in GitHub Desktop.
Bruteforce subdomains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
argparse n/nameserver= d/domain= w/wordlist= o/output= -- $argv | |
or exit | |
if test -z $_flag_n; or test -z $_flag_d; or test -z $_flag_w | |
echo "Required arguments: nameserver, domain, wordlist" | |
echo "You can find the nameserver with nslookup and querytype=soa" | |
exit | |
end | |
if not test -f $_flag_w | |
echo "File $_flag_w not found" | |
exit | |
end | |
for word in (cat $_flag_w) | |
if nslookup "$word.$_flag_d" $_flag_n >/dev/null | |
echo "$word.$_flag_d" | |
if test -n $_flag_o | |
echo "$word.$_flag_d" >> $_flag_o | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment