-
Notifications
You must be signed in to change notification settings - Fork 915
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
Discussion on Options and Parameters in Proxmark Commands #467
Comments
I welcome this. LUA script also uses "-" + letter prefix I just one way, not three. And in a standard way so its easy for new contributors to add. Not to worry or spend time in "how to parse commandline in proxmark". |
i'm for it. ( though i will have to learn how getopt() works.. ;) ) |
yeah, getopt() crash-course needed for me too. |
Actually, all blogs, forum posts will be upset but I still want it to be unified. |
...well... piwi... will you start the unifying with one getopt? The loclass, reveng has their own, we would need to have one. |
So, it needs to use and this? |
getopt_long, whats the difference? if we have [-h] , which could be confusing between being in the shell vs inside pm3 client.. What you think? Agreed, hex input both kinds, with/ wo spaces, would increase usability. |
I don't know what the difference between getopt libs. Ill look.
|
I have time to investigate at first part of next week. If someone can do earlier, please, do) |
I'm guessing,
|
https://github.com/skeeto/optparse need too look - maybe there is cool parser on github) |
skeeto makes some good points in his README.md (https://github.com/skeeto/optparse/blob/master/README.me) which discourage the usage of the original +1 for cofyc/argparse |
OK, |
and all of them dont have initialization from |
Yes, a function to split the line into options and parameters is required in all cases. It would be an additipnal task of this function to distinguish a hex parameter with spaces from multiple parameters. |
If we have guys, what are you thinking about parameters: |
I am for the standard: - or -- for options. = or nothing for parameters. Nothing for additional arguments. HF 14a raw -c -t 10 60 01 HF 14a raw : command |
and |
I look at https://github.com/argtable/argtable3
I will try to implement one command |
Looks great. Has a good tutorial as well: http://www.argtable.org/tutorial/ I propose to start with |
OK, i will try and show PR) lets look... |
OK. lets think, test and merge. especially needs to check if |
can be closed |
@iceman1001 wrote in #465:
This is indeed a topic I wanted to discuss ages ago. The proxmark way of handling parameters and options is neither consistent nor common practice. We are all used to options like
-h
and an alternative long version like--help
for any Unix or Windows program. Why don't we adopt this common practice and start usinggetopt()
(or its sistergetopt_long()
) as inclient\loclass\main.c
andclient\reveng\cli.c
? This is not only common practice but also avoids those ugly command line parsing we have in many places.The text was updated successfully, but these errors were encountered: