reworking magic cheneese card wipe (#365)

Implement hf mf cwipe. Remove wipe parameter from hf mf csetuid.
This commit is contained in:
Oleg Moiseenko 2017-09-22 20:40:42 +03:00 committed by pwpiwi
parent 08b7cd17a5
commit 3a05a1e739
11 changed files with 382 additions and 119 deletions

View file

@ -322,7 +322,7 @@ char * printBits(size_t const size, void const * const ptr)
// -------------------------------------------------------------------------
// line - param line
// bg, en - symbol numbers in param line of beginning an ending parameter
// bg, en - symbol numbers in param line of beginning and ending parameter
// paramnum - param number (from 0)
// -------------------------------------------------------------------------
int param_getptr(const char *line, int *bg, int *en, int paramnum)
@ -355,6 +355,15 @@ int param_getptr(const char *line, int *bg, int *en, int paramnum)
}
int param_getlength(const char *line, int paramnum)
{
int bg, en;
if (param_getptr(line, &bg, &en, paramnum)) return 0;
return en - bg + 1;
}
char param_getchar(const char *line, int paramnum)
{
int bg, en;