mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 17:23:23 +00:00
1 parent
769dc479c2
commit
f8a0ed0096
3 files changed
+11
-5
No files matched your search
@@ -182,7 +182,8 @@ static int pm3_sign_write(uint8_t *signature, uint8_t slen) {
|
||||
|
||||
clearCommandBuffer();
|
||||
PacketResponseNG resp;
|
||||
SendCommandNG(CMD_FLASHMEM_WRITE, (uint8_t *)&payload, (sizeof(payload) - sizeof(payload.data)) + payload.len);
|
||||
uint32_t plen = (sizeof(payload) - sizeof(payload.data)) + payload.len; // header + valid data, not the padded struct
|
||||
SendCommandNG(CMD_FLASHMEM_WRITE, (uint8_t *)&payload, plen);
|
||||
|
||||
if (WaitForResponseTimeout(CMD_FLASHMEM_WRITE, &resp, 2000) == false) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply");
|
||||
@@ -516,7 +517,8 @@ static int CmdFlashMemLoad(const char *Cmd) {
|
||||
.len = bytes_in_packet,
|
||||
};
|
||||
memcpy(payload.data, data + bytes_sent, bytes_in_packet);
|
||||
SendCommandNG(CMD_FLASHMEM_WRITE, (uint8_t *)&payload, (sizeof(payload) - sizeof(payload.data)) + payload.len);
|
||||
uint32_t plen = (sizeof(payload) - sizeof(payload.data)) + payload.len;
|
||||
SendCommandNG(CMD_FLASHMEM_WRITE, (uint8_t *)&payload, plen);
|
||||
|
||||
bytes_remaining -= bytes_in_packet;
|
||||
bytes_sent += bytes_in_packet;
|
||||
|
||||
@@ -3396,7 +3396,9 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
||||
} else {
|
||||
|
||||
uint32_t maxkeys = (pm3_max_cmd_data_size() - sizeof(mf_chkkeys_fast_t)) / 6;
|
||||
if (maxkeys > 255) maxkeys = 255;
|
||||
if (maxkeys > 255) {
|
||||
maxkeys = 255;
|
||||
}
|
||||
uint32_t chunksize = key_cnt > maxkeys ? maxkeys : key_cnt;
|
||||
bool firstChunk = true, lastChunk = false;
|
||||
|
||||
@@ -4048,7 +4050,9 @@ static int CmdHF14AMfChk_fast(const char *Cmd) {
|
||||
}
|
||||
|
||||
uint32_t maxkeys = (pm3_max_cmd_data_size() - sizeof(mf_chkkeys_fast_t)) / 6;
|
||||
if (maxkeys > 255) maxkeys = 255;
|
||||
if (maxkeys > 255) {
|
||||
maxkeys = 255;
|
||||
}
|
||||
uint32_t chunksize = (keycnt > maxkeys) ? maxkeys : keycnt;
|
||||
bool firstChunk = true, lastChunk = false;
|
||||
|
||||
|
||||
@@ -1336,7 +1336,7 @@ static int CmdSmartBruteforceSFI(const char *Cmd) {
|
||||
|
||||
int hexlen = 0;
|
||||
uint8_t cmddata[PM3_CMD_DATA_SIZE];
|
||||
int res = param_gethex_to_eol(caid, 0, cmddata, (int)(pm3_max_cmd_data_size() - sizeof(smart_card_raw_t)), &hexlen);
|
||||
int res = param_gethex_to_eol(caid, 0, cmddata, sizeof(cmddata), &hexlen);
|
||||
if (res) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user