mirror of https://github.com/OWASP/Nettacker.git
added clean exit for missing wordlists (#1047)
Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
This commit is contained in:
parent
cb1a011c13
commit
f62da6a605
|
|
@ -676,6 +676,12 @@ class ArgParser(ArgumentParser):
|
|||
options.passwords = list(set(open(options.passwords_list).read().split("\n")))
|
||||
except Exception:
|
||||
die_failure(_("error_passwords").format(options.passwords_list))
|
||||
# Check custom wordlist
|
||||
if options.read_from_file:
|
||||
try:
|
||||
open(options.read_from_file).read().split("\n")
|
||||
except Exception:
|
||||
die_failure(_("error_wordlist").format(options.read_from_file))
|
||||
# Check output file
|
||||
try:
|
||||
temp_file = open(options.report_path_filename, "w")
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ error_target: Cannot specify the target(s)
|
|||
error_target_file: "Cannot specify the target(s), unable to open file: {0}"
|
||||
error_username: "Cannot specify the username(s), unable to open file: {0}"
|
||||
error_passwords: "Cannot specify the password(s), unable to open file: {0}"
|
||||
error_wordlist: "Cannot specify the word(s), unable to open file {0}"
|
||||
exclude_scan_method: choose scan method to exclude {0}
|
||||
file_write_error: file "{0}" is not writable!
|
||||
library_not_supported: library [{0}] is not support!
|
||||
|
|
|
|||
Loading…
Reference in New Issue