Merge branch 'master' into iso15693-improvements
This commit is contained in:
commit
42eafc5e93
10 files changed
+27
-14
No files matched your search
+10
-4
@@ -2767,13 +2767,19 @@ static int print_modulation(lf_modulation_t b) {
|
||||
|
||||
static int try_detect_modulation(void) {
|
||||
|
||||
lf_modulation_t tests[6];
|
||||
#define LF_NUM_OF_TESTS 6
|
||||
|
||||
lf_modulation_t tests[LF_NUM_OF_TESTS];
|
||||
for (int i=0; i< ARRAYLEN(tests); i++) {
|
||||
memset(&tests[i], 0, sizeof(lf_modulation_t));
|
||||
}
|
||||
|
||||
int clk = 0, firstClockEdge = 0;
|
||||
uint8_t hits = 0, ans = 0;
|
||||
uint8_t fc1 = 0, fc2 = 0;
|
||||
uint8_t hits = 0, fc1 = 0, fc2 = 0;
|
||||
bool st = false;
|
||||
|
||||
ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, &firstClockEdge);
|
||||
|
||||
uint8_t ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, &firstClockEdge);
|
||||
|
||||
if (ans && ((fc1 == 10 && fc2 == 8) || (fc1 == 8 && fc2 == 5))) {
|
||||
|
||||
|
||||
@@ -1080,7 +1080,7 @@ static int CmdHF15ELoad(const char *Cmd) {
|
||||
|
||||
int tosend = MIN(chuncksize, bytes_read);
|
||||
if (hf15EmlSetMem(data + offset, tosend, offset) != PM3_SUCCESS) {
|
||||
PrintAndLogEx(FAILED, "Can't set emulator memory at offest: %zu / 0x%zx", offset);
|
||||
PrintAndLogEx(FAILED, "Can't set emulator memory at offest: %zu / 0x%zx", offset, offset);
|
||||
free(data);
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
@@ -664,14 +664,15 @@ static int CmdHFiClassSniff(const char *Cmd) {
|
||||
PrintAndLogEx(INFO, "Sniff with jam of iCLASS e-purse updates...");
|
||||
}
|
||||
|
||||
const uint8_t update_epurse_sequence[2] = {0x87, 0x02};
|
||||
|
||||
struct {
|
||||
uint8_t jam_search_len;
|
||||
uint8_t jam_search_string[2];
|
||||
} PACKED payload;
|
||||
|
||||
memset(&payload, 0, sizeof(payload));
|
||||
|
||||
if (jam_epurse_update) {
|
||||
const uint8_t update_epurse_sequence[2] = {0x87, 0x02};
|
||||
payload.jam_search_len = sizeof(update_epurse_sequence);
|
||||
memcpy(payload.jam_search_string, update_epurse_sequence, sizeof(payload.jam_search_string));
|
||||
}
|
||||
|
||||
@@ -4027,6 +4027,9 @@ int CmdHF14MfuNDEFRead(const char *Cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
// The following read will read in blocks of 16 bytes.
|
||||
// ensure maxsize is rounded up to a multiple of 16
|
||||
maxsize = maxsize + (16 - (maxsize % 16));
|
||||
// allocate mem
|
||||
uint8_t *records = calloc(maxsize, sizeof(uint8_t));
|
||||
if (records == NULL) {
|
||||
|
||||
@@ -81,6 +81,7 @@ static int sendTry(uint8_t format_idx, wiegand_card_t *card, uint32_t delay, boo
|
||||
}
|
||||
|
||||
lf_hidsim_t payload;
|
||||
payload.Q5 = false;
|
||||
payload.hi2 = packed.Top;
|
||||
payload.hi = packed.Mid;
|
||||
payload.lo = packed.Bot;
|
||||
@@ -483,7 +484,7 @@ static int CmdHIDBrute(const char *Cmd) {
|
||||
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_lit0("v", "verbose", "verbose logging, show all tries"),
|
||||
arg_lit0("v", "verbose", "verbose output"),
|
||||
arg_str1("w", "wiegand", "<format>", "see " _YELLOW_("`wiegand list`") " for available formats"),
|
||||
arg_u64_0(NULL, "fc", "<dec>", "facility code"),
|
||||
arg_u64_0(NULL, "cn", "<dec>", "card number to start with"),
|
||||
|
||||
Reference in new issue
Block a user