diff --git a/smbclientng/__main__.py b/smbclientng/__main__.py index 5277051..9915849 100644 --- a/smbclientng/__main__.py +++ b/smbclientng/__main__.py @@ -46,9 +46,17 @@ def parseArgs(): parser.print_help() sys.exit(1) - args = parser.parse_args() + options = parser.parse_args() - return args + if options.auth_username is not None and (options.auth_password is None and options.no_pass == False and options.auth_hashes is None): + print("[+] No password or hashes provided and --no-pass is '%s'" % options.no_pass) + from getpass import getpass + if options.auth_domain is not None: + options.auth_password = getpass(" | Provide a password for '%s\\%s':" % (options.auth_domain, options.auth_username)) + else: + options.auth_password = getpass(" | Provide a password for '%s':" % options.auth_username) + + return options def main():