mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
chg: downloading of flashmemory to client.
This commit is contained in:
parent
a746699f5f
commit
cc181c3f91
3 changed files with 17 additions and 6 deletions
|
@ -217,6 +217,7 @@ void UsbCommandReceived(UsbCommand *c) {
|
||||||
PrintAndLogEx(NORMAL, "#db# %08x, %08x, %08x", c->arg[0], c->arg[1], c->arg[2]);
|
PrintAndLogEx(NORMAL, "#db# %08x, %08x, %08x", c->arg[0], c->arg[1], c->arg[2]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CMD_DOWNLOADED_FLASHMEM:
|
||||||
case CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K:
|
case CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K:
|
||||||
case CMD_DOWNLOADED_EML_BIGBUF: {
|
case CMD_DOWNLOADED_EML_BIGBUF: {
|
||||||
// sample_buf is a array pointer, located in data.c
|
// sample_buf is a array pointer, located in data.c
|
||||||
|
|
|
@ -17,17 +17,19 @@
|
||||||
|
|
||||||
uint8_t* sample_buf;
|
uint8_t* sample_buf;
|
||||||
|
|
||||||
void GetFromBigBuf(uint8_t *dest, int bytes, int start_index) {
|
// this triggers a download sequence from device, its received inside cmdmain.c UsbCommandReceived()
|
||||||
|
void GetFromBigBuf(uint8_t *dest, uint32_t len, uint32_t start_index) {
|
||||||
|
// global
|
||||||
sample_buf = dest;
|
sample_buf = dest;
|
||||||
UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {start_index, bytes, 0}};
|
UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {start_index, len, 0}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
}
|
}
|
||||||
// this will download the EMULATOR memory part from device,
|
// this will download the EMULATOR memory part from device,
|
||||||
// inside the BigBuf EML zon.
|
// inside the BigBuf EML zon.
|
||||||
bool GetEMLFromBigBuf(uint8_t *dest, uint32_t bytes, uint32_t start_index) {
|
bool GetEMLFromBigBuf(uint8_t *dest, uint32_t len, uint32_t start_index) {
|
||||||
sample_buf = dest;
|
sample_buf = dest;
|
||||||
UsbCommand c = {CMD_DOWNLOAD_EML_BIGBUF, {start_index, bytes, 0}};
|
UsbCommand c = {CMD_DOWNLOAD_EML_BIGBUF, {start_index, len, 0}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
|
||||||
|
@ -40,3 +42,10 @@ bool GetEMLFromBigBuf(uint8_t *dest, uint32_t bytes, uint32_t start_index) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Download data from flashmem, rdv40
|
||||||
|
void GetFromFlashMen(uint8_t *dest, uint32_t len, uint32_t start_index) {
|
||||||
|
sample_buf = dest;
|
||||||
|
UsbCommand c = {CMD_DOWNLOAND_FLASH_MEM, {start_index, len, 0}};
|
||||||
|
clearCommandBuffer();
|
||||||
|
SendCommand(&c);
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#define FILE_PATH_SIZE 1000
|
#define FILE_PATH_SIZE 1000
|
||||||
|
|
||||||
extern uint8_t* sample_buf;
|
extern uint8_t* sample_buf;
|
||||||
extern void GetFromBigBuf(uint8_t *dest, int bytes, int start_index);
|
extern void GetFromBigBuf(uint8_t *dest, uint32_t len, uint32_t start_index);
|
||||||
extern bool GetEMLFromBigBuf(uint8_t *dest, uint32_t bytes, uint32_t start_index);
|
extern bool GetEMLFromBigBuf(uint8_t *dest, uint32_t len, uint32_t start_index);
|
||||||
|
extern void GetFromFlashMen(uint8_t *dest, uint32_t len, uint32_t start_index);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue