Skip to content

Commit

Permalink
Merge pull request #32 from Marshall-Hallenbeck/patch-1
Browse files Browse the repository at this point in the history
fix: add nargs for password arg to prompt if only -p is passed in
  • Loading branch information
p0dalirius authored Jun 15, 2024
2 parents 7166880 + 155e3ad commit d5c0c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smbclientng/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def parseArgs():
secret = parser.add_argument_group()
cred = secret.add_mutually_exclusive_group()
cred.add_argument("--no-pass", action="store_true", help="Don't ask for password (useful for -k).")
cred.add_argument("-p", "--password", dest="auth_password", metavar="PASSWORD", action="store", help="Password to authenticate with.")
cred.add_argument("-p", "--password", dest="auth_password", metavar="PASSWORD", action="store", nargs="?", help="Password to authenticate with.")
cred.add_argument("-H", "--hashes", dest="auth_hashes", action="store", metavar="[LMHASH:]NTHASH", help="NT/LM hashes, format is LMhash:NThash.")
cred.add_argument("--aes-key", dest="auth_key", action="store", metavar="hex key", help="AES key to use for Kerberos Authentication (128 or 256 bits).")
secret.add_argument("-k", "--kerberos", dest="use_kerberos", action="store_true", help="Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the command line.")
Expand Down Expand Up @@ -117,4 +117,4 @@ def main():
print("[debug] Exiting the console.")

if __name__ == "__main__":
main()
main()

0 comments on commit d5c0c48

Please sign in to comment.