· 7 years ago · Dec 06, 2018, 12:12 AM
1#!/bin/bash
2
3# requires: maybe gawk, adnshost, {pre,mid,stu} wordlists
4# you gotta apt-get install adns-utils
5# mid is the big wordlist
6# pre is prefix stu is stuffix
7# pre needs at least one empty line so it resolves without prefix
8# there is a bug where adns thinks its misconfigured but it halfway works, for those i dunno yet
9# there is with -a to adnshost a ending status line which i parse for 'ok' and print the domain name matched
10# for two it works, apple and lksjfdkjshdsajk where only apple shows up
11# withg pre '' and www
12# and stu com and na
13# and it magically prints apple.com :)
14# when proven it works u / i / we can remove the tee's to speed it up
15# i can make another script and db to make a words out of dictd databases
16
17# in case u wanna try the script as is
18# u need to apt-get install adns-utils
19# and gawk
20# then
21# printf '%s\n' '' www ftp >pre
22# printf '%s\n' apple microsuxx >mid
23# printf '%s\n' com na
24# if u dont know xargs in the script, -n is maximum args and -P simultanous processes
25# thats about all i can say about the script
26# the </dev/stdin resolves in the awk code below
27
28# i wish i could run it on my server, but then they block me again for ddos'ing or so
29# write up my email for the case: *********@gmail.com
30
31{
32 gawk "$( </dev/stdin )" pre mid stu | tee dnsgen |
33 xargs -n 200 -P 100 adnshost +e -a |
34 tee dnslog |
35 gawk '$3 == "ok" { print $6 }' |
36 tee reslog
37} <<'eof'
38#!/usr/bin/awk -f
39
40{
41 if ( FILENAME == "pre" )
42 P[ FNR ] = $0
43 else if ( FILENAME == "stu" )
44 S[ FNR ] = $0
45 else if ( FILENAME == "mid" )
46 M[ FNR ] = $0
47}
48
49END {
50 while ( ++m in M ) {
51 p = 0
52 while ( ++p in P ) {
53 s = 0
54 while ( ++s in S )
55 print ( P[p] ? P[p] "." : "" ) M[m] ( S[s] ? "." S[s] : "" )
56 }
57 }
58}
59eof