Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] add nargs for password arg to prompt if only -p is passed in #32

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

Marshall-Hallenbeck
Copy link
Contributor

Fixes #30 which was added for #27

Before:
image

After:
image

@p0dalirius
Copy link
Owner

p0dalirius commented Jun 15, 2024

Hi @Marshall-Hallenbeck,

Thank you for your PR, however I do not understand why you would want that. Right now, there are three cases:

Username and password specified in command line:

smbclientng -u 'Administrator' -p 'Admin123!' --target '10.0.0.201'

Username specified in command line, and ask for password interactive:

Since you have not specified --no-pass you will be prompted for a password

smbclientng -u 'Administrator' --target '10.0.0.201'

Username specified in command line, and no password:

Since you have specified --no-pass you will not be prompted for a password:

smbclientng -u 'Administrator' --no-pass --target '10.0.0.201'

Feel free to correct me if I did not understand why you proposed this fix! I am closing the PR for now but will reopen it if needed.

Best regards,

@p0dalirius p0dalirius closed this Jun 15, 2024
@Marshall-Hallenbeck
Copy link
Contributor Author

Marshall-Hallenbeck commented Jun 15, 2024

This still prompts a user for a password if they include the -p argument, but do not pass in an actual password. It still keeps the previous functionality.

--no-pass seems verbose when you can just... not include the -p argument.

@p0dalirius p0dalirius reopened this Jun 15, 2024
@p0dalirius p0dalirius merged commit d5c0c48 into p0dalirius:main Jun 15, 2024
4 checks passed
@p0dalirius
Copy link
Owner

Thank you!
Merged!

@p0dalirius p0dalirius changed the title fix: add nargs for password arg to prompt if only -p is passed in [bugfix] add nargs for password arg to prompt if only -p is passed in Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants