mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Merge branch 'master' into iso15693-improvements
This commit is contained in:
commit
42eafc5e93
10 changed files with 27 additions and 14 deletions
|
@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file.
|
||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
- Changed spiffs write/apped to send in 8192 chucks to ensure its eraised (@mwalker)
|
- Fixed buffer overflow in mfu ndef decode (@mwalker)
|
||||||
|
- Changed spiffs write/append to send in 8192 chunks to ensure its eraised (@mwalker)
|
||||||
- Fixed spiffs dump to ensure to fails correctly if no big_buff was allocated (@mwalker)
|
- Fixed spiffs dump to ensure to fails correctly if no big_buff was allocated (@mwalker)
|
||||||
- Change Client Makefile to respect global flags (@blshkv)
|
- Change Client Makefile to respect global flags (@blshkv)
|
||||||
- Change Makefile, honors global CC values (@blshkv)
|
- Change Makefile, honors global CC values (@blshkv)
|
||||||
|
|
|
@ -200,7 +200,7 @@ The official PM3-GUI from Gaucho will not work. Not to mention is quite old and
|
||||||
|
|
||||||
## Official channels
|
## Official channels
|
||||||
Where do you find the community?
|
Where do you find the community?
|
||||||
- [RFID Hacking community discord server](https://discord.gg/xEvexdKmpF)
|
- [RFID Hacking community discord server](https://discord.gg/iceman)
|
||||||
- [Proxmark3 IRC channel](https://web.libera.chat/?channels=#proxmark3)
|
- [Proxmark3 IRC channel](https://web.libera.chat/?channels=#proxmark3)
|
||||||
- [Proxmark3 sub reddit](https://www.reddit.com/r/proxmark3/)
|
- [Proxmark3 sub reddit](https://www.reddit.com/r/proxmark3/)
|
||||||
- [Proxmark3 forum](http://www.proxmark.org/forum/index.php)
|
- [Proxmark3 forum](http://www.proxmark.org/forum/index.php)
|
||||||
|
|
|
@ -111,7 +111,7 @@ void RunMod(void) {
|
||||||
//Indicate which card will be simulated
|
//Indicate which card will be simulated
|
||||||
LED(i, 0);
|
LED(i, 0);
|
||||||
|
|
||||||
//Try to load dump form flash
|
//Try to load dump from flash
|
||||||
sprintf(cur_dump_file, HF_LEGICSIM_DUMPFILE_SIM, i);
|
sprintf(cur_dump_file, HF_LEGICSIM_DUMPFILE_SIM, i);
|
||||||
Dbprintf(_YELLOW_("[Slot: %d] Try to load dump file: %s"), i, cur_dump_file);
|
Dbprintf(_YELLOW_("[Slot: %d] Try to load dump file: %s"), i, cur_dump_file);
|
||||||
if (!fill_eml_from_file(cur_dump_file)) {
|
if (!fill_eml_from_file(cur_dump_file)) {
|
||||||
|
|
|
@ -75,6 +75,7 @@ void RunMod(void) {
|
||||||
} else if (state == STATE_EMUL) {
|
} else if (state == STATE_EMUL) {
|
||||||
Iso15693InitTag();
|
Iso15693InitTag();
|
||||||
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state.");
|
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state.");
|
||||||
|
// default block size is 4
|
||||||
SimTagIso15693(card.uid, 4);
|
SimTagIso15693(card.uid, 4);
|
||||||
|
|
||||||
state = STATE_READ;
|
state = STATE_READ;
|
||||||
|
|
|
@ -887,9 +887,9 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!have_uid) { // need a full select cycle to get the uid first
|
if (have_uid == false) { // need a full select cycle to get the uid first
|
||||||
iso14a_card_select_t card_info;
|
iso14a_card_select_t card_info;
|
||||||
if (!iso14443a_select_card(uid, &card_info, &cuid, true, 0, true)) {
|
if (iso14443a_select_card(uid, &card_info, &cuid, true, 0, true) == 0) {
|
||||||
if (g_dbglevel >= DBG_ERROR) Dbprintf("AcquireEncryptedNonces: Can't select card (ALL)");
|
if (g_dbglevel >= DBG_ERROR) Dbprintf("AcquireEncryptedNonces: Can't select card (ALL)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags,
|
||||||
}
|
}
|
||||||
have_uid = true;
|
have_uid = true;
|
||||||
} else { // no need for anticollision. We can directly select the card
|
} else { // no need for anticollision. We can directly select the card
|
||||||
if (!iso14443a_fast_select_card(uid, cascade_levels)) {
|
if (iso14443a_fast_select_card(uid, cascade_levels) == 0) {
|
||||||
if (g_dbglevel >= DBG_ERROR) Dbprintf("AcquireEncryptedNonces: Can't select card (UID)");
|
if (g_dbglevel >= DBG_ERROR) Dbprintf("AcquireEncryptedNonces: Can't select card (UID)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2767,13 +2767,19 @@ static int print_modulation(lf_modulation_t b) {
|
||||||
|
|
||||||
static int try_detect_modulation(void) {
|
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;
|
int clk = 0, firstClockEdge = 0;
|
||||||
uint8_t hits = 0, ans = 0;
|
uint8_t hits = 0, fc1 = 0, fc2 = 0;
|
||||||
uint8_t fc1 = 0, fc2 = 0;
|
|
||||||
bool st = false;
|
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))) {
|
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);
|
int tosend = MIN(chuncksize, bytes_read);
|
||||||
if (hf15EmlSetMem(data + offset, tosend, offset) != PM3_SUCCESS) {
|
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);
|
free(data);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -664,14 +664,15 @@ static int CmdHFiClassSniff(const char *Cmd) {
|
||||||
PrintAndLogEx(INFO, "Sniff with jam of iCLASS e-purse updates...");
|
PrintAndLogEx(INFO, "Sniff with jam of iCLASS e-purse updates...");
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint8_t update_epurse_sequence[2] = {0x87, 0x02};
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint8_t jam_search_len;
|
uint8_t jam_search_len;
|
||||||
uint8_t jam_search_string[2];
|
uint8_t jam_search_string[2];
|
||||||
} PACKED payload;
|
} PACKED payload;
|
||||||
|
|
||||||
|
memset(&payload, 0, sizeof(payload));
|
||||||
|
|
||||||
if (jam_epurse_update) {
|
if (jam_epurse_update) {
|
||||||
|
const uint8_t update_epurse_sequence[2] = {0x87, 0x02};
|
||||||
payload.jam_search_len = sizeof(update_epurse_sequence);
|
payload.jam_search_len = sizeof(update_epurse_sequence);
|
||||||
memcpy(payload.jam_search_string, update_epurse_sequence, sizeof(payload.jam_search_string));
|
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
|
// allocate mem
|
||||||
uint8_t *records = calloc(maxsize, sizeof(uint8_t));
|
uint8_t *records = calloc(maxsize, sizeof(uint8_t));
|
||||||
if (records == NULL) {
|
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;
|
lf_hidsim_t payload;
|
||||||
|
payload.Q5 = false;
|
||||||
payload.hi2 = packed.Top;
|
payload.hi2 = packed.Top;
|
||||||
payload.hi = packed.Mid;
|
payload.hi = packed.Mid;
|
||||||
payload.lo = packed.Bot;
|
payload.lo = packed.Bot;
|
||||||
|
@ -483,7 +484,7 @@ static int CmdHIDBrute(const char *Cmd) {
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
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_str1("w", "wiegand", "<format>", "see " _YELLOW_("`wiegand list`") " for available formats"),
|
||||||
arg_u64_0(NULL, "fc", "<dec>", "facility code"),
|
arg_u64_0(NULL, "fc", "<dec>", "facility code"),
|
||||||
arg_u64_0(NULL, "cn", "<dec>", "card number to start with"),
|
arg_u64_0(NULL, "cn", "<dec>", "card number to start with"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue