mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
more [-Wmissing-field-initializers]
This commit is contained in:
parent
0ab6de64d4
commit
919cfb5841
11 changed files with 23 additions and 23 deletions
|
@ -90,7 +90,7 @@ int CmdHFSearch(const char *Cmd) {
|
||||||
int CmdHFTune(const char *Cmd) {
|
int CmdHFTune(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
PrintAndLogEx(SUCCESS, "Measuring HF antenna, press button to exit");
|
PrintAndLogEx(SUCCESS, "Measuring HF antenna, press button to exit");
|
||||||
UsbCommand c = {CMD_MEASURE_ANTENNA_TUNING_HF};
|
UsbCommand c = {CMD_MEASURE_ANTENNA_TUNING_HF, {0, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -233,7 +233,7 @@ int CmdHFFelicaSimLite(const char *Cmd) {
|
||||||
if (!uid)
|
if (!uid)
|
||||||
return usage_hf_felica_simlite();
|
return usage_hf_felica_simlite();
|
||||||
|
|
||||||
UsbCommand c = {CMD_FELICA_LITE_SIM, {uid, 0, 0} };
|
UsbCommand c = {CMD_FELICA_LITE_SIM, {uid, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -280,7 +280,7 @@ int CmdHFiClassList(const char *Cmd) {
|
||||||
int CmdHFiClassSniff(const char *Cmd) {
|
int CmdHFiClassSniff(const char *Cmd) {
|
||||||
char cmdp = tolower(param_getchar(Cmd, 0));
|
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||||
if (cmdp == 'h') return usage_hf_iclass_sniff();
|
if (cmdp == 'h') return usage_hf_iclass_sniff();
|
||||||
UsbCommand c = {CMD_SNIFF_ICLASS};
|
UsbCommand c = {CMD_SNIFF_ICLASS, {0, 0, 0}, {{0}}};
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ int CmdHFiClassSim(const char *Cmd) {
|
||||||
PrintAndLogEx(INFO, "Starting iCLASS sim 2 attack (elite mode)");
|
PrintAndLogEx(INFO, "Starting iCLASS sim 2 attack (elite mode)");
|
||||||
PrintAndLogEx(INFO, "press keyboard to cancel");
|
PrintAndLogEx(INFO, "press keyboard to cancel");
|
||||||
UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}};
|
UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}};
|
||||||
UsbCommand resp = {0};
|
UsbCommand resp;
|
||||||
memcpy(c.d.asBytes, csns, 8 * NUM_CSNS);
|
memcpy(c.d.asBytes, csns, 8 * NUM_CSNS);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
@ -433,7 +433,7 @@ int CmdHFiClassSim(const char *Cmd) {
|
||||||
PrintAndLogEx(INFO, "Starting iCLASS sim 4 attack (elite mode, reader in key roll mode)");
|
PrintAndLogEx(INFO, "Starting iCLASS sim 4 attack (elite mode, reader in key roll mode)");
|
||||||
PrintAndLogEx(INFO, "press keyboard to cancel");
|
PrintAndLogEx(INFO, "press keyboard to cancel");
|
||||||
UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}};
|
UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}};
|
||||||
UsbCommand resp = {0};
|
UsbCommand resp;
|
||||||
memcpy(c.d.asBytes, csns, 8 * NUM_CSNS);
|
memcpy(c.d.asBytes, csns, 8 * NUM_CSNS);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
|
|
@ -117,7 +117,7 @@ int CmdHF14ADesRb(const char *Cmd) {
|
||||||
int CmdHF14ADesInfo(const char *Cmd) {
|
int CmdHF14ADesInfo(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
|
|
||||||
UsbCommand c = {CMD_MIFARE_DESFIRE_INFO};
|
UsbCommand c = {CMD_MIFARE_DESFIRE_INFO, {0, 0, 0}, {{0}}};
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ void GetKeySettings(uint8_t *aid) {
|
||||||
const char *str = messStr;
|
const char *str = messStr;
|
||||||
uint8_t isOK = 0;
|
uint8_t isOK = 0;
|
||||||
uint32_t options;
|
uint32_t options;
|
||||||
UsbCommand c = {CMD_MIFARE_DESFIRE};
|
UsbCommand c = {CMD_MIFARE_DESFIRE, {0, 0, 0}, {{0}}};
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
|
|
||||||
//memset(messStr, 0x00, 512);
|
//memset(messStr, 0x00, 512);
|
||||||
|
|
|
@ -2387,7 +2387,7 @@ int CmdHF14AMfucSetPwd(const char *Cmd) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
UsbCommand c = {CMD_MIFAREUC_SETPWD};
|
UsbCommand c = {CMD_MIFAREUC_SETPWD, {0, 0, 0}, {{0}}};
|
||||||
memcpy(c.d.asBytes, pwd, 16);
|
memcpy(c.d.asBytes, pwd, 16);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
@ -2412,7 +2412,7 @@ int CmdHF14AMfucSetPwd(const char *Cmd) {
|
||||||
//
|
//
|
||||||
int CmdHF14AMfucSetUid(const char *Cmd) {
|
int CmdHF14AMfucSetUid(const char *Cmd) {
|
||||||
|
|
||||||
UsbCommand c = {CMD_MIFAREU_READBL};
|
UsbCommand c = {CMD_MIFAREU_READBL, {0, 0, 0}, {{0}}};
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
uint8_t uid[7] = {0x00};
|
uint8_t uid[7] = {0x00};
|
||||||
char cmdp = tolower(param_getchar(Cmd, 0));
|
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||||
|
|
|
@ -308,7 +308,7 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdDetectReader(const char *Cmd) {
|
int CmdDetectReader(const char *Cmd) {
|
||||||
UsbCommand c = {CMD_LISTEN_READER_FIELD};
|
UsbCommand c = {CMD_LISTEN_READER_FIELD, {0, 0, 0}, {{0}}};
|
||||||
// 'l' means LF - 125/134 kHz
|
// 'l' means LF - 125/134 kHz
|
||||||
if (*Cmd == 'l') {
|
if (*Cmd == 'l') {
|
||||||
c.arg[0] = 1;
|
c.arg[0] = 1;
|
||||||
|
@ -326,7 +326,7 @@ int CmdDetectReader(const char *Cmd) {
|
||||||
// ## FPGA Control
|
// ## FPGA Control
|
||||||
int CmdFPGAOff(const char *Cmd) {
|
int CmdFPGAOff(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
UsbCommand c = {CMD_FPGA_MAJOR_MODE_OFF};
|
UsbCommand c = {CMD_FPGA_MAJOR_MODE_OFF, {0, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -336,7 +336,7 @@ int CmdFPGAOff(const char *Cmd) {
|
||||||
int CmdLCD(const char *Cmd) {
|
int CmdLCD(const char *Cmd) {
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
UsbCommand c = {CMD_LCD};
|
UsbCommand c = {CMD_LCD, {0, 0, 0}, {{0}}};
|
||||||
sscanf(Cmd, "%x %d", &i, &j);
|
sscanf(Cmd, "%x %d", &i, &j);
|
||||||
while (j--) {
|
while (j--) {
|
||||||
c.arg[0] = i & 0x1ff;
|
c.arg[0] = i & 0x1ff;
|
||||||
|
@ -363,7 +363,7 @@ int CmdReadmem(const char *Cmd) {
|
||||||
|
|
||||||
int CmdReset(const char *Cmd) {
|
int CmdReset(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
UsbCommand c = {CMD_HARDWARE_RESET};
|
UsbCommand c = {CMD_HARDWARE_RESET, {0, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -394,7 +394,7 @@ int CmdSetMux(const char *Cmd) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
UsbCommand c = {CMD_SET_ADC_MUX};
|
UsbCommand c = {CMD_SET_ADC_MUX, {0, 0, 0}, {{0}}};
|
||||||
|
|
||||||
if (strcmp(Cmd, "lopkd") == 0) c.arg[0] = 0;
|
if (strcmp(Cmd, "lopkd") == 0) c.arg[0] = 0;
|
||||||
else if (strcmp(Cmd, "loraw") == 0) c.arg[0] = 1;
|
else if (strcmp(Cmd, "loraw") == 0) c.arg[0] = 1;
|
||||||
|
@ -455,7 +455,7 @@ int CmdVersion(const char *Cmd) {
|
||||||
int CmdStatus(const char *Cmd) {
|
int CmdStatus(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
UsbCommand c = {CMD_STATUS};
|
UsbCommand c = {CMD_STATUS, {0, 0, 0}, {{0}}};
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
if (!WaitForResponseTimeout(CMD_ACK, &c, 1900))
|
if (!WaitForResponseTimeout(CMD_ACK, &c, 1900))
|
||||||
PrintAndLogEx(NORMAL, "Status command failed. USB Speed Test timed out");
|
PrintAndLogEx(NORMAL, "Status command failed. USB Speed Test timed out");
|
||||||
|
@ -466,7 +466,7 @@ int CmdPing(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
UsbCommand c = {CMD_PING};
|
UsbCommand c = {CMD_PING, {0, 0, 0}, {{0}}};
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
||||||
PrintAndLogEx(NORMAL, "Ping successful");
|
PrintAndLogEx(NORMAL, "Ping successful");
|
||||||
|
|
|
@ -325,7 +325,7 @@ int CmdLFSetConfig(const char *Cmd) {
|
||||||
|
|
||||||
sample_config config = { decimation, bps, averaging, divisor, trigger_threshold };
|
sample_config config = { decimation, bps, averaging, divisor, trigger_threshold };
|
||||||
|
|
||||||
UsbCommand c = {CMD_SET_LF_SAMPLING_CONFIG, {0, 0, 0} };
|
UsbCommand c = {CMD_SET_LF_SAMPLING_CONFIG, {0, 0, 0}, {{0}}};
|
||||||
memcpy(c.d.asBytes, &config, sizeof(sample_config));
|
memcpy(c.d.asBytes, &config, sizeof(sample_config));
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
|
|
@ -265,7 +265,7 @@ int CmdHIDClone(const char *Cmd) {
|
||||||
|
|
||||||
uint32_t hi2 = 0, hi = 0, lo = 0;
|
uint32_t hi2 = 0, hi = 0, lo = 0;
|
||||||
uint32_t n = 0, i = 0;
|
uint32_t n = 0, i = 0;
|
||||||
UsbCommand c = {CMD_HID_CLONE_TAG};
|
UsbCommand c = {CMD_HID_CLONE_TAG, {0, 0, 0}, {{0}}};
|
||||||
|
|
||||||
uint8_t ctmp = param_getchar(Cmd, 0);
|
uint8_t ctmp = param_getchar(Cmd, 0);
|
||||||
if (strlen(Cmd) == 0 || ctmp == 'H' || ctmp == 'h') return usage_lf_hid_clone();
|
if (strlen(Cmd) == 0 || ctmp == 'H' || ctmp == 'h') return usage_lf_hid_clone();
|
||||||
|
|
|
@ -454,7 +454,7 @@ static void printHitagConfiguration(uint8_t config) {
|
||||||
|
|
||||||
static bool getHitagUid(uint32_t *uid) {
|
static bool getHitagUid(uint32_t *uid) {
|
||||||
|
|
||||||
UsbCommand c = {CMD_READER_HITAG, {RHT2F_UID_ONLY, 0, 0} };
|
UsbCommand c = {CMD_READER_HITAG, {RHT2F_UID_ONLY, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
|
@ -509,7 +509,7 @@ int CmdLFHitagInfo(const char *Cmd) {
|
||||||
//
|
//
|
||||||
int CmdLFHitagReader(const char *Cmd) {
|
int CmdLFHitagReader(const char *Cmd) {
|
||||||
|
|
||||||
UsbCommand c = {CMD_READER_HITAG, {0, 0, 0} };
|
UsbCommand c = {CMD_READER_HITAG, {0, 0, 0}, {{0}}};
|
||||||
hitag_data *htd = (hitag_data *)c.d.asBytes;
|
hitag_data *htd = (hitag_data *)c.d.asBytes;
|
||||||
hitag_function htf = param_get32ex(Cmd, 0, 0, 10);
|
hitag_function htf = param_get32ex(Cmd, 0, 0, 10);
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ int CmdLFPCF7931Write(const char *Cmd) {
|
||||||
PrintAndLogEx(NORMAL, " pos: %d", bytepos);
|
PrintAndLogEx(NORMAL, " pos: %d", bytepos);
|
||||||
PrintAndLogEx(NORMAL, " data: 0x%02X", data);
|
PrintAndLogEx(NORMAL, " data: 0x%02X", data);
|
||||||
|
|
||||||
UsbCommand c = {CMD_PCF7931_WRITE, { block, bytepos, data} };
|
UsbCommand c = {CMD_PCF7931_WRITE, { block, bytepos, data}, {{0}}};
|
||||||
memcpy(c.d.asDwords, configPcf.Pwd, sizeof(configPcf.Pwd));
|
memcpy(c.d.asDwords, configPcf.Pwd, sizeof(configPcf.Pwd));
|
||||||
c.d.asDwords[7] = (configPcf.OffsetWidth + 128);
|
c.d.asDwords[7] = (configPcf.OffsetWidth + 128);
|
||||||
c.d.asDwords[8] = (configPcf.OffsetPosition + 128);
|
c.d.asDwords[8] = (configPcf.OffsetPosition + 128);
|
||||||
|
|
|
@ -1844,7 +1844,7 @@ int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
uint64_t t1 = msclock();
|
uint64_t t1 = msclock();
|
||||||
|
|
||||||
if (cmdp == 'm') {
|
if (cmdp == 'm') {
|
||||||
UsbCommand c = {CMD_T55XX_CHKPWDS, {0, 0, 0} };
|
UsbCommand c = {CMD_T55XX_CHKPWDS, {0, 0, 0}, {{0}}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
|
@ -2287,7 +2287,7 @@ int CmdT55xxSetDeviceConfig(const char *Cmd) {
|
||||||
|
|
||||||
t55xx_config conf = { startgap * 8, writegap * 8, write0 * 8, write1 * 8, readgap * 8 };
|
t55xx_config conf = { startgap * 8, writegap * 8, write0 * 8, write1 * 8, readgap * 8 };
|
||||||
|
|
||||||
UsbCommand c = {CMD_SET_LF_T55XX_CONFIG, {shall_persist, 0, 0} };
|
UsbCommand c = {CMD_SET_LF_T55XX_CONFIG, {shall_persist, 0, 0}, {{0}}};
|
||||||
memcpy(c.d.asBytes, &conf, sizeof(t55xx_config));
|
memcpy(c.d.asBytes, &conf, sizeof(t55xx_config));
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue