mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Add option for continuous mode to lf read
, try e.g. data plot
then lf read d 3000 s c
This commit is contained in:
parent
16ec5a96e0
commit
1208eb9e10
2 changed files with 20 additions and 3 deletions
|
@ -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]
|
||||||
|
- Add option for continuous mode to `lf read`, try e.g. `data plot` then `lf read d 3000 s c` (@doegox)
|
||||||
- Add `hf waveshare` to upload picture to Waveshare NFC-Powered e-Paper (@doegox)
|
- Add `hf waveshare` to upload picture to Waveshare NFC-Powered e-Paper (@doegox)
|
||||||
- Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox)
|
- Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox)
|
||||||
- Mikron JSC Russia Ultralight EV1 41 pages tag type support (@McEloff)
|
- Mikron JSC Russia Ultralight EV1 41 pages tag type support (@McEloff)
|
||||||
|
|
|
@ -77,14 +77,16 @@ static int usage_lf_cmdread(void) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
static int usage_lf_read(void) {
|
static int usage_lf_read(void) {
|
||||||
PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples]");
|
PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples] [c]");
|
||||||
PrintAndLogEx(NORMAL, "Options:");
|
PrintAndLogEx(NORMAL, "Options:");
|
||||||
PrintAndLogEx(NORMAL, " h This help");
|
PrintAndLogEx(NORMAL, " h This help");
|
||||||
PrintAndLogEx(NORMAL, " d #samples # samples to collect (optional)");
|
PrintAndLogEx(NORMAL, " d #samples # samples to collect (optional)");
|
||||||
PrintAndLogEx(NORMAL, " s silent");
|
PrintAndLogEx(NORMAL, " s silent");
|
||||||
|
PrintAndLogEx(NORMAL, " c run continuously until a key is pressed");
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(NORMAL, "Examples:");
|
PrintAndLogEx(NORMAL, "Examples:");
|
||||||
PrintAndLogEx(NORMAL, " lf read s d 12000 - collects 12000 samples silent");
|
PrintAndLogEx(NORMAL, " lf read s d 12000 - collects 12000 samples silent");
|
||||||
|
PrintAndLogEx(NORMAL, " lf read d 3000 s c - to be used with 'data plot' for live oscillo style");
|
||||||
PrintAndLogEx(NORMAL, " lf read");
|
PrintAndLogEx(NORMAL, " lf read");
|
||||||
PrintAndLogEx(NORMAL, "Extras:");
|
PrintAndLogEx(NORMAL, "Extras:");
|
||||||
PrintAndLogEx(NORMAL, " use " _YELLOW_("'lf config'")" to set parameters.");
|
PrintAndLogEx(NORMAL, " use " _YELLOW_("'lf config'")" to set parameters.");
|
||||||
|
@ -627,6 +629,7 @@ int CmdLFRead(const char *Cmd) {
|
||||||
|
|
||||||
bool errors = false;
|
bool errors = false;
|
||||||
bool verbose = true;
|
bool verbose = true;
|
||||||
|
bool continuous = false;
|
||||||
uint32_t samples = 0;
|
uint32_t samples = 0;
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
||||||
|
@ -641,6 +644,10 @@ int CmdLFRead(const char *Cmd) {
|
||||||
verbose = false;
|
verbose = false;
|
||||||
cmdp++;
|
cmdp++;
|
||||||
break;
|
break;
|
||||||
|
case 'c':
|
||||||
|
continuous = true;
|
||||||
|
cmdp++;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
|
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
|
||||||
errors = true;
|
errors = true;
|
||||||
|
@ -650,8 +657,17 @@ int CmdLFRead(const char *Cmd) {
|
||||||
|
|
||||||
//Validations
|
//Validations
|
||||||
if (errors) return usage_lf_read();
|
if (errors) return usage_lf_read();
|
||||||
|
if (continuous) {
|
||||||
return lf_read(verbose, samples);
|
PrintAndLogEx(INFO, "Press " _GREEN_("Enter") " to exit");
|
||||||
|
}
|
||||||
|
int ret = PM3_SUCCESS;
|
||||||
|
do {
|
||||||
|
ret = lf_read(verbose, samples);
|
||||||
|
if (kbd_enter_pressed()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (continuous);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdLFSniff(const char *Cmd) {
|
int CmdLFSniff(const char *Cmd) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue