mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
chg: trying to decode block 7 when decrypted..
This commit is contained in:
parent
5ef1f001dd
commit
aa0054e6b9
1 changed files with 16 additions and 4 deletions
|
@ -28,7 +28,8 @@
|
||||||
#include "loclass/elite_crack.h"
|
#include "loclass/elite_crack.h"
|
||||||
#include "fileutils.h"
|
#include "fileutils.h"
|
||||||
#include "protocols.h"
|
#include "protocols.h"
|
||||||
|
#include "wiegand_formats.h"
|
||||||
|
#include "wiegand_formatutils.h"
|
||||||
|
|
||||||
#define NUM_CSNS 9
|
#define NUM_CSNS 9
|
||||||
#define ICLASS_KEYS_MAX 8
|
#define ICLASS_KEYS_MAX 8
|
||||||
|
@ -918,6 +919,17 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
|
||||||
saveFileJSON(fptr, jsfIclass, decrypted, decryptedlen);
|
saveFileJSON(fptr, jsfIclass, decrypted, decryptedlen);
|
||||||
|
|
||||||
printIclassDumpContents(decrypted, 1, (decryptedlen / 8), decryptedlen);
|
printIclassDumpContents(decrypted, 1, (decryptedlen / 8), decryptedlen);
|
||||||
|
|
||||||
|
uint32_t top = 0, mid, bot;
|
||||||
|
mid = bytes_to_num(decrypted + (8*7), 4);
|
||||||
|
bot = bytes_to_num(decrypted + (8*7) + 4, 4);
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO, "");
|
||||||
|
PrintAndLogEx(INFO, "block 7 - Wiegand decode");
|
||||||
|
wiegand_message_t packed = initialize_message_object(top, mid, bot);
|
||||||
|
HIDTryUnpack(&packed, true);
|
||||||
|
PrintAndLogEx(INFO, "-----------------------------------------------------------------");
|
||||||
|
|
||||||
free(decrypted);
|
free(decrypted);
|
||||||
free(fptr);
|
free(fptr);
|
||||||
}
|
}
|
||||||
|
@ -1871,13 +1883,13 @@ void printIclassDumpContents(uint8_t *iclass_dump, uint8_t startblock, uint8_t e
|
||||||
//PrintAndLog ("startblock: %d, endblock: %d, filesize: %d, maxmemcount: %d, filemaxblock: %d",startblock, endblock,filesize, maxmemcount, filemaxblock);
|
//PrintAndLog ("startblock: %d, endblock: %d, filesize: %d, maxmemcount: %d, filemaxblock: %d",startblock, endblock,filesize, maxmemcount, filemaxblock);
|
||||||
|
|
||||||
int i = startblock;
|
int i = startblock;
|
||||||
PrintAndLogEx(NORMAL, "------+--+-------------------------+");
|
PrintAndLogEx(INFO, "------+--+-------------------------+----------");
|
||||||
while (i <= endblock) {
|
while (i <= endblock) {
|
||||||
uint8_t *blk = iclass_dump + (i * 8);
|
uint8_t *blk = iclass_dump + (i * 8);
|
||||||
PrintAndLogEx(NORMAL, " |%02X| %s", i, sprint_hex_ascii(blk, 8));
|
PrintAndLogEx(INFO, " |%02X| %s", i, sprint_hex_ascii(blk, 8));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
PrintAndLogEx(NORMAL, "------+--+-------------------------+");
|
PrintAndLogEx(INFO, "------+--+-------------------------+----------");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdHFiClassReadTagFile(const char *Cmd) {
|
static int CmdHFiClassReadTagFile(const char *Cmd) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue