Commit Graph

62 Commits

Author SHA1 Message Date
Jeremy Brown
d440d98d12 Cleaned up follow-up issues 2025-09-19 01:11:46 -04:00
Jeremy Brown
35d2f40ff5 Switched to function for color stings 2025-09-11 11:52:05 -04:00
Philippe Teuwen
af91ddcda9 CLI: Do not execute a command if help is printed
Previously, for example `hf 14a raw -b 7 -d 26 -h` was printing help but it was also executing the command.
2023-11-15 09:44:37 +01:00
Philippe Teuwen
7d851d2a22 reorganize a bit cli to allow autotests 2023-10-24 23:46:34 +02:00
Philippe Teuwen
ece5e79060 typechecking fixes 2023-10-24 23:44:56 +02:00
Philippe Teuwen
d77e166249 pep287 2023-10-24 00:57:44 +02:00
Philippe Teuwen
2beb8f74a3 cli: check if helper tools are available 2023-10-17 22:08:34 +02:00
Philippe Teuwen
43a6e822e6 cli: move color shortcuts to chameleon_util 2023-10-15 01:17:29 +02:00
Philippe Teuwen
f93418b7d8 cli: skip empty lines when several cmd lines are copy/pasted 2023-10-10 10:57:26 +02:00
Philippe Teuwen
61cc4f5891 cli: color help and add epilog example 2023-10-10 01:58:26 +02:00
Philippe Teuwen
b6d2badab4 cli: simplify exit conditions 2023-10-10 00:21:31 +02:00
Philippe Teuwen
4927e0166c cli: one root CLITree, enhance dump_help 2023-10-10 00:17:17 +02:00
Philippe Teuwen
75e368da62 cli: hf mf econfig, hf mfu econfig (wip), fix dumphelp 2023-10-09 21:23:17 +02:00
Philippe Teuwen
2d3538f4c2 cli: add support for after_exec 2023-10-09 00:15:25 +02:00
Philippe Teuwen
be7fad4906 cli: colors shortcuts 2023-10-05 01:09:15 +02:00
Philippe Teuwen
707b0c6d4a Changed CLI help:
- visually closer to pm3 (differenciate groups and commands)
- "dumphelp" allows to quickly dump all cmds and their options
- now all commands support '-h', so e.g. `hw settings store -h` will print help instead of storing
- no more command description in decorator, it is now taken from argparse description
2023-10-05 00:48:50 +02:00
Philippe Teuwen
606ec02e30 Added support for timestamped comments in CLI via rem, ;, % or # 2023-10-01 00:34:18 +02:00
Szymon Borecki
9ee5d3a73e Fix a bug where a KeyboardInterrupt would trigger an error and crash the app 2023-08-26 19:31:35 +02:00
Philippe Teuwen
04741bdc2a autopep8 2023-08-26 12:06:15 +02:00
Philippe Teuwen
d5d955d2e9 pylance 2023-08-26 02:55:46 +02:00
Philippe Teuwen
a596e98bf7 python style 2023-08-26 02:24:08 +02:00
Philippe Teuwen
7ff6a0b3a2 Allow pasting multiple commands at once, as it was with readline 2023-08-25 17:57:12 +02:00
Philippe Teuwen
7f569113a0 CLI check python version 2023-08-24 17:00:05 +02:00
Philippe Teuwen
e43e668594 Remove tabs & spaces at end of lines 2023-08-23 00:18:31 +02:00
Szymon Borecki
4e0494b286 Store CLI history in ~/.chameleon_history 2023-08-21 00:54:36 +02:00
Szymon Borecki
895b0ced12 Merge remote-tracking branch 'origin/main' into cli-overhaul 2023-08-20 01:25:24 +02:00
Philippe Teuwen
8879460e10 Merge branch 'main' into hw-slot-info 2023-08-20 00:11:42 +02:00
Philippe Teuwen
12de4c0e0e Merge pull request #56 from domints/implement-get-slot-data
Implement get slot data
2023-08-20 00:07:46 +02:00
Foxushka
151f412490 Implement new Mifare Classic emulator configuration commands, improve CLI
Slot

Won't work like this

More randomness on nested auth (for hardnested recovery) and change default GCC location

Nobody will have GCC in this default location, /usr/bin/ will target way more users

Get enabled slots command

hw slot list show disabled slots

Improve python code quality

Show Mifare Classic emulator settings in hw slot list

Implement hf mf settings to change Mifare Classic emulator settings

Update
2023-08-19 20:59:39 +03:00
Szymon Borecki
dddc6f1a10 Merge remote-tracking branch 'origin/main' into cli-overhaul 2023-08-19 14:19:40 +02:00
Szymon Borecki
a64be123db Remove the unnecessary readline import and add a shebang 2023-08-19 13:46:32 +02:00
Philippe Teuwen
9db1671be5 Merge pull request #63 from augustozanellato/factory_reset
Add factory reset command
2023-08-19 00:46:39 +02:00
Philippe Teuwen
28572958a7 thinner logo to fit 80col terms 2023-08-19 00:24:29 +02:00
Augusto Zanellato
4ab131d10a Implement wipe fds command used to factory reset 2023-08-18 22:13:06 +02:00
Dominik Szymański
813b12bd37 Implement Mifare Classic emulator slot read 2023-08-18 19:39:05 +02:00
Dominik Szymański
278deda0c6 Merge branch 'main' into implement-get-slot-data 2023-08-18 16:50:38 +02:00
Foxushka
913c1540e3 Implement "hw slot info" to show which tag type loaded into all slots
As suggested by @augustozanellato

Fix input text disapperance in some cases

Show selected slot

Space
2023-08-17 22:40:04 +03:00
Dominik Szymański
85e63d90d9 Merge branch 'main' into implement-get-slot-data 2023-08-17 18:20:58 +02:00
Nemanja Nedeljkovic
0b5290706b Merge 2023-08-17 12:24:52 +02:00
Augusto Zanellato
707136a241 Add settings init, reset and migration logic
Align settings size to uint32_t
Add 78 reserved bits to settings
Use an enum for animation mode
2023-08-16 19:46:41 +02:00
Dominik Szymański
75e319fdd6 Add EM410x slot reading ability 2023-08-16 00:25:02 +02:00
Augusto Zanellato
ee8990aacd fw git version fixes, client support
Fix git version string length handling

Add git to docker fw-builder image

Add git version command to client

Add  client support
2023-08-11 19:46:17 +02:00
Dominik Szymański
85b2fb3d8a Upgrade command parser 2023-08-10 22:59:00 +02:00
Dominik Szymański
f30ff7054c Add animation modes support 2023-08-10 22:26:22 +02:00
Szymon Borecki
0cfdff809f Add command autocompletion 2023-08-10 01:20:22 +02:00
Szymon Borecki
cdf4669d34 Fix KeyboardInterrupt 2023-08-10 01:18:27 +02:00
Szymon Borecki
e2b5b9b960 Use prompt-toolkit and switch to a different command registration system 2023-08-10 00:45:37 +02:00
Szymon Borecki
e9fec48ede Fix docstring for expect_response and rename the associated exception 2023-08-09 23:51:12 +02:00
Szymon Borecki
b8d2853f39 Use consistent naming for command units 2023-08-09 20:00:54 +02:00
iceman1001
6ee34622e8 allow exit/quit with shortcut too 2023-07-29 10:41:17 +02:00