mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Semi-Automated SendCommand -> SendCommandOLD
This commit is contained in:
parent
128d90ca3c
commit
c4766b2649
41 changed files with 543 additions and 957 deletions
|
@ -233,13 +233,10 @@ static int CmdPyramidClone(const char *Cmd) {
|
|||
print_blocks(blocks, 5);
|
||||
|
||||
PacketResponseNG resp;
|
||||
PacketCommandOLD c = {CMD_T55XX_WRITE_BLOCK, {0, 0, 0}, {{0}}};
|
||||
|
||||
for (uint8_t i = 0; i < 5; ++i) {
|
||||
c.arg[0] = blocks[i];
|
||||
c.arg[1] = i;
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
SendCommandOLD(CMD_T55XX_WRITE_BLOCK, blocks[i], i, 0, NULL, 0);
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)) {
|
||||
PrintAndLogEx(WARNING, "Error occurred, device did not respond during write operation.");
|
||||
return -1;
|
||||
|
@ -256,14 +253,10 @@ static int CmdPyramidSim(const char *Cmd) {
|
|||
uint32_t facilitycode = 0, cardnumber = 0, fc = 0, cn = 0;
|
||||
|
||||
uint8_t bs[128];
|
||||
size_t size = sizeof(bs);
|
||||
memset(bs, 0x00, size);
|
||||
memset(bs, 0x00, sizeof(bs));
|
||||
|
||||
// Pyramid uses: fcHigh: 10, fcLow: 8, clk: 50, invert: 0
|
||||
uint8_t clk = 50, invert = 0, high = 10, low = 8;
|
||||
uint16_t arg1, arg2;
|
||||
arg1 = high << 8 | low;
|
||||
arg2 = invert << 8 | clk;
|
||||
|
||||
if (sscanf(Cmd, "%u %u", &fc, &cn) != 2) return usage_lf_pyramid_sim();
|
||||
|
||||
|
@ -277,10 +270,8 @@ static int CmdPyramidSim(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(SUCCESS, "Simulating Farpointe/Pyramid - Facility Code: %u, CardNumber: %u", facilitycode, cardnumber);
|
||||
|
||||
PacketCommandOLD c = {CMD_FSK_SIM_TAG, {arg1, arg2, size}, {{0}}};
|
||||
memcpy(c.d.asBytes, bs, size);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
SendCommandOLD(CMD_FSK_SIM_TAG, high << 8 | low, invert << 8 | clk, sizeof(bs), bs, sizeof(bs));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue