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

Add 'full-file' support, getopt, verbose. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add 'full-file' support, getopt, verbose. #7

wants to merge 1 commit into from

Conversation

mino98
Copy link

@mino98 mino98 commented Feb 26, 2018

Adding minimal getopt support:

$ ./passpwn -h
Usage: ./passpwn [-h] [-v] [-f]

If you enable "full-file mode" (-f) then every line of the file is checked against passpwn, rather than just the first line. This is obviously much slower but potentially helpful for messy people like myself, if you have credentials in line other than the first of each file.

Verbose (-v) prints the current file and string, for debugging.

Works on MacOS and should work on Linux, but I haven't tried it and OSX getopt is different from linux's.

Copy link
Owner

@antonlindstrom antonlindstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I am however unable to get the changes to test locally since the source is removed.

# Help:
function usage() {
echo "Usage: $0 [-h] [-v] [-f]" 1>&2;
exit 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about returning 0 here? I looked at vim -h, gdb -h and cmake -h and they seem to all return 0 for help.


# Help:
function usage() {
echo "Usage: $0 [-h] [-v] [-f]" 1>&2;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding some description of what the flag do? For example that I should not run -v in front of someone else since they might see all of my passwords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants