mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 08:35:56 +08:00
send arguments to standalone mode
This commit is contained in:
parent
8dd9c92beb
commit
c1a5f93dab
3 changed files with 33 additions and 24 deletions
|
@ -425,13 +425,19 @@ void ModInfo(void) {
|
|||
|
||||
void RunMod(void) {
|
||||
|
||||
uint8_t mode = ICE_USE;
|
||||
uint8_t *bb = BigBuf_get_EM_addr();
|
||||
if (bb[0] > 0 && bb[0] < 5) {
|
||||
mode = bb[0];
|
||||
}
|
||||
|
||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||
BigBuf_Clear();
|
||||
|
||||
StandAloneMode();
|
||||
Dbprintf(_YELLOW_("HF iCLASS mode a.k.a iceCLASS started"));
|
||||
|
||||
uint8_t mode = ICE_USE;
|
||||
|
||||
|
||||
for (;;) {
|
||||
|
||||
|
|
|
@ -2064,6 +2064,8 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
break;
|
||||
}
|
||||
case CMD_STANDALONE: {
|
||||
uint8_t *bb = BigBuf_get_EM_addr();
|
||||
bb[0] = packet->data.asBytes[0];
|
||||
RunMod();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ static int usage_dbg(void) {
|
|||
PrintAndLogEx(NORMAL, " 4 - print even debug messages in timing critical functions");
|
||||
PrintAndLogEx(NORMAL, " Note: this option therefore may cause malfunction itself");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hw dbg 3");
|
||||
PrintAndLogEx(NORMAL, _YELLOW_(" hw dbg 3"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ static int usage_hw_detectreader(void) {
|
|||
PrintAndLogEx(NORMAL, " <type> L = 125/134 kHz, H = 13.56 MHz");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hw detectreader L");
|
||||
PrintAndLogEx(NORMAL, _YELLOW_(" hw detectreader L"));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ static int usage_hw_setmux(void) {
|
|||
PrintAndLogEx(NORMAL, " <type> Low peak, Low raw, Hi peak, Hi raw");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hw setmux lopkd");
|
||||
PrintAndLogEx(NORMAL, _YELLOW_(" hw setmux lopkd"));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,8 @@ static int usage_hw_connect(void) {
|
|||
PrintAndLogEx(NORMAL, " b <baudrate> Baudrate");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hw connect p "SERIAL_PORT_EXAMPLE_H);
|
||||
PrintAndLogEx(NORMAL, " hw connect p "SERIAL_PORT_EXAMPLE_H" b 115200");
|
||||
PrintAndLogEx(NORMAL, _YELLOW_(" hw connect p "SERIAL_PORT_EXAMPLE_H));
|
||||
PrintAndLogEx(NORMAL, _YELLOW_(" hw connect p "SERIAL_PORT_EXAMPLE_H" b 115200"));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -486,9 +486,10 @@ static int CmdSetMux(const char *Cmd) {
|
|||
}
|
||||
|
||||
static int CmdStandalone(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
// (void)Cmd; // Cmd is not used so far
|
||||
uint8_t arg = param_get8ex(Cmd, 0, 0, 10);
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_STANDALONE, NULL, 0);
|
||||
SendCommandNG(CMD_STANDALONE, (uint8_t *)&arg, sizeof(arg));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue