From 5372de2b365d2b3cf2d1474df68a49460692c9d9 Mon Sep 17 00:00:00 2001 From: Harmeet Singh Date: Sun, 3 May 2020 12:13:01 -0700 Subject: [PATCH 1/5] Update liveTargetsFinder.py --- liveTargetsFinder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liveTargetsFinder.py b/liveTargetsFinder.py index c7b0789..793acf4 100644 --- a/liveTargetsFinder.py +++ b/liveTargetsFinder.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import json import argparse import subprocess From e4773edafd4afa37e80f7d54f4afd984c80878aa Mon Sep 17 00:00:00 2001 From: Harmeet Singh Date: Sun, 3 May 2020 14:35:24 -0700 Subject: [PATCH 2/5] added mkdir output directory --- liveTargetsFinder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/liveTargetsFinder.py b/liveTargetsFinder.py index 793acf4..c2bad80 100644 --- a/liveTargetsFinder.py +++ b/liveTargetsFinder.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +import os, sys + import json import argparse import subprocess @@ -213,6 +215,8 @@ def main(targetHosts, massdnsPath, masscanPath, resolvers, useNmap, dbOutput): outputPrefix = targetHosts.rsplit('/',1)[-1] outputPrefix = outputPrefix.replace(".txt", "") + os.mkdir('output', 0755 ); + # MassDNS Parsed output files domainOutput = "output/" + outputPrefix + "_domains_alive.txt" From 47c5939b148d25012029f85e05f4a9d46a71e663 Mon Sep 17 00:00:00 2001 From: Harmeet Singh Date: Sun, 3 May 2020 14:47:57 -0700 Subject: [PATCH 3/5] create output directory if it does not exist --- liveTargetsFinder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/liveTargetsFinder.py b/liveTargetsFinder.py index c2bad80..bbfdc37 100644 --- a/liveTargetsFinder.py +++ b/liveTargetsFinder.py @@ -212,7 +212,9 @@ def writeFinalOutput(domainOutput, ipOutput, targetUrlsOutput, dbOutput, nmapOut def main(targetHosts, massdnsPath, masscanPath, resolvers, useNmap, dbOutput): - + if not os.path.exists('output'): + os.makedirs('output') + outputPrefix = targetHosts.rsplit('/',1)[-1] outputPrefix = outputPrefix.replace(".txt", "") os.mkdir('output', 0755 ); From 259580e4adc9c774db4ff513d1cc4f468ae0ec68 Mon Sep 17 00:00:00 2001 From: Harmeet Singh Date: Sun, 3 May 2020 14:50:30 -0700 Subject: [PATCH 4/5] Update liveTargetsFinder.py --- liveTargetsFinder.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/liveTargetsFinder.py b/liveTargetsFinder.py index bbfdc37..f44d76a 100644 --- a/liveTargetsFinder.py +++ b/liveTargetsFinder.py @@ -214,11 +214,8 @@ def writeFinalOutput(domainOutput, ipOutput, targetUrlsOutput, dbOutput, nmapOut def main(targetHosts, massdnsPath, masscanPath, resolvers, useNmap, dbOutput): if not os.path.exists('output'): os.makedirs('output') - outputPrefix = targetHosts.rsplit('/',1)[-1] outputPrefix = outputPrefix.replace(".txt", "") - os.mkdir('output', 0755 ); - # MassDNS Parsed output files domainOutput = "output/" + outputPrefix + "_domains_alive.txt" From 6113790bd7ac9ba043d16bf05fa55c9aa76fc881 Mon Sep 17 00:00:00 2001 From: Harmeet Singh Date: Sun, 3 May 2020 14:51:08 -0700 Subject: [PATCH 5/5] Update liveTargetsFinder.py --- liveTargetsFinder.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/liveTargetsFinder.py b/liveTargetsFinder.py index f44d76a..81a9480 100644 --- a/liveTargetsFinder.py +++ b/liveTargetsFinder.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -import os, sys - +import os import json import argparse import subprocess