Merge pull request #2195 from hazardousvoltage/unisniff

hf_unisniff: rename 'ASK' to 'USER' to avoid confusion
This commit is contained in:
Iceman authored and GitHub committed 2023-12-03 16:32:35 +01:00
commit 8f4b42e78d
3 files changed
+8 -6

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
- Changed `hf 14a info` - now reads and prints QL88 sigantures (@iceman1001) - Changed `hf 14a info` - now reads and prints QL88 sigantures (@iceman1001)
- Fixed `hf iclass dump` truncating AA2 blocks and improve reliability (@nvx) - Fixed `hf iclass dump` truncating AA2 blocks and improve reliability (@nvx)
- Added some info about UMC in "doc/magic_cards_notes.md" (@temskiy) - Added some info about UMC in "doc/magic_cards_notes.md" (@temskiy)
- Added standalone mode `hf_unisniff` combining 14a/14b/15 sniffing with extra flash save options (@hazardousvoltage)
## [Faraday.4.17511][2023-11-13] ## [Faraday.4.17511][2023-11-13]
- Fixed Python support of `experimental_client_with_swig` (@doegox) - Fixed Python support of `experimental_client_with_swig` (@doegox)
+6 -6
View File
@@ -56,9 +56,9 @@
* append = append to existing file, create if not existing. * append = append to existing file, create if not existing.
* none = do not save to SPIFFS, leave in trace buffer only. * none = do not save to SPIFFS, leave in trace buffer only.
* *
* protocol = [14a|14b|15|ask] * protocol = [14a|14b|15|user]
* which protocol to sniff. If you choose a protocol it will go directly * which protocol to sniff. If you choose a protocol it will go directly
* to work. If you choose 'ask' you may select the protocol at the start * to work. If you choose 'user' you may select the protocol at the start
* of each session. * of each session.
* *
* To retrieve trace data from flash: * To retrieve trace data from flash:
@@ -120,12 +120,12 @@
#define HF_UNISNIFF_CONFIG "hf_unisniff.conf" #define HF_UNISNIFF_CONFIG "hf_unisniff.conf"
#define HF_UNISNIFF_CONFIG_SIZE 128 #define HF_UNISNIFF_CONFIG_SIZE 128
#define HF_UNISNIFF_PROTOCOLS {"14a","14b","15", "ask"} // The logic requires ASK be last. #define HF_UNISNIFF_PROTOCOLS {"14a","14b","15", "user"} // The logic requires USER be last.
#define HF_UNISNIFF_NUM_PROTOCOLS 4 #define HF_UNISNIFF_NUM_PROTOCOLS 4
#define HF_UNISNIFF_PROTO_14a 0 #define HF_UNISNIFF_PROTO_14a 0
#define HF_UNISNIFF_PROTO_14b 1 #define HF_UNISNIFF_PROTO_14b 1
#define HF_UNISNIFF_PROTO_15 2 #define HF_UNISNIFF_PROTO_15 2
#define HF_UNISNIFF_PROTO_ASK HF_UNISNIFF_NUM_PROTOCOLS-1 #define HF_UNISNIFF_PROTO_USER HF_UNISNIFF_NUM_PROTOCOLS-1
#define HF_UNISNIFF_SAVE_MODE HF_UNISNIFF_SAVE_MODE_NEW // Default, override in .conf #define HF_UNISNIFF_SAVE_MODE HF_UNISNIFF_SAVE_MODE_NEW // Default, override in .conf
#define HF_UNISNIFF_SAVE_MODE_NEW 0 #define HF_UNISNIFF_SAVE_MODE_NEW 0
@@ -225,7 +225,7 @@ void RunMod(void) {
} }
#endif #endif
if (sniff_protocol >= HF_UNISNIFF_PROTO_ASK) { if (sniff_protocol >= HF_UNISNIFF_PROTO_USER) {
Dbprintf("[!] Protocol undefined, going to prompt loop"); Dbprintf("[!] Protocol undefined, going to prompt loop");
sniff_protocol = default_sniff_protocol; // Default to compile-time setting. sniff_protocol = default_sniff_protocol; // Default to compile-time setting.
for (;;) { for (;;) {
@@ -243,7 +243,7 @@ void RunMod(void) {
int button_pressed = BUTTON_HELD(1000); int button_pressed = BUTTON_HELD(1000);
if (button_pressed == BUTTON_SINGLE_CLICK) { if (button_pressed == BUTTON_SINGLE_CLICK) {
sniff_protocol++; sniff_protocol++;
if (sniff_protocol >= HF_UNISNIFF_PROTO_ASK) sniff_protocol=0; if (sniff_protocol >= HF_UNISNIFF_PROTO_USER) sniff_protocol=0;
SpinDelay(100); SpinDelay(100);
Dbprintf("Selected protocol: '%s'", protocols[sniff_protocol]); Dbprintf("Selected protocol: '%s'", protocols[sniff_protocol]);
} else if (button_pressed == BUTTON_HOLD) { } else if (button_pressed == BUTTON_HOLD) {
@@ -133,6 +133,7 @@ Here are the supported values you can assign to `STANDALONE` in `Makefile.platfo
| HF_REBLAY | 14A relay over BT - Salvador Mendoza | HF_REBLAY | 14A relay over BT - Salvador Mendoza
| HF_TCPRST | IKEA Rothult ST25TA, Standalone Master Key Dump/Emulation - Nick Draffen | HF_TCPRST | IKEA Rothult ST25TA, Standalone Master Key Dump/Emulation - Nick Draffen
| HF_TMUDFORD | Read and emulate ISO15693 card UID - Tim Mudford | HF_TMUDFORD | Read and emulate ISO15693 card UID - Tim Mudford
| HF_UNISNIFF | Combined 14a/14b/15 sniffer with runtime selection & extra save options
| HF_YOUNG | Mifare sniff/simulation - Craig Young | HF_YOUNG | Mifare sniff/simulation - Craig Young
| DANKARMULTI | Standalone mode that bakes together multiple other standalone modes. - dankar | DANKARMULTI | Standalone mode that bakes together multiple other standalone modes. - dankar