mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
chg: 'lf pyramid clone' - add verification
This commit is contained in:
parent
47724d0a1b
commit
06809babbb
3 changed files with 31 additions and 20 deletions
|
@ -9,21 +9,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
#include "cmdlfpyramid.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "cmdparser.h" // command_t
|
||||
#include "comms.h"
|
||||
#include "ui.h"
|
||||
#include "graph.h"
|
||||
#include "cmddata.h"
|
||||
#include "cmdlf.h"
|
||||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
#include "crc.h"
|
||||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
static int usage_lf_pyramid_clone(void) {
|
||||
|
@ -246,12 +231,13 @@ static int CmdPyramidClone(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, "Preparing to clone Farpointe/Pyramid to T55x7 with Facility Code: %u, Card Number: %u", facilitycode, cardnumber);
|
||||
print_blocks(blocks, 5);
|
||||
|
||||
uint8_t res = 0;
|
||||
PacketResponseNG resp;
|
||||
|
||||
// fast push mode
|
||||
conn.block_after_ACK = true;
|
||||
for (uint8_t i = 0; i < 5; i++) {
|
||||
if (i == 4) {
|
||||
for (int8_t i = 4; i >= 0; i--) {
|
||||
if (i == 0) {
|
||||
// Disable fast mode on last packet
|
||||
conn.block_after_ACK = false;
|
||||
}
|
||||
|
@ -267,7 +253,17 @@ static int CmdPyramidClone(const char *Cmd) {
|
|||
PrintAndLogEx(ERR, "Error occurred, device did not respond during write operation.");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
bool isok = t55xxVerifyWrite(i, 0, false, false, 0, 0, blocks[i]);
|
||||
if ( isok == false) {
|
||||
PrintAndLogEx(WARNING, "Couldn't verify write");
|
||||
res++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( res == 0 )
|
||||
PrintAndLogEx(SUCCESS, "Success writing to tag");
|
||||
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue