diff --git a/nxc/cli.py b/nxc/cli.py index 1628d362d..e340af902 100755 --- a/nxc/cli.py +++ b/nxc/cli.py @@ -140,7 +140,7 @@ def gen_cli_args(): default=[], help="password(s) or file(s) containing passwords", ) - std_parser.add_argument("--ignore-decoding-errors", action="store_true", help="Ignore non UTF-8 characters when decoding the password file") + std_parser.add_argument("--ignore-pw-decoding", action="store_true", help="Ignore non UTF-8 characters when decoding the password file") std_parser.add_argument("-k", "--kerberos", action="store_true", help="Use Kerberos authentication") std_parser.add_argument("--no-bruteforce", action="store_true", help="No spray when using file for username and password (user1 => password1, user2 => password2") std_parser.add_argument("--continue-on-success", action="store_true", help="continues authentication attempts even after successes") diff --git a/nxc/connection.py b/nxc/connection.py index 02299763b..2322f8959 100755 --- a/nxc/connection.py +++ b/nxc/connection.py @@ -310,13 +310,13 @@ def parse_credentials(self): for password in self.args.password: if isfile(password): try: - with open(password, 'r', errors = ('ignore' if self.args.ignore_decoding_errors else 'strict')) as password_file: + with open(password, 'r', errors = ('ignore' if self.args.ignore_pw_decoding else 'strict')) as password_file: for line in password_file: secret.append(line.strip()) cred_type.append('plaintext') except UnicodeDecodeError as e: self.logger.error(f"{type(e).__name__}: Could not decode password file. Make sure the file only contains UTF-8 characters.") - self.logger.error("You can ignore non UTF-8 characters with the option '--ignore-decoding-errors'") + self.logger.error("You can ignore non UTF-8 characters with the option '--ignore-pw-decoding'") exit(1) else: