mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
style, same name everywhere in project
This commit is contained in:
parent
300d274d43
commit
d19c9a262a
5 changed files with 26 additions and 13 deletions
|
@ -1758,8 +1758,8 @@ int getSamplesEx(uint32_t start, uint32_t end, bool verbose, bool ignore_lf_conf
|
|||
if (verbose)
|
||||
PrintAndLogEx(INFO, "Reading " _YELLOW_("%u") " bytes from device memory", n);
|
||||
|
||||
PacketResponseNG response;
|
||||
if (!GetFromDevice(BIG_BUF, got, n, start, NULL, 0, &response, 10000, true)) {
|
||||
PacketResponseNG resp;
|
||||
if (!GetFromDevice(BIG_BUF, got, n, start, NULL, 0, &resp, 10000, true)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
@ -1769,8 +1769,8 @@ int getSamplesEx(uint32_t start, uint32_t end, bool verbose, bool ignore_lf_conf
|
|||
uint8_t bits_per_sample = 8;
|
||||
|
||||
// Old devices without this feature would send 0 at arg[0]
|
||||
if (response.oldarg[0] > 0 && (ignore_lf_config == false)) {
|
||||
sample_config *sc = (sample_config *) response.data.asBytes;
|
||||
if (resp.oldarg[0] > 0 && (ignore_lf_config == false)) {
|
||||
sample_config *sc = (sample_config *) resp.data.asBytes;
|
||||
if (verbose) PrintAndLogEx(INFO, "Samples @ " _YELLOW_("%d") " bits/smpl, decimation 1:%d ", sc->bits_per_sample, sc->decimation);
|
||||
bits_per_sample = sc->bits_per_sample;
|
||||
}
|
||||
|
|
|
@ -426,8 +426,8 @@ int handle_hf_plot(void) {
|
|||
|
||||
uint8_t buf[FPGA_TRACE_SIZE] = {0};
|
||||
|
||||
PacketResponseNG response;
|
||||
if (GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true) == false) {
|
||||
PacketResponseNG resp;
|
||||
if (GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &resp, 4000, true) == false) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
|
|
@ -1562,7 +1562,20 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
|
|||
float brute_force_depth;
|
||||
|
||||
FILE *fnonces = NULL;
|
||||
PacketResponseNG resp;
|
||||
|
||||
// init to ZERO
|
||||
PacketResponseNG resp = {
|
||||
.cmd = 0,
|
||||
.length = 0,
|
||||
.magic = 0,
|
||||
.status = 0,
|
||||
.crc = 0,
|
||||
.ng = false,
|
||||
};
|
||||
resp.oldarg[0] = 0;
|
||||
resp.oldarg[1] = 0;
|
||||
resp.oldarg[2] = 0;
|
||||
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);
|
||||
|
||||
uint8_t write_buf[9];
|
||||
char progress_text[80];
|
||||
|
|
|
@ -72,14 +72,14 @@ static int CmdLFHitagList(const char *Cmd) {
|
|||
}
|
||||
|
||||
// Query for the actual size of the trace
|
||||
PacketResponseNG response;
|
||||
if (!GetFromDevice(BIG_BUF, got, PM3_CMD_DATA_SIZE, 0, NULL, 0, &response, 2500, false)) {
|
||||
PacketResponseNG resp;
|
||||
if (!GetFromDevice(BIG_BUF, got, PM3_CMD_DATA_SIZE, 0, NULL, 0, &resp, 2500, false)) {
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
free(got);
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
uint16_t traceLen = response.arg[2];
|
||||
uint16_t traceLen = resp.arg[2];
|
||||
if (traceLen > PM3_CMD_DATA_SIZE) {
|
||||
uint8_t *p = realloc(got, traceLen);
|
||||
if (p == NULL) {
|
||||
|
|
|
@ -986,15 +986,15 @@ static int download_trace(void) {
|
|||
PrintAndLogEx(INFO, "downloading tracelog data from device");
|
||||
|
||||
// Query for the size of the trace, downloading PM3_CMD_DATA_SIZE
|
||||
PacketResponseNG response;
|
||||
if (!GetFromDevice(BIG_BUF, gs_trace, PM3_CMD_DATA_SIZE, 0, NULL, 0, &response, 4000, true)) {
|
||||
PacketResponseNG resp;
|
||||
if (!GetFromDevice(BIG_BUF, gs_trace, PM3_CMD_DATA_SIZE, 0, NULL, 0, &resp, 4000, true)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
free(gs_trace);
|
||||
gs_trace = NULL;
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
gs_traceLen = response.oldarg[2];
|
||||
gs_traceLen = resp.oldarg[2];
|
||||
|
||||
// if tracelog buffer was larger and we need to download more.
|
||||
if (gs_traceLen > PM3_CMD_DATA_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue