added a interactive flag for hf14asniff, and unified text across the project

This commit is contained in:
iceman1001 2024-01-25 10:21:36 +01:00
parent c3be58229d
commit efc8c0b8ab
17 changed files with 35 additions and 20 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased] ## [unreleased][unreleased]
- Changed `hf 14a sniff -i` - now supports the interactive flag (@iceman1001)
- Added `HF_15SIM` standalone mode that dump then simulate iso15 tags (@lnv42) - Added `HF_15SIM` standalone mode that dump then simulate iso15 tags (@lnv42)
- Changed `iso15 simulation`, reworked, added support for lot of features (@lnv42) - Changed `iso15 simulation`, reworked, added support for lot of features (@lnv42)
- Changed `hf 15 sniff` quality while low signal (@lnv42) - Changed `hf 15 sniff` quality while low signal (@lnv42)

View file

@ -683,7 +683,9 @@ void RAMFUNC SniffIso14443a(uint8_t param) {
// Set up the demodulator for the reader -> tag commands // Set up the demodulator for the reader -> tag commands
Uart14aInit(receivedCmd, receivedCmdPar); Uart14aInit(receivedCmd, receivedCmdPar);
Dbprintf("Starting to sniff. Press PM3 Button to stop."); if (g_dbglevel >= DBG_ERROR) {
DbpString("Press " _GREEN_("pm3 button") " to abort sniffing");
}
// The DMA buffer, used to stream samples from the FPGA // The DMA buffer, used to stream samples from the FPGA
dmabuf8_t *dma = get_dma8(); dmabuf8_t *dma = get_dma8();

View file

@ -2375,7 +2375,9 @@ void SniffIso14443b(void) {
FpgaDownloadAndGo(FPGA_BITSTREAM_HF); FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
DbpString("Starting to sniff. Press PM3 Button to stop."); if (g_dbglevel >= DBG_ERROR) {
DbpString("Press " _GREEN_("pm3 button") " to abort sniffing");
}
BigBuf_free(); BigBuf_free();
clear_trace(); clear_trace();

View file

@ -1633,8 +1633,9 @@ void SniffIso15693(uint8_t jam_search_len, uint8_t *jam_search_string, bool icla
FpgaDownloadAndGo(FPGA_BITSTREAM_HF_15); FpgaDownloadAndGo(FPGA_BITSTREAM_HF_15);
DbpString("Starting to sniff. Press <PM3 button> to stop"); if (g_dbglevel >= DBG_ERROR) {
DbpString("Press " _GREEN_("pm3 button") " to abort sniffing");
}
BigBuf_free(); BigBuf_free();
clear_trace(); clear_trace();
set_tracing(true); set_tracing(true);

View file

@ -313,7 +313,7 @@ int CmdHFTune(const char *Cmd) {
style = STYLE_VALUE; style = STYLE_VALUE;
PrintAndLogEx(INFO, "Measuring HF antenna"); PrintAndLogEx(INFO, "Measuring HF antenna");
PrintAndLogEx(INFO, "click " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to exit"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to exit");
PacketResponseNG resp; PacketResponseNG resp;
clearCommandBuffer(); clearCommandBuffer();

View file

@ -877,13 +877,14 @@ int CmdHF14ASniff(const char *Cmd) {
CLIParserContext *ctx; CLIParserContext *ctx;
CLIParserInit(&ctx, "hf 14a sniff", CLIParserInit(&ctx, "hf 14a sniff",
"Collect data from the field and save into command buffer.\n" "Collect data from the field and save into command buffer.\n"
"Buffer accessible from command 'hf 14a list'", "Buffer accessible from command `hf 14a list`\n",
" hf 14a sniff -c -r"); " hf 14a sniff -c -r");
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_lit0("c", "card", "triggered by first data from card"), arg_lit0("c", "card", "triggered by first data from card"),
arg_lit0("r", "reader", "triggered by first 7-bit request from reader (REQ,WUP,...)"), arg_lit0("r", "reader", "triggered by first 7-bit request from reader (REQ, WUP)"),
arg_lit0("i", "interactive", "Console will not be returned until sniff finishes or is aborted"),
arg_param_end arg_param_end
}; };
CLIExecWithReturn(ctx, Cmd, argtable, true); CLIExecWithReturn(ctx, Cmd, argtable, true);
@ -898,10 +899,18 @@ int CmdHF14ASniff(const char *Cmd) {
param |= 0x02; param |= 0x02;
} }
bool interactive = arg_get_lit(ctx, 3);
CLIParserFree(ctx); CLIParserFree(ctx);
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_ISO14443A_SNIFF, (uint8_t *)&param, sizeof(uint8_t)); SendCommandNG(CMD_HF_ISO14443A_SNIFF, (uint8_t *)&param, sizeof(uint8_t));
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " to abort sniffing");
if (interactive) {
PacketResponseNG resp;
WaitForResponse(CMD_HF_ISO14443A_SNIFF, &resp);
PrintAndLogEx(INFO, "Done!");
}
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -1495,7 +1495,7 @@ static int CmdHF15FindAfi(const char *Cmd) {
bool fast = (arg_get_lit(ctx, 1) == false); bool fast = (arg_get_lit(ctx, 1) == false);
CLIParserFree(ctx); CLIParserFree(ctx);
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to exit"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to exit");
struct p { struct p {
uint32_t flags; uint32_t flags;

View file

@ -1787,7 +1787,7 @@ static int CmdHFFelicaSniff(const char *Cmd) {
PrintAndLogEx(INFO, "Sniff Felica, getting first %" PRIu32 " frames, skipping after %" PRIu32 " triggers", payload.samples, payload.triggers); PrintAndLogEx(INFO, "Sniff Felica, getting first %" PRIu32 " frames, skipping after %" PRIu32 " triggers", payload.samples, payload.triggers);
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort sniffing"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort sniffing");
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_FELICA_SNIFF, (uint8_t *)&payload, sizeof(payload)); SendCommandNG(CMD_HF_FELICA_SNIFF, (uint8_t *)&payload, sizeof(payload));
PacketResponseNG resp; PacketResponseNG resp;
@ -1834,7 +1834,7 @@ static int CmdHFFelicaSimLite(const char *Cmd) {
CLIParserFree(ctx); CLIParserFree(ctx);
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_FELICALITE_SIMULATE, payload.uid, sizeof(payload)); SendCommandNG(CMD_HF_FELICALITE_SIMULATE, payload.uid, sizeof(payload));
@ -2039,7 +2039,7 @@ static int CmdHFFelicaDumpLite(const char *Cmd) {
SendCommandNG(CMD_HF_FELICALITE_DUMP, NULL, 0); SendCommandNG(CMD_HF_FELICALITE_DUMP, NULL, 0);
PacketResponseNG resp; PacketResponseNG resp;
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort dumping"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort dumping");
uint8_t timeout = 0; uint8_t timeout = 0;
while (WaitForResponseTimeout(CMD_ACK, &resp, 2000) == false) { while (WaitForResponseTimeout(CMD_ACK, &resp, 2000) == false) {

View file

@ -575,7 +575,7 @@ static int CmdHF14AJookiSim(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(SUCCESS, "Starting simulating"); PrintAndLogEx(SUCCESS, "Starting simulating");
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
for (;;) { for (;;) {
if (kbd_enter_pressed()) { if (kbd_enter_pressed()) {
SendCommandNG(CMD_BREAK_LOOP, NULL, 0); SendCommandNG(CMD_BREAK_LOOP, NULL, 0);

View file

@ -556,7 +556,7 @@ static int CmdLegicSim(const char *Cmd) {
SendCommandNG(CMD_HF_LEGIC_SIMULATE, (uint8_t *)&payload, sizeof(payload)); SendCommandNG(CMD_HF_LEGIC_SIMULATE, (uint8_t *)&payload, sizeof(payload));
PacketResponseNG resp; PacketResponseNG resp;
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
for (;;) { for (;;) {
if (kbd_enter_pressed()) { if (kbd_enter_pressed()) {
SendCommandNG(CMD_BREAK_LOOP, NULL, 0); SendCommandNG(CMD_BREAK_LOOP, NULL, 0);

View file

@ -193,7 +193,7 @@ int CmdHfThinFilmSim(const char *Cmd) {
PrintAndLogEx(INFO, "Client side interrupted"); PrintAndLogEx(INFO, "Client side interrupted");
PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press"); PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press");
} else { } else {
PrintAndLogEx(INFO, "Done"); PrintAndLogEx(INFO, "Done!");
} }
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -554,7 +554,7 @@ static int CmdDetectReader(const char *Cmd) {
else if (hf) else if (hf)
arg = 2; arg = 2;
PrintAndLogEx(INFO, "press pm3 button to change modes and finally exit"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " to change modes and exit");
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LISTEN_READER_FIELD, (uint8_t *)&arg, sizeof(arg)); SendCommandNG(CMD_LISTEN_READER_FIELD, (uint8_t *)&arg, sizeof(arg));
return PM3_SUCCESS; return PM3_SUCCESS;

View file

@ -524,7 +524,7 @@ static int CmdAWIDBrute(const char *Cmd) {
} }
PrintAndLogEx(SUCCESS, "Bruteforceing AWID %d reader", fmtlen); PrintAndLogEx(SUCCESS, "Bruteforceing AWID %d reader", fmtlen);
PrintAndLogEx(SUCCESS, "Press " _GREEN_("pm3 button") " to abort simulation or press " _GREEN_("<Enter>")); PrintAndLogEx(SUCCESS, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
uint16_t up = cn; uint16_t up = cn;
uint16_t down = cn; uint16_t down = cn;

View file

@ -1237,7 +1237,7 @@ int CmdEM4x50Sim(const char *Cmd) {
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LF_EM4X50_SIM, (uint8_t *)&password, sizeof(password)); SendCommandNG(CMD_LF_EM4X50_SIM, (uint8_t *)&password, sizeof(password));
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
PacketResponseNG resp; PacketResponseNG resp;
// init to ZERO // init to ZERO

View file

@ -282,7 +282,7 @@ int CmdEM4x70Brute(const char *Cmd) {
return PM3_EINVARG; return PM3_EINVARG;
} }
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to exit"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to exit");
clearCommandBuffer(); clearCommandBuffer();
PacketResponseNG resp; PacketResponseNG resp;
SendCommandNG(CMD_LF_EM4X70_BRUTE, (uint8_t *)&etd, sizeof(etd)); SendCommandNG(CMD_LF_EM4X70_BRUTE, (uint8_t *)&etd, sizeof(etd));

View file

@ -592,7 +592,7 @@ static int CmdHIDBrute(const char *Cmd) {
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "Started bruteforcing HID Prox reader"); PrintAndLogEx(INFO, "Started bruteforcing HID Prox reader");
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
// copy values to low. // copy values to low.
card_low = card_hi; card_low = card_hi;

View file

@ -1015,7 +1015,7 @@ static int CmdIndalaBrute(const char *Cmd) {
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "Started brute-forcing INDALA Prox reader"); PrintAndLogEx(INFO, "Started brute-forcing INDALA Prox reader");
PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("<Enter>") " to abort simulation"); PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("<Enter>") " to abort simulation");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
// main loop // main loop