mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
propagate CmdsParse return value
This commit is contained in:
parent
38fc6e2290
commit
1b6a45ac17
46 changed files with 47 additions and 93 deletions
|
@ -925,6 +925,5 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdAnalyse(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
|
|
@ -2147,7 +2147,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdData(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,7 @@ static command_t CommandTable[] = {
|
|||
|
||||
int CmdHF(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int CmdHelp(const char *Cmd) {
|
||||
|
|
|
@ -1156,8 +1156,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHF14A(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int infoHF14A(bool verbose, bool do_nack_test) {
|
||||
|
|
|
@ -1120,8 +1120,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHF14B(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// get and print all info known about any known 14b tag
|
||||
|
|
|
@ -1293,7 +1293,7 @@ static int CmdHF15Restore(const char *Cmd) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static command_t CommandTable15[] = {
|
||||
static command_t CommandTable[] = {
|
||||
{"help", CmdHF15Help, 1, "This help"},
|
||||
{"demod", CmdHF15Demod, 1, "Demodulate ISO15693 from tag"},
|
||||
{"dump", CmdHF15Dump, 0, "Read all memory pages of an ISO15693 tag, save to file"},
|
||||
|
@ -1320,8 +1320,7 @@ static int CmdHF15Help(const char *Cmd) {
|
|||
|
||||
int CmdHF15(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable15, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// used with 'hf search'
|
||||
|
|
|
@ -178,6 +178,5 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFEPA(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
|
|
@ -562,8 +562,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFFelica(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int readFelicaUid(bool verbose) {
|
||||
|
|
|
@ -906,8 +906,7 @@ static command_t CommandTable[] = {
|
|||
|
||||
int CmdHFFido(const char *Cmd) {
|
||||
(void)WaitForResponseTimeout(CMD_ACK, NULL, 100);
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int CmdHelp(const char *Cmd) {
|
||||
|
|
|
@ -2454,8 +2454,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFiClass(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int readIclass(bool loop, bool verbose) {
|
||||
|
|
|
@ -1311,8 +1311,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFLegic(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int readLegicUid(bool verbose) {
|
||||
|
|
|
@ -3585,7 +3585,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFMF(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -659,7 +659,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
int CmdHFMFDes(const char *Cmd) {
|
||||
// flush
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -241,6 +241,5 @@ static int CmdHelp(const char *Cmd) {
|
|||
int CmdHFMFDesfire(const char *Cmd) {
|
||||
// flush
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
|
|
@ -862,7 +862,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFMFP(const char *Cmd) {
|
||||
(void)WaitForResponseTimeout(CMD_ACK, NULL, 100);
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -2671,7 +2671,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFMFUltra(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -525,8 +525,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdHFTopaz(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int readTopazUid(void) {
|
||||
|
|
|
@ -1007,8 +1007,7 @@ static command_t CommandTable[] = {
|
|||
|
||||
int CmdLF(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int CmdHelp(const char *Cmd) {
|
||||
|
|
|
@ -522,8 +522,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFAWID(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
//refactored by marshmellow
|
||||
|
|
|
@ -118,8 +118,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFCOTAG(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodCOTAG(void) {
|
||||
|
|
|
@ -1495,8 +1495,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFEM4X(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodEM410x(void) {
|
||||
|
|
|
@ -344,8 +344,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFFdx(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// Ask/Biphase Demod then try to locate an ISO 11784/85 ID
|
||||
|
|
|
@ -241,8 +241,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFGuard(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// by marshmellow
|
||||
|
|
|
@ -624,8 +624,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFHID(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodHID(void) {
|
||||
|
|
|
@ -720,8 +720,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFHitag(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int readHitagUid(void) {
|
||||
|
|
|
@ -480,8 +480,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFINDALA(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// redesigned by marshmellow adjusted from existing decode functions
|
||||
|
|
|
@ -282,8 +282,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFIO(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodIOProx(void) {
|
||||
|
|
|
@ -217,8 +217,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFJablotron(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int getJablotronBits(uint64_t fullcode, uint8_t *bits) {
|
||||
|
|
|
@ -214,8 +214,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFKeri(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// find KERI preamble in already demoded data
|
||||
|
|
|
@ -320,8 +320,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFNedap(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// find nedap preamble in already demoded data
|
||||
|
|
|
@ -89,8 +89,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFNEXWATCH(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int detectNexWatch(uint8_t *dest, size_t *size, bool *invert) {
|
||||
|
|
|
@ -222,8 +222,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFNoralsy(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int getnoralsyBits(uint32_t id, uint16_t year, uint8_t *bits) {
|
||||
|
|
|
@ -71,8 +71,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFPac(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// by marshmellow
|
||||
|
|
|
@ -164,8 +164,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFParadox(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// loop to get raw paradox waveform then FSK demodulate the TAG ID from it
|
||||
|
|
|
@ -173,7 +173,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFPCF7931(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -175,8 +175,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFPresco(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// find presco preamble 0x10D in already demoded data
|
||||
|
|
|
@ -295,8 +295,7 @@ static command_t CommandTable[] = {
|
|||
|
||||
int CmdLFPyramid(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int CmdHelp(const char *Cmd) {
|
||||
|
|
|
@ -116,8 +116,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFSecurakey(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// by marshmellow
|
||||
|
|
|
@ -2335,7 +2335,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFT55XX(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -315,8 +315,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFTI(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodTI(void) {
|
||||
|
|
|
@ -143,8 +143,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFViking(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// calc checksum
|
||||
|
|
|
@ -227,8 +227,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdLFVisa2k(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
// by iceman
|
||||
|
|
|
@ -193,7 +193,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
*/
|
||||
int CmdScript(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -1166,8 +1166,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdSmartcard(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int ExchangeAPDUSC(uint8_t *datain, int datainlen, bool activateCard, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen) {
|
||||
|
|
|
@ -586,8 +586,7 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdTrace(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int CmdTraceList(const char *Cmd) {
|
||||
|
|
|
@ -1968,7 +1968,6 @@ static int CmdHelp(const char *Cmd) {
|
|||
|
||||
int CmdEMV(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue