Skip to content

Commit

Permalink
Use full path of user-specified directories
Browse files Browse the repository at this point in the history
  • Loading branch information
jgor committed Jan 29, 2018
1 parent 3569dad commit 9c7387a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion indexers/google.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run(options):
dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)


if "phantomjs_dir" in options: if "phantomjs_dir" in options:
phantomjs_path = os.path.join(os.path.normcase(options["phantomjs_dir"]), "bin") phantomjs_path = os.path.join(os.path.abspath(options["phantomjs_dir"]), "bin")
elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "phantomjs", "bin")): elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "phantomjs", "bin")):
phantomjs_path = os.path.join(dorkbot_dir, "tools", "phantomjs", "bin") phantomjs_path = os.path.join(dorkbot_dir, "tools", "phantomjs", "bin")
else: else:
Expand Down
4 changes: 2 additions & 2 deletions scanners/arachni.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def run(options, url):
dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)


if "arachni_dir" in options: if "arachni_dir" in options:
arachni_path = os.path.join(os.path.normcase(options["arachni_dir"]), "bin") arachni_path = os.path.join(os.path.abspath(options["arachni_dir"]), "bin")
elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "arachni", "bin")): elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "arachni", "bin")):
arachni_path = os.path.join(dorkbot_dir, "tools", "arachni", "bin") arachni_path = os.path.join(dorkbot_dir, "tools", "arachni", "bin")
else: else:
Expand All @@ -20,7 +20,7 @@ def run(options, url):
arachni_reporter_cmd = os.path.join(arachni_path, "arachni_reporter") arachni_reporter_cmd = os.path.join(arachni_path, "arachni_reporter")


if "report_dir" in options: if "report_dir" in options:
report_dir = os.path.normcase(options["report_dir"]) report_dir = os.path.abspath(options["report_dir"])
else: else:
report_dir = os.path.join(dorkbot_dir, "reports") report_dir = os.path.join(dorkbot_dir, "reports")


Expand Down
4 changes: 2 additions & 2 deletions scanners/wapiti.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def run(options, url):
dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) dorkbot_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)


if "wapiti_dir" in options: if "wapiti_dir" in options:
wapiti_path = os.path.join(os.path.normcase(options["wapiti_dir"]), "bin") wapiti_path = os.path.join(os.path.abspath(options["wapiti_dir"]), "bin")
elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "wapiti", "bin")): elif os.path.isdir(os.path.join(dorkbot_dir, "tools", "wapiti", "bin")):
wapiti_path = os.path.join(dorkbot_dir, "tools", "wapiti", "bin") wapiti_path = os.path.join(dorkbot_dir, "tools", "wapiti", "bin")
else: else:
Expand All @@ -19,7 +19,7 @@ def run(options, url):
wapiti_cmd = os.path.join(wapiti_path, "wapiti") wapiti_cmd = os.path.join(wapiti_path, "wapiti")


if "report_dir" in options: if "report_dir" in options:
report_dir = os.path.normcase(options["report_dir"]) report_dir = os.path.abspath(options["report_dir"])
else: else:
report_dir = os.path.join(dorkbot_dir, "reports") report_dir = os.path.join(dorkbot_dir, "reports")


Expand Down

0 comments on commit 9c7387a

Please sign in to comment.