aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2012-04-23 13:37:16 +0200
committerEUcancER <root@euer.krebsco.de>2012-04-23 13:51:56 +0200
commit1eba19a8ff3841a450f626b58988ec5b13b81aa4 (patch)
treeddfae4edcf683f896188bca58872c52a90491a71
parent520d94508cfd28f91b3468be84e803e5d439b642 (diff)
remove dnsmap in favor of dnsrecon
-rwxr-xr-xrepos/consolidate_dns/index32
m---------repos/dnsmap0
2 files changed, 18 insertions, 14 deletions
diff --git a/repos/consolidate_dns/index b/repos/consolidate_dns/index
index 6ff51f8..7336f21 100755
--- a/repos/consolidate_dns/index
+++ b/repos/consolidate_dns/index
@@ -5,8 +5,9 @@ import csv
import sys
import tempfile
os.chdir (os.path.dirname (os.path.realpath (sys.argv[0])))
-dnsmap_enabled = False
-DNSMAP = "../dnsmap/dnsmap"
+dnsrecon_enabled = False
+DNSRECON = "../dnsrecon/dnsrecon.py"
+dnsrecon_wordlist="../dnsrecon/namelist.txt"
silent=open("/dev/null","w")
gxfr_enabled = False
GXFR = "../gxfr/gxfr.py"
@@ -16,14 +17,14 @@ domains = {}
try:
DOMAIN=sys.argv[1]
except:
- print "Usage: %s [hostname]"
+ print ("Usage: %s [hostname]")
sys.exit(1)
print("checking for back end")
-if os.path.isfile(DNSMAP) :
- dnsmap_enabled=True
- print (" dnsmap enabled")
+if os.path.isfile(DNSRECON) :
+ dnsrecon_enabled=True
+ print (" dnsrecon enabled")
else:
- print (" dnsmap not available")
+ print (" dnsrecon not available or not supported")
if os.path.isfile(GXFR):
gxfr_enabled=True
print (" gxfr.py enabled")
@@ -36,16 +37,19 @@ else:
print (" bxfr.py not available or not supported")
-if dnsmap_enabled:
- dnsmap_tmp = tempfile.NamedTemporaryFile(delete=False).name
- print ("Starting DNSMAP, this may take some time")
- p = Popen([DNSMAP,DOMAIN,"-c",dnsmap_tmp],stdout=silent,stderr=silent)
+if dnsrecon_enabled:
+ dnsrecon_tmp = tempfile.NamedTemporaryFile(delete=False).name
+ print ("Starting dnsrecon, this may take some time")
+ p = Popen([DNSRECON,"-d",DOMAIN,"--csv",dnsrecon_tmp,'-D',dnsrecon_wordlist,"-t","brt,srv,axfr"],stdout=silent,stderr=silent)
p.wait()
- reader = csv.reader(open(dnsmap_tmp))
+ reader = csv.reader(open(dnsrecon_tmp))
for row in reader:
- domains[row[0]] = row[1:]
+ if row[1] in domains:
+ domains[row[1]] += row[2:]
+ else:
+ domains[row[1]] = row[2:]
print ("...finished with [%d] domains" %reader.line_num)
- os.unlink(dnsmap_tmp)
+ os.unlink(dnsrecon_tmp)
if gxfr_enabled:
gxfr_tmp = tempfile.NamedTemporaryFile(delete=False).name
diff --git a/repos/dnsmap b/repos/dnsmap
deleted file mode 160000
-Subproject 5881f0a9c3b6b4fddfaa635aa80d569dff9fd39