mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
style
This commit is contained in:
parent
d1c6f12aff
commit
f217b47cbd
4 changed files with 43 additions and 43 deletions
|
@ -1608,9 +1608,9 @@ void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain, b
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
|
|
||||||
if (ng) {
|
if (ng) {
|
||||||
reply_ng(CMD_MIFARE_CHKKEYS, PM3_SUCCESS, (uint8_t*)&keyresult, sizeof(keyresult));
|
reply_ng(CMD_MIFARE_CHKKEYS, PM3_SUCCESS, (uint8_t *)&keyresult, sizeof(keyresult));
|
||||||
} else {
|
} else {
|
||||||
reply_mix(CMD_ACK, keyresult.found, 0, 0, (uint8_t*)&keyresult.key, sizeof(keyresult.key));
|
reply_mix(CMD_ACK, keyresult.found, 0, 0, (uint8_t *)&keyresult.key, sizeof(keyresult.key));
|
||||||
}
|
}
|
||||||
// reply_old(CMD_ACK, keyresult.found, 0, 0, (uint8_t*)&keyresult.key, sizeof(keyresult.key));
|
// reply_old(CMD_ACK, keyresult.found, 0, 0, (uint8_t*)&keyresult.key, sizeof(keyresult.key));
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||||
|
|
|
@ -2097,43 +2097,43 @@ static int CmdDataIIR(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static command_t CommandTable[] = {
|
static command_t CommandTable[] = {
|
||||||
{"help", CmdHelp, AlwaysAvailable, "This help"},
|
{"help", CmdHelp, AlwaysAvailable, "This help"},
|
||||||
{"askedgedetect", CmdAskEdgeDetect, AlwaysAvailable, "[threshold] Adjust Graph for manual ASK demod using the length of sample differences to detect the edge of a wave (use 20-45, def:25)"},
|
{"askedgedetect", CmdAskEdgeDetect, AlwaysAvailable, "[threshold] Adjust Graph for manual ASK demod using the length of sample differences to detect the edge of a wave (use 20-45, def:25)"},
|
||||||
{"autocorr", CmdAutoCorr, AlwaysAvailable, "[window length] [g] -- Autocorrelation over window - g to save back to GraphBuffer (overwrite)"},
|
{"autocorr", CmdAutoCorr, AlwaysAvailable, "[window length] [g] -- Autocorrelation over window - g to save back to GraphBuffer (overwrite)"},
|
||||||
{"biphaserawdecode", CmdBiphaseDecodeRaw, AlwaysAvailable, "[offset] [invert<0|1>] [maxErr] -- Biphase decode bin stream in DemodBuffer (offset = 0|1 bits to shift the decode start)"},
|
{"biphaserawdecode", CmdBiphaseDecodeRaw, AlwaysAvailable, "[offset] [invert<0|1>] [maxErr] -- Biphase decode bin stream in DemodBuffer (offset = 0|1 bits to shift the decode start)"},
|
||||||
{"bin2hex", Cmdbin2hex, AlwaysAvailable, "<digits> -- Converts binary to hexadecimal"},
|
{"bin2hex", Cmdbin2hex, AlwaysAvailable, "<digits> -- Converts binary to hexadecimal"},
|
||||||
{"bitsamples", CmdBitsamples, IfPm3Present, "Get raw samples as bitstring"},
|
{"bitsamples", CmdBitsamples, IfPm3Present, "Get raw samples as bitstring"},
|
||||||
{"buffclear", CmdBuffClear, AlwaysAvailable, "Clears bigbuff on deviceside and graph window"},
|
{"buffclear", CmdBuffClear, AlwaysAvailable, "Clears bigbuff on deviceside and graph window"},
|
||||||
{"dec", CmdDec, AlwaysAvailable, "Decimate samples"},
|
{"dec", CmdDec, AlwaysAvailable, "Decimate samples"},
|
||||||
{"detectclock", CmdDetectClockRate, AlwaysAvailable, "[<a|f|n|p>] Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer"},
|
{"detectclock", CmdDetectClockRate, AlwaysAvailable, "[<a|f|n|p>] Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer"},
|
||||||
{"fsktonrz", CmdFSKToNRZ, AlwaysAvailable, "Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk)"},
|
{"fsktonrz", CmdFSKToNRZ, AlwaysAvailable, "Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk)"},
|
||||||
|
|
||||||
{"getbitstream", CmdGetBitStream, AlwaysAvailable, "Convert GraphBuffer's >=1 values to 1 and <1 to 0"},
|
{"getbitstream", CmdGetBitStream, AlwaysAvailable, "Convert GraphBuffer's >=1 values to 1 and <1 to 0"},
|
||||||
{"grid", CmdGrid, AlwaysAvailable, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"},
|
{"grid", CmdGrid, AlwaysAvailable, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"},
|
||||||
{"hexsamples", CmdHexsamples, IfPm3Present, "<bytes> [<offset>] -- Dump big buffer as hex bytes"},
|
{"hexsamples", CmdHexsamples, IfPm3Present, "<bytes> [<offset>] -- Dump big buffer as hex bytes"},
|
||||||
{"hex2bin", Cmdhex2bin, AlwaysAvailable, "<hexadecimal> -- Converts hexadecimal to binary"},
|
{"hex2bin", Cmdhex2bin, AlwaysAvailable, "<hexadecimal> -- Converts hexadecimal to binary"},
|
||||||
{"hide", CmdHide, AlwaysAvailable, "Hide graph window"},
|
{"hide", CmdHide, AlwaysAvailable, "Hide graph window"},
|
||||||
{"hpf", CmdHpf, AlwaysAvailable, "Remove DC offset from trace"},
|
{"hpf", CmdHpf, AlwaysAvailable, "Remove DC offset from trace"},
|
||||||
{"load", CmdLoad, AlwaysAvailable, "<filename> -- Load trace (to graph window"},
|
{"load", CmdLoad, AlwaysAvailable, "<filename> -- Load trace (to graph window"},
|
||||||
{"ltrim", CmdLtrim, AlwaysAvailable, "<samples> -- Trim samples from left of trace"},
|
{"ltrim", CmdLtrim, AlwaysAvailable, "<samples> -- Trim samples from left of trace"},
|
||||||
{"rtrim", CmdRtrim, AlwaysAvailable, "<location to end trace> -- Trim samples from right of trace"},
|
{"rtrim", CmdRtrim, AlwaysAvailable, "<location to end trace> -- Trim samples from right of trace"},
|
||||||
{"mtrim", CmdMtrim, AlwaysAvailable, "<start> <stop> -- Trim out samples from the specified start to the specified stop"},
|
{"mtrim", CmdMtrim, AlwaysAvailable, "<start> <stop> -- Trim out samples from the specified start to the specified stop"},
|
||||||
{"manrawdecode", Cmdmandecoderaw, AlwaysAvailable, "[invert] [maxErr] -- Manchester decode binary stream in DemodBuffer"},
|
{"manrawdecode", Cmdmandecoderaw, AlwaysAvailable, "[invert] [maxErr] -- Manchester decode binary stream in DemodBuffer"},
|
||||||
{"norm", CmdNorm, AlwaysAvailable, "Normalize max/min to +/-128"},
|
{"norm", CmdNorm, AlwaysAvailable, "Normalize max/min to +/-128"},
|
||||||
{"plot", CmdPlot, AlwaysAvailable, "Show graph window (hit 'h' in window for keystroke help)"},
|
{"plot", CmdPlot, AlwaysAvailable, "Show graph window (hit 'h' in window for keystroke help)"},
|
||||||
{"printdemodbuffer", CmdPrintDemodBuff, AlwaysAvailable, "[x] [o] <offset> [l] <length> -- print the data in the DemodBuffer - 'x' for hex output"},
|
{"printdemodbuffer", CmdPrintDemodBuff, AlwaysAvailable, "[x] [o] <offset> [l] <length> -- print the data in the DemodBuffer - 'x' for hex output"},
|
||||||
{"rawdemod", CmdRawDemod, AlwaysAvailable, "[modulation] ... <options> -see help (h option) -- Demodulate the data in the GraphBuffer and output binary"},
|
{"rawdemod", CmdRawDemod, AlwaysAvailable, "[modulation] ... <options> -see help (h option) -- Demodulate the data in the GraphBuffer and output binary"},
|
||||||
{"samples", CmdSamples, IfPm3Present, "[512 - 40000] -- Get raw samples for graph window (GraphBuffer)"},
|
{"samples", CmdSamples, IfPm3Present, "[512 - 40000] -- Get raw samples for graph window (GraphBuffer)"},
|
||||||
{"save", CmdSave, AlwaysAvailable, "<filename> -- Save trace (from graph window)"},
|
{"save", CmdSave, AlwaysAvailable, "<filename> -- Save trace (from graph window)"},
|
||||||
{"setgraphmarkers", CmdSetGraphMarkers, AlwaysAvailable, "[orange_marker] [blue_marker] (in graph window)"},
|
{"setgraphmarkers", CmdSetGraphMarkers, AlwaysAvailable, "[orange_marker] [blue_marker] (in graph window)"},
|
||||||
{"scale", CmdScale, AlwaysAvailable, "<int> -- Set cursor display scale"},
|
{"scale", CmdScale, AlwaysAvailable, "<int> -- Set cursor display scale"},
|
||||||
{"setdebugmode", CmdSetDebugMode, AlwaysAvailable, "<0|1|2> -- Turn on or off Debugging Level for lf demods"},
|
{"setdebugmode", CmdSetDebugMode, AlwaysAvailable, "<0|1|2> -- Turn on or off Debugging Level for lf demods"},
|
||||||
{"shiftgraphzero", CmdGraphShiftZero, AlwaysAvailable, "<shift> -- Shift 0 for Graphed wave + or - shift value"},
|
{"shiftgraphzero", CmdGraphShiftZero, AlwaysAvailable, "<shift> -- Shift 0 for Graphed wave + or - shift value"},
|
||||||
{"dirthreshold", CmdDirectionalThreshold, AlwaysAvailable, "<thres up> <thres down> -- Max rising higher up-thres/ Min falling lower down-thres, keep rest as prev."},
|
{"dirthreshold", CmdDirectionalThreshold, AlwaysAvailable, "<thres up> <thres down> -- Max rising higher up-thres/ Min falling lower down-thres, keep rest as prev."},
|
||||||
{"tune", CmdTuneSamples, IfPm3Present, "Get hw tune samples for graph window"},
|
{"tune", CmdTuneSamples, IfPm3Present, "Get hw tune samples for graph window"},
|
||||||
{"undec", CmdUndec, AlwaysAvailable, "Un-decimate samples by 2"},
|
{"undec", CmdUndec, AlwaysAvailable, "Un-decimate samples by 2"},
|
||||||
{"zerocrossings", CmdZerocrossings, AlwaysAvailable, "Count time between zero-crossings"},
|
{"zerocrossings", CmdZerocrossings, AlwaysAvailable, "Count time between zero-crossings"},
|
||||||
{"iir", CmdDataIIR, IfPm3Present, "apply IIR buttersworth filter on plotdata"},
|
{"iir", CmdDataIIR, IfPm3Present, "apply IIR buttersworth filter on plotdata"},
|
||||||
{NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1592,7 +1592,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) {
|
||||||
} else if (clen == 1) {
|
} else if (clen == 1) {
|
||||||
if (ctmp == 't') { transferToEml = 1; continue; }
|
if (ctmp == 't') { transferToEml = 1; continue; }
|
||||||
if (ctmp == 'd') { createDumpFile = 1; continue; }
|
if (ctmp == 'd') { createDumpFile = 1; continue; }
|
||||||
if ((ctmp == 'm') && (IfPm3Flash())){ use_flashmemory = true; continue; }
|
if ((ctmp == 'm') && (IfPm3Flash())) { use_flashmemory = true; continue; }
|
||||||
} else {
|
} else {
|
||||||
// May be a dic file
|
// May be a dic file
|
||||||
if (param_getstr(Cmd, i, filename, FILE_PATH_SIZE) >= FILE_PATH_SIZE) {
|
if (param_getstr(Cmd, i, filename, FILE_PATH_SIZE) >= FILE_PATH_SIZE) {
|
||||||
|
@ -2028,8 +2028,8 @@ out:
|
||||||
conn.block_after_ACK = false;
|
conn.block_after_ACK = false;
|
||||||
SendCommandMIX(CMD_PING, 0, 0, 0, NULL, 0);
|
SendCommandMIX(CMD_PING, 0, 0, 0, NULL, 0);
|
||||||
WaitForResponseTimeout(CMD_ACK, NULL, 1000);
|
WaitForResponseTimeout(CMD_ACK, NULL, 1000);
|
||||||
|
|
||||||
|
|
||||||
if (createDumpFile) {
|
if (createDumpFile) {
|
||||||
fptr = GenerateFilename("hf-mf-", "-key.bin");
|
fptr = GenerateFilename("hf-mf-", "-key.bin");
|
||||||
if (fptr == NULL) {
|
if (fptr == NULL) {
|
||||||
|
|
|
@ -69,14 +69,14 @@ int main(int argc, char **argv) {
|
||||||
res = flash_load(&files[num_files], argv[i], can_write_bl);
|
res = flash_load(&files[num_files], argv[i], can_write_bl);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
num_files++;
|
num_files++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *serial_port_name = argv[1];
|
char *serial_port_name = argv[1];
|
||||||
|
|
||||||
session.pm3_present = OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED);
|
session.pm3_present = OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED);
|
||||||
if (session.pm3_present) {
|
if (session.pm3_present) {
|
||||||
PrintAndLogEx(NORMAL, _GREEN_("Found"));
|
PrintAndLogEx(NORMAL, _GREEN_("Found"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue