Skip to content

Commit

Permalink
fix: add nargs for password arg to prompt if only -p is passed in
Browse files Browse the repository at this point in the history
Fixes #30 which was added for #27
  • Loading branch information
Marshall-Hallenbeck authored Jun 14, 2024
1 parent 7166880 commit 155e3ad
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 155e3ad

Please sign in to comment.