73 Commits
Author SHA1 Message Date
iceman1001andClaude Opus 5.5 cc50ed6b72 client: check PrintAndLogEx format strings at compile time
Add a printf format attribute to PrintAndLogEx so gcc/clang flag
argument/specifier mismatches (previous commit fixed the 34 existing ones).
On mingw use __MINGW_PRINTF_FORMAT, matching the GNU printf selected by
_ISOC99_SOURCE rather than ms_printf.

PrintAndLogEx(x, "") is the established way to print an empty line, so
-Wno-format-zero-length is added to every build that compiles callers:
client Makefile, client CMake, experimental_lib, and cliparser (Makefile
and cmake).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:35:57 +07:00
YoungJules 989cdfb6ca Updated check for home shortcut following review 2026-05-08 09:27:50 +02:00
YoungJules 28ba5fd840 add native LEGIC clone workflow
Port the useful LEGIC clone path into the client, including dump rewriting and optional tag restore, while keeping the existing Lua editor for advanced workflows. Also improve simulator abort handling and shared file path expansion for the new native commands.
2026-05-07 14:45:34 +02:00
Philippe Teuwen fdf3b2690a Various fixes to content GCC 16... 2026-02-07 00:51:53 +01:00
iceman1001 bc1c47e81b style 2025-04-13 12:25:14 +02:00
iceman1001 363bc0da8a some extra NULL checks to please cppchecker 2025-03-25 12:34:00 +01:00
iceman1001 06a1627a95 style 2025-03-12 16:48:30 +01:00
iceman1001 2137284a93 style\n Some improvements to trace list -t seos annotations. 2025-03-12 16:41:06 +01:00
Jean-Michel Picod dbe0412311 Simplify quote handling 2023-10-18 10:38:33 +02:00
Jean-Michel Picod 3b7cec365a Support double-quoted arguments in CLI
When a quoted command argument is seen, it will take all characters
until the next double-quote (no supported escape sequence here for
simplicity).
All white spaces (space, tab, etc.) are then removed from the argument.

This means that the following command should behave the same:
```
pm3> wiegand encode --fc 101 --cn 1337
pm3> wiegand encode --fc "1 0 1" --cn "1    3    3   7"
```

Or a more useful example, when copy/pasting hex formatted values:
```
pm3> hf iclass calcnewkey --old 1122334455667788 --new 2233445566778899
pm3> hf iclass calcnewkey --old "11 22 33 44 55 66 77 88" --new "22 33 44 55 66 77 88 99"
```
2023-10-18 10:27:12 +02:00
iceman1001 d02e8daba0 Changed CLI max string argument length limit from 512 to 4096. data asn1 now handles 2048 hex bytes input 2023-03-12 09:53:23 +01:00
iceman1001 0ba072118e calloc 2022-07-25 08:01:38 +02:00
Philippe Teuwen 34c56c6227 cliparser: Fix codeql warnings 2022-02-27 14:31:07 +01:00
iceman1001 b3731c6003 cppcheck fixes 2022-01-06 18:18:48 +01:00
Philippe Teuwen 88308ea727 typos 2021-10-10 01:35:45 +02:00
Philippe Teuwen 8ce20320b2 Fix segfault on 'rem <verylongline>' 2021-09-04 02:57:16 +02:00
Philippe Teuwen 3c31ee793d make style 2021-07-08 09:53:50 +02:00
Oleg Moiseenko a20db915df Merge branch 'master' into desf_update2 2021-07-06 12:17:31 +03:00
merlokk 20696fb44a make style 2021-07-06 12:16:19 +03:00
merlokk 84eb4e4597 try to fix coverity 2021-07-05 15:35:53 +03:00
merlokk afbd80b906 cliparser CLIGetOptionList 2021-07-05 11:59:07 +03:00
Philippe Teuwen d9fb6991a0 Remove cliparser from make help 2021-05-22 22:54:31 +02:00
Philippe Teuwen 7fbe4063b2 fix for script run & cliparser 2021-04-20 10:24:52 +02:00
iceman1001 26aeae1f3e allow for larger strings (hex) to be input 2021-04-04 14:57:35 +02:00
iceman1001 8573695134 data bin2hex - now uses cliparser\n added a binary string input parser 2021-03-23 11:06:09 +01:00
iceman1001 0067a9b7fa for commands with many params 2021-03-07 18:55:48 +01:00
iceman1001 ea5625c304 chg: cliparse error message unified to pm3 style 2021-01-29 20:35:18 +01:00
iceman1001 fdcc4b741c fix lf em 4x05 write - pwd/data. t55xx chk - now uses cliparser, and color to cliparser empty message 2021-01-27 22:52:08 +01:00
iceman1001 2987fdb187 added warning prefix 2021-01-23 19:08:45 +01:00
iceman1001 ad1f3eae57 added some supprt fct for cliparser, to take a hex byte param and fall back to a default value, or specify how many bytes the param must be 2021-01-11 23:29:49 +01:00
iceman1001 f8c956e4ce less printf 2020-11-13 16:05:02 +01:00
Philippe Teuwen 777cb5a8ce make style 2020-11-02 01:46:47 +01:00
iceman1001 1732242ca4 only convert if there actually was a hexstring 2020-10-21 13:25:29 +02:00
Philippe Teuwen e4aec4d282 Add ISOC99 to cliparser for %zu 2020-10-21 09:59:29 +02:00
iceman1001 be8d2fbd25 add u64_from_hex, no need to use 0x, thanks @mwalker33!\n reverse blocks when cloning for em4305/4469 2020-10-21 08:42:33 +02:00
Philippe Teuwen 29f1147aad make style 2020-10-20 01:00:23 +02:00
iceman1001 c2d5a7d745 cliparser, making sure both hex and string arrays fits into max size of 256 bytes 2020-10-17 16:16:07 +02:00
mwalker33 bb59250eca Cliparser fix
Fix CLIGetStrwithRetrun
Allows casting and requires the buffer length to be passed in.
Existing uses of the function have been updated.
2020-10-17 00:27:14 +02:00
iceman1001 64f9bb5e01 style 2020-10-06 18:00:00 +02:00
Philippe Teuwen 0339667e9e cliparser: ignore extra spaces between options 2020-10-04 20:33:56 +02:00
iceman1001 4f4593d9fa remove debugstatement 2020-10-04 18:54:43 +02:00
iceman1001 166e626c98 add u64_y support in argtable-cliparser. 2020-10-04 17:41:04 +02:00
iceman1001 ad494a152c cliparser returns signed ints, to get unsigned 32 we need to use the double. 2020-10-04 16:13:17 +02:00
Philippe Teuwen aa3d29e6ac CLIParamStrToBuf: add string null terminator 2020-10-04 15:11:36 +02:00
iceman1001 dc9e16a4e1 add some defines to get double 2020-10-04 10:57:21 +02:00
mwalker33 68f0945d48 Update argtable3.c
Remove = when only long option
2020-10-03 20:21:16 +10:00
iceman1001 670e2fb6b0 standard form output (concatenated) 2020-10-03 11:48:52 +02:00
mwalker33 e6398674b0 Cliparser cleanup
Update to remove "=" from help text
update md file, fix typos and better notses for the options.
2020-10-03 19:06:01 +10:00
Philippe Teuwen c3c59e35cb make style 2020-09-30 14:27:19 +02:00
mwalker33 e724204978 cliparser cleanup 2
cmdhf14a.c, cmdhfido.c, cmdhficlass.c, cmdhfmf.c
menu help updates.
cliparser.c : tweak for readability with long examples.
2020-09-30 16:39:08 +10:00