mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
MERGED: @holimans changes
MERGED: @piwi changes MERGED: @marshmellows changes. I'm not even gonna try write up all that stuff.. ADD: changed some commands inside the "Hf 14a sim" on deviceside. ADD: @mobeius "two nonce" version for mfkey32. It is also inside the "hf 14a sim" with the "x" parameter.
This commit is contained in:
parent
f445df401e
commit
7838f4beba
37 changed files with 488 additions and 105 deletions
|
@ -16,7 +16,7 @@
|
|||
#include "cmdparser.h" // CmdsParse, CmdsHelp
|
||||
#include "cmdlfawid.h" // AWID function declarations
|
||||
#include "lfdemod.h" // parityTest
|
||||
|
||||
#include "cmdmain.h"
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
|
||||
|
@ -69,6 +69,7 @@ int CmdAWIDDemodFSK(const char *Cmd)
|
|||
if (Cmd[0]=='h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();
|
||||
UsbCommand c={CMD_AWID_DEMOD_FSK};
|
||||
c.arg[0]=findone;
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
}
|
||||
|
@ -167,17 +168,18 @@ int CmdAWIDSim(const char *Cmd)
|
|||
c.arg[2] = 96; // Bitstream length: 96-bits == 12 bytes
|
||||
for (i=0; i < 96; i++)
|
||||
c.d.asBytes[i] = (BS[i/8] & (1<<(7-(i%8))))?1:0;
|
||||
SendCommand(&c);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CmdAWIDClone(const char *Cmd)
|
||||
{
|
||||
clearCommandBuffer();
|
||||
uint32_t fc=0,cn=0,blocks[4] = {0x00107060, 0, 0, 0x11111111}, i=0;
|
||||
uint8_t BitStream[12];
|
||||
uint8_t *BS=BitStream;
|
||||
UsbCommand c;
|
||||
|
||||
UsbCommand c, resp;
|
||||
|
||||
if (sscanf(Cmd, "%u %u", &fc, &cn ) != 2) {
|
||||
return usage_lf_awid_clone();
|
||||
|
@ -206,6 +208,11 @@ int CmdAWIDClone(const char *Cmd)
|
|||
c.arg[1] = i;
|
||||
c.arg[2] = 0;
|
||||
SendCommand(&c);
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
|
||||
PrintAndLog("Error occurred, device did not respond during write operation.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue