Commit Graph
165 Commits
Author SHA1 Message Date
MsprgandClaude Fable 5 d852118de5 client: build the tab completion vocabulary at runtime from the command tree
Tab completion used a generated table (pm3line_vocabulary.h, refreshed by
hand via `make commands`) that drifted from the real command tables: new
commands were missing (e.g. `hw bwm*`), removed ones lingered, and the
"offline" flag depended on the platform of whoever regenerated it
(IfPm5() returns true offline on PM5 builds).

Build the vocabulary at startup instead:

- cmdparser: add walkCommandsRecursive(), a tree walk using a fourth
  internal sentinel (XX_internal_command_walk_XX) next to the dump ones.
  It hands each leaf to a visitor as its command_t chain (ancestors +
  leaf). A dispatch counter detects entries shown like a category but
  with their own parser (reveng) and reports them as leaves.
- pm3line_vocabulary: dynamic vocabulary holding the IsAvailable()
  predicates of every command and its ancestor categories, so completion
  applies exactly the rule CmdsHelp() uses, live, for both offline and
  connected devices. Script entries ("script run <relpath>") come from
  the same directories `script list` scans, sorted, including
  subdirectories with the path `script run` needs.
- pm3line: readline and linenoise completers consume the live vocabulary.
  The walk runs with output disabled so category handlers stay silent.
- Drop pm3_help2list.py and the header regeneration from `make commands`.

Behaviour change: entries whose category is hidden by `help` (e.g. `mem`,
`usart` offline) are no longer offered, matching `help`; when connected,
commands the device does not support are no longer offered either.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 14:29:04 +02:00
Msprg 2d898d31e7 fix make install after sim014 firmware removal
e2cf7dee5 removed sim014.bin but the top-level Makefile still lists it
in INSTALLSIMFW, so 'make install' fails on cp. Install sim020 instead,
and point the pm3_tests.sh existence check at the same file.
2026-08-27 23:55:50 +02:00
iceman1001 cb2b0f5fc0 A python3 kivy epassport viewer. You can read and dump a passport using BAC or CAN. There is also a screen OCR to read MZR if you like. Every dump gets its own folder. You can generate a set of sample dump folders. This project is just a fun test of what Claude can do. Hack all things! 2026-08-23 22:35:27 +02:00
Philippe Teuwen d8c7f84598 Add Makefile PLATFORM_FILE variable to specify another Makefile.platform file 2026-05-19 00:10:17 +02:00
Philippe Teuwen 20d194e5bd Makefile: serialize targets to avoid interleaved compilations. -j still supported. 2026-02-28 19:53:41 +01:00
Philippe Teuwen f0dbcf7f77 Add target 'host' to Makefile 2026-02-06 23:29:22 +01:00
Philippe Teuwen 9648c078c1 Fix make style for cpp 2026-02-06 13:43:41 +01:00
Philippe Teuwen b4ab732260 mfulc_des_brute: add unit tests and make check 2026-01-19 21:47:49 +01:00
noproto c2e1567160 Add mfulc_counterfeit_recovery script and mfulc_des_brute tool 2026-01-19 21:47:49 +01:00
Philippe Teuwen bde33711c7 style 2025-09-20 22:02:23 +02:00
iceman1001 4c912731ef fix text layout 2025-09-11 20:56:26 +02:00
iceman1001 a440fbabda make clean - now removes all __pycache__ folders sprinkled all over the project when running some of the dedicated python scripts 2025-07-01 16:47:20 +02:00
iceman1001 fe92f55653 ok, not build hitag2crack, only clean 2025-06-17 19:54:58 +02:00
iceman1001 fc9f70c436 fix release name style 2025-06-17 18:28:22 +02:00
iceman1001 35493f5b2c at least run hitag2crack clean, for us who do compile it... 2025-06-17 18:28:22 +02:00
Philippe Teuwen 52b00fa653 Release script: removing some Werror left 2025-06-16 18:14:02 +02:00
Philippe Teuwen b36b61feb0 clean the client only if PLATFORM got changed from or to PM3ICOPYX 2025-05-02 16:54:13 +02:00
Philippe Teuwen 49521078e5 fix mf aes key length and typo in make help 2025-04-20 11:20:14 +02:00
Philippe Teuwen 78ae375d55 make miscchecks, skip venv 2025-03-23 23:22:23 +01:00
Philippe Teuwen 3869f70043 make commands requires an up-to-date client 2025-03-21 13:56:46 +01:00
Philippe Teuwen b66e2e03fd Added make commands to regenerate commands documentation files and autocompletion data independently of make style 2025-03-12 09:09:58 +01:00
iceman1001 e23d4ac625 updated deprecated param. Thanks @nvx 2024-11-02 15:10:43 +01:00
iceman1001 ccf8d8b754 fix #2501 the parallel execution of "make -j check" created a race condition in the static nonces tests. 2024-09-13 13:37:27 +02:00
Philippe Teuwen b0edd7d4d2 fix make install 2024-08-10 01:12:41 +02:00
Philippe Teuwen c47578c048 sort mfc tools 2024-08-02 00:10:23 +02:00
iceman1001 f966387c41 text 2024-03-06 10:19:40 +01:00
nvx b4ae4c429f Fix some low hanging differences when running make style on Windows vs Linux 2024-01-26 20:08:36 +10:00
iceman1001 1234b08132 adapt to new sim module firmware version 2023-09-28 08:46:04 +02:00
nvx 210d2847ae Adds hf iclass esetblk, equivalent to hf mf esetblk
Also some minor tweaks to make commands.json and commands.md
properly on Windows.
2023-08-22 07:45:05 +10:00
iceman1001 5ecdd673ba added the possibility to compile cryptoRF solvers in the main makefile. Will add tests in regression script next 2023-08-21 12:37:05 +02:00
Alex 4b1090c8c7 Rename "vocabulory" to "vocabulary" 2023-08-09 19:49:55 +02:00
Philippe Teuwen 7b3ecdcdd5 make release: add --force to call to mkversion.sh. Not strictly needed but cleaner... 2023-08-03 01:13:57 +02:00
Philippe Teuwen cb72897b17 mkversion.sh: now regenerates version_pm3.c (and consequently the binaries) only when needed
and add --force to forcibly regenerate version_pm3.c

and small fixes:
* document mkversion.sh usage
* remove call to mkversion.sh in client/experimental_lib/CMakeLists.txt on release
* remove call to old `mkversion.pl` in bootrom/Makefile
* just in case, mkversion.sh takes care of atomic write of the file
2023-08-03 01:03:24 +02:00
Philippe Teuwen 3fd8be2a47 Avoid some unneeded rebuild and fix parallel call to fw rebuild when calling from install 2023-08-02 22:13:05 +02:00
iceman1001 8f977ef989 fix #1909 intendation breaks the makefile 2023-02-11 11:43:29 +01:00
Henry Gabryjelski c6b6f2b6a7 Option for PR 1902 2023-02-07 19:20:42 -08:00
Henry Gabryjelski 99f24b23b8 fix copy/paste error 2023-01-31 10:01:54 -08:00
Henry Gabryjelski bfc3a53ea2 Modify Makefile to copy group-specific udev rules 2023-01-31 10:00:36 -08:00
Philippe Teuwen 207d8ed7d7 Fix INSTALLSUDO usage and adapt release template 2023-01-15 12:11:31 +01:00
Edward Li 2c1fe700e2 Fix make accessrights for Fedora 2022-12-09 23:44:47 -05:00
iceman1001 deeb672b08 also include new firmware binary in the install 2022-12-09 07:48:07 +01:00
iceman1001 5209407e9d revert installing 012.bin until its available 2022-12-06 22:19:18 +01:00
iceman1001 53b2909f04 prepping for sim module firmware upgrade file 2022-12-05 22:32:40 +01:00
iceman1001 250fdedeac adapt makefile to use sudo, echo, usermod, adduser, getent as variables 2022-10-16 09:19:13 +02:00
Philippe Teuwen 9ebda88386 Add INSTALLSUDO param in Makefile.platform to limit sudo to install commands, better than sudo make install... 2022-05-03 19:04:36 +02:00
Mark Dietzer b2e701d3fd Remove force lowercasing of commands.json 2022-03-29 11:08:37 -07:00
Philippe Teuwen bf522bf663 make accessrights: Silent error when no bluetooth group 2022-03-02 10:27:58 +01:00
Philippe Teuwen ccf8aed5f2 Makefile: fix typo and missing phony 2022-02-28 15:44:42 +01:00
Philippe Teuwen 7fcb1ac5ed make accessrights: ignore if bluetooth stack not installed 2022-02-27 13:17:10 +01:00
iceman1001 2bac77a84f add new bruteforce tools for teleno's compasX software 2022-01-26 19:57:10 +01:00