mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
hf mf sim: Be less verbose by default, add option "m" to turn maths back on (Issue #45)
This commit is contained in:
parent
650cd714c4
commit
dfdbfa0702
5 changed files with 52 additions and 32 deletions
|
@ -143,6 +143,7 @@ int usage_hf_14a_sim(void) {
|
|||
// PrintAndLog(" u : 4, 7 or 10 byte UID");
|
||||
PrintAndLog(" u : 4, 7 byte UID");
|
||||
PrintAndLog(" x : (Optional) performs the 'reader attack', nr/ar attack against a legitimate reader");
|
||||
PrintAndLog(" m : (Optional) Show maths used for cracking reader. Useful for debugging.");
|
||||
PrintAndLog("\n sample : hf 14a sim t 1 u 11223344 x");
|
||||
PrintAndLog(" : hf 14a sim t 1 u 11223344");
|
||||
PrintAndLog(" : hf 14a sim t 1 u 11223344556677");
|
||||
|
@ -447,12 +448,18 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
uint8_t uid[10] = {0,0,0,0,0,0,0,0,0,0};
|
||||
int uidlen = 0;
|
||||
bool useUIDfromEML = TRUE;
|
||||
bool showMaths = false;
|
||||
|
||||
while(param_getchar(Cmd, cmdp) != 0x00) {
|
||||
switch(param_getchar(Cmd, cmdp)) {
|
||||
case 'h':
|
||||
case 'H':
|
||||
return usage_hf_14a_sim();
|
||||
case 'm':
|
||||
case 'M':
|
||||
showMaths = true;
|
||||
cmdp++;
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
// Retrieve the tag type
|
||||
|
@ -513,7 +520,7 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
if ( (resp.arg[0] & 0xffff) != CMD_SIMULATE_MIFARE_CARD ) break;
|
||||
|
||||
memcpy( data, resp.d.asBytes, sizeof(data) );
|
||||
readerAttack(data, TRUE);
|
||||
readerAttack(data, TRUE, showMaths);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue