fix: check if ntds attribute exists properly

main
Marshall Hallenbeck 2023-03-22 12:10:00 -04:00
parent 3cdb3cdf0b
commit 2c762989eb
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ def main():
module_server.start()
setattr(protocol_object, 'server', module_server.server)
if (args.ntds and not args.userntds):
if hasattr(args, 'ntds') and args.ntds and not args.userntds:
ans = input(highlight('[!] Dumping the ntds can crash the DC on Windows Server 2019. Use the option --user <user> to dump a specific user safely [Y/n] ', 'red'))
if ans.lower() not in ['y', 'yes', '']:
sys.exit(1)