Mfp commands (#698)

* add write perso from https://github.com/Proxmark/proxmark3/blob/master/client/scripts/mifarePlus.lua
* commit perso from https://github.com/Proxmark/proxmark3/blob/master/client/scripts/mifarePlus.lua#L184
* added errors https://github.com/Proxmark/proxmark3/blob/master/client/scripts/mifarePlus.lua#L91
* fix bug in CLIParamHexToBuf
* added init card command
* auth4 refactoring
* add changelog
This commit is contained in:
Oleg Moiseenko 2018-10-24 19:58:12 +03:00 committed by pwpiwi
commit ae3340a0fb
11 changed files with 529 additions and 115 deletions

View file

@ -156,7 +156,7 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
int ibuf = 0;
uint8_t buf[256] = {0};
int res = CLIParamStrToBuf(argstr, buf, maxdatalen, &ibuf);
int res = CLIParamStrToBuf(argstr, buf, maxdatalen * 2, &ibuf); // *2 because here HEX
if (res || !ibuf)
return res;

View file

@ -17,6 +17,7 @@
#define arg_getsize(a) (sizeof(a) / sizeof(a[0]))
#define arg_get_lit(n)(((struct arg_lit*)argtable[n])->count)
#define arg_get_int_count(n)(((struct arg_int*)argtable[n])->count)
#define arg_get_int(n)(((struct arg_int*)argtable[n])->ival[0])
#define arg_get_str(n)((struct arg_str*)argtable[n])
#define arg_get_str_len(n)(strlen(((struct arg_str*)argtable[n])->sval[0]))