This commit is contained in:
mwalker33 2019-10-10 21:29:57 +11:00
commit 1181a9792e
3 changed files with 22 additions and 4 deletions

View file

@ -4,6 +4,8 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
## [unreleased][unreleased]
- Added lf t55xx detected to try without password first (@mwalker33)
- Display high bit for detected Kastle HIDs to allow `lf hid clone [id]` to work properly (@swg0101)
- Add option `-n` to scripts pm3* (@doegox)
- Add `wiegand list/encode/decode` - wiegand format manipulation. Adapted to fit here. (@grauerfuchs)
- Added support for color text on windows 10 (@mwalker33)
- Added `s` <samples to skip> to `lf config` / `lf sniff` to skip samples when sniffing based on same option in Proxmark/proxmark3 by @marshmellow42. (@mwalker33)

View file

@ -237,7 +237,6 @@ static void init_bitflip_bitarrays(void) {
uint8_t line = 0;
#endif
z_stream compressed_stream;
char state_files_path[strlen(get_my_executable_directory()) + strlen(STATE_FILES_DIRECTORY) + strlen(STATE_FILE_TEMPLATE) + 1];
@ -248,9 +247,11 @@ static void init_bitflip_bitarrays(void) {
for (uint16_t bitflip = 0x001; bitflip < 0x400; bitflip++) {
bitflip_bitarrays[odd_even][bitflip] = NULL;
count_bitflip_bitarrays[odd_even][bitflip] = 1 << 24;
sprintf(state_file_name, STATE_FILE_TEMPLATE, odd_even, bitflip);
strcpy(state_files_path, STATE_FILES_DIRECTORY);
strcat(state_files_path, state_file_name);
char *path;
if (searchFile(&path, RESOURCES_SUBDIR, state_files_path, "", true) != PM3_SUCCESS) {
continue;
@ -1637,15 +1638,18 @@ static inline bool bitflips_match(uint8_t byte, uint32_t state, odd_even_t odd_e
return true;
}
/*
static uint_fast8_t reverse(uint_fast8_t b) {
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
return b;
}
*/
static uint_fast8_t reverse(uint_fast8_t b) {
return (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;
}
static bool all_bitflips_match(uint8_t byte, uint32_t state, odd_even_t odd_even) {
uint32_t masks[2][8] = {
{0x00fffff0, 0x00fffff8, 0x00fffff8, 0x00fffffc, 0x00fffffc, 0x00fffffe, 0x00fffffe, 0x00ffffff},

View file

@ -1866,11 +1866,17 @@ void printT55x7Trace(t55x7_tracedata_t data, uint8_t repeat) {
PrintAndLogEx(NORMAL, "-------------------------------------------------------------");
/*
Trace info.
M1, M2 has the about ATMEL defintion of trace data.
M3 has unique format following industry defacto standard with row/col parity
TRACE - BLOCK O
Bits Definition HEX
1-8 ACL Allocation class (ISO/IEC 15963-1) 0xE0
9-16 MFC Manufacturer ID (ISO/IEC 7816-6) 0x15 Atmel Corporation
17-21 CID 0x1 = Atmel ATA5577M1 0x2 = Atmel ATA5577M2
17-21 CID 0x1 = Atmel ATA5577M1
0x2 = Atmel ATA5577M2
0x3 = Atmel ATA5577M3
22-24 ICR IC revision
25-28 YEAR (BCD encoded) 9 (= 2009)
29-30 QUARTER 1,2,3,4
@ -1880,6 +1886,11 @@ void printT55x7Trace(t55x7_tracedata_t data, uint8_t repeat) {
1-12 LOT ID
13-17 Wafer number
18-32 DW, die number sequential
Startup times (FC)
M1, M2 = 192
M3 = 128
*/
}
@ -2539,6 +2550,7 @@ char *GetModelStrFromCID(uint32_t cid) {
if (cid == 1) snprintf(retStr, sizeof(buf), "ATA5577M1");
if (cid == 2) snprintf(retStr, sizeof(buf), "ATA5577M2");
if (cid == 3) snprintf(retStr, sizeof(buf), "ATA5577M3");
return buf;
}