mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-23 23:55:15 +08:00
chg: 'lf keri clone' - now works
This commit is contained in:
parent
d1c22d0800
commit
fe9c65b65f
1 changed files with 18 additions and 11 deletions
|
@ -129,10 +129,15 @@ int CmdKeriRead(const char *Cmd) {
|
||||||
|
|
||||||
int CmdKeriClone(const char *Cmd) {
|
int CmdKeriClone(const char *Cmd) {
|
||||||
|
|
||||||
PrintAndLogEx(ERR, "TO BE DONE - Cloning KERI is not implemented yet");
|
|
||||||
/*
|
|
||||||
uint32_t internalid = 0;
|
uint32_t internalid = 0;
|
||||||
uint32_t blocks[3] = {T55x7_MODULATION_PSK1 | T55x7_PSKCF_RF_2 | 2 << T55x7_MAXBLOCK_SHIFT | T55x7_BITRATE_RF_16, 0, 0};
|
uint32_t blocks[3] = {
|
||||||
|
T55x7_X_MODE | T55x7_MODULATION_PSK1 | T55x7_PSKCF_RF_2 | 2 << T55x7_MAXBLOCK_SHIFT | T55x7_BITRATE_RF_128,
|
||||||
|
0,
|
||||||
|
0};
|
||||||
|
|
||||||
|
// safe key
|
||||||
|
blocks[0] |= 6 << 28;
|
||||||
|
|
||||||
char cmdp = tolower(param_getchar(Cmd, 0));
|
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||||
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_lf_keri_clone();
|
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_lf_keri_clone();
|
||||||
|
@ -141,18 +146,20 @@ int CmdKeriClone(const char *Cmd) {
|
||||||
|
|
||||||
//Q5
|
//Q5
|
||||||
if (tolower(param_getchar(Cmd, 1)) == 'q')
|
if (tolower(param_getchar(Cmd, 1)) == 'q')
|
||||||
blocks[0] = T5555_MODULATION_PSK1 | T5555_SET_BITRATE(16) | T5555_PSK_RF_2 | 2 << T5555_MAXBLOCK_SHIFT;
|
blocks[0] = T5555_MODULATION_PSK1 | T5555_SET_BITRATE(128) | T5555_PSK_RF_2 | 2 << T5555_MAXBLOCK_SHIFT;
|
||||||
|
|
||||||
|
|
||||||
// MSB is ONE, and 3 LSB is ONE
|
// MSB is ONE
|
||||||
uint32_t pre =
|
internalid |= 0x80000000;
|
||||||
internalid &= 0x80000003;
|
|
||||||
|
// 3 LSB is ONE
|
||||||
|
uint64_t data = ((uint64_t)internalid << 3 ) + 7;
|
||||||
|
|
||||||
//
|
//
|
||||||
blocks[1] = internalid & 0x
|
blocks[1] = data >> 32;
|
||||||
blocks[2] = bytebits_to_byte(bits + 32, 32);
|
blocks[2] = data & 0xFFFFFFFF;
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, "Preparing to clone KERI to T55x7 with Internal Id: %u", id);
|
PrintAndLogEx(NORMAL, "Preparing to clone KERI to T55x7 with Internal Id: %u", internalid);
|
||||||
print_blocks(blocks, 3);
|
print_blocks(blocks, 3);
|
||||||
|
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
|
@ -168,7 +175,7 @@ int CmdKeriClone(const char *Cmd) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue