added clean exit for missing wordlists (#1047)

Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
This commit is contained in:
Achintya Jai 2025-03-18 18:12:37 +05:30 committed by GitHub
parent cb1a011c13
commit f62da6a605
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -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")

View File

@ -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!