Jean-Michel Picod
6c402791f1
Fix comma instead of semicolon
2025-06-27 12:04:27 +02:00
Jean-Michel Picod
3625ee318a
Fix SEGV in cmdhf15 due to argtable size being miscomputed
2025-06-27 11:57:26 +02:00
Jean-Michel Picod
f06c2fafbe
Fix compilation under termux
2025-06-16 11:52:08 +02:00
Jean-Michel Picod
e77fbc092c
Apply same logic to hf mf fchk
2025-03-21 18:14:11 +01:00
Jean-Michel Picod
c5fcb97bc1
changelog
2025-03-21 18:06:48 +01:00
Jean-Michel Picod
95e5634388
Add option to use SPI flash dictionary for autopwn
2025-03-21 18:05:14 +01:00
Jean-Michel Picod
d5a1248862
Fix wiegand InnerRange56
2025-03-05 17:25:45 +01:00
Jean-Michel Picod
e836e4bda3
Simplify code and parity
2025-02-20 09:38:32 +01:00
Jean-Michel Picod
c505f57b3b
Add support for proprietary 46bit wiegand H800002 format
2025-02-19 12:13:17 +01:00
Jean-Michel Picod
43f6d0bcfd
Fix potential overflow in readblock
2024-11-04 12:22:50 +01:00
Jean-Michel Picod
ae1de2c6c8
Start fixing legic script to work with lu5.4
2024-11-04 12:18:37 +01:00
Jean-Michel Picod
68734f4191
Fix some PRI* macro usage.
2024-11-04 11:31:30 +01:00
Jean-Michel Picod
a0214f12d4
Move all integer printing to use PRI* macros
...
Hopefully will make CodeQL happy this time.
2024-11-04 11:21:53 +01:00
Jean-Michel Picod
b02c6ece26
Fix confusion between base10 and base16 identifiers
2024-11-04 10:00:29 +01:00
Jean-Michel Picod
bb30b9dc8b
Make CodeQL happy
2024-11-04 09:52:44 +01:00
Jean-Michel Picod
1dbfb7b3a3
Correctly parse extended length (MistialDev's card)
2024-11-04 09:52:44 +01:00
Jean-Michel Picod
2094f5f92b
Print LUA and Python interpreter versions
2024-09-20 17:44:09 +02:00
Jean-Michel Picod
59f9272993
Silly gitignore file
2024-09-20 17:39:30 +02:00
Jean-Michel Picod
8a4a6da287
Add missing file which was gitingore'd
2024-09-20 17:32:18 +02:00
Jean-Michel Picod
9cd810d2ba
Update changelog
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
0c116f5517
Add the old bit32 LUA module as a compatiblity shim.
...
Many exisiting LUA scripts are using bit32 which has been removed
in LUA5.4 in favor of native language support of bitwise operations.
Yet, it's easier to backport this module rather than patching all the
existing LUA scripts because most of them can't be tested.
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
22658097a7
Make the scripting code compatible with LUA 5.4
...
There's no unsigned anymore, just integers.
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
ad65b41aa7
Update SWIG wrapper
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
d616439618
Funtion unpack moved to table.unpack in LUA 5.3+
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
0421f5fde5
Update dkjson to a more recent version supporting utf-8 too
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
fa949538ce
Ansicolors was a LUA5.1 module. Move it to LUA5.2+ module style.
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
18e3600d95
Update build and CI scripts to LUA 5.4
2024-09-20 17:21:17 +02:00
Jean-Michel Picod
0fcc3107b0
Bump LUA version from 5.2 to 5.4
2024-09-20 17:21:16 +02:00
Jean-Michel Picod
6d69a2c560
Fix out-of-bound reading in parity
2024-08-20 12:09:59 +02:00
Jean-Michel Picod
06203a8c5f
Fix invalid Wiegand format flags.
...
Some formats were declared with not adequate flags resulting in
the format being filtered out for encoding/decoding unless explictly
setting it.
2024-07-09 14:02:20 +02:00
Jean-Michel Picod
4124dcdce9
Fix a few mistaked in Wiegand encodings
2024-07-04 12:02:32 +02:00
Jean-Michel Picod
c08e26ca26
Add alternative chip ID
2023-11-01 10:40:53 +01:00
Jean-Michel Picod
dbe0412311
Simplify quote handling
2023-10-18 10:38:33 +02:00
Jean-Michel Picod
238faaf226
Add entry to CHANGELOG.md
2023-10-18 10:32:18 +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
Jean-Michel Picod
8cc7022604
Remove compilation error.
...
Function is already declared (non-static) in armsrc.
Compiler was complaining about re-defining a non-static func by a static
one.
2023-10-17 19:33:59 +02:00
Jean-Michel Picod
ce45b3b242
Fix potential stack overflow while making it easier to support more ATRs
2023-10-17 19:05:57 +02:00
Jean-Michel Picod
45b710dc0a
changelog
2023-06-14 16:42:11 +02:00
Jean-Michel Picod
d9ed07c77c
Missed one line for LegicCash uid
2023-06-14 16:41:42 +02:00
Jean-Michel Picod
fdd85d7e1e
Fix LegicCash segment CRC computation
2023-06-14 16:41:42 +02:00
Jean-Michel Picod
5a2c6406d8
Allow current directory to import python libraries
...
also fixed a bunch of wrong comments.
2023-02-13 21:58:34 +01:00
Jean-Michel Picod
8be70ea560
Fix minor bugs in hf tesla info
2023-01-30 23:27:17 +01:00
Jean-Michel Picod
86d26f9464
Fix uninitialised stack-based buffers
2023-01-26 01:13:27 +01:00
Jean-Michel Picod
3a7af55724
Fix python initialization to have SWIG work
2023-01-16 19:57:42 +01:00
Jean-Michel Picod
16410b064d
Fix format string to please CodeQL
2023-01-06 22:06:07 +01:00
Jean-Michel Picod
a7980d8e8a
Use a typed constant and see if that makes CodeQL happy :)
2023-01-06 21:52:26 +01:00
Jean-Michel Picod
15b541c2ea
Add command piv authsign
2023-01-06 21:36:08 +01:00
Jean-Michel Picod
e5f6e34632
changelog
2023-01-06 21:25:48 +01:00
Jean-Michel Picod
efc685864a
Add PIV command to scan all data containers on a PIV card.
2023-01-06 21:23:22 +01:00
Jean-Michel Picod
e9d461947e
Add changelog and fix my github handle
2023-01-06 18:31:12 +01:00
Jean-Michel Picod
663fd4efc9
Remove unused error code.
...
Will be added back for the PIN check command
2023-01-06 18:28:53 +01:00
Jean-Michel Picod
6e084d82d5
First two PIV commands
2023-01-06 18:19:31 +01:00
Jean-Michel Picod
80a4698a7f
Initial rework on TLV to avoid mem leaks
2023-01-06 13:03:10 +01:00
Jean-Michel Picod
4375f5b91e
Avoid memory leaks with Python <3.10
2022-12-20 15:32:38 +01:00
Jean-Michel Picod
0083e0ae13
Fix embedded python not working with Proxspace.
2022-12-09 21:58:28 +01:00
Jean-Michel Picod
f32de52b46
Wait a bit longer for the smartcard.
...
For the max 256-byte frame, SIM wasn't ready early enough, corrupting
the reception buffer with 5 spurious bytes.
Empirically, 109 clock cycles is the minimum value that worked.
Adding 1 clock cycle as a safety buffer.
2022-12-09 13:32:17 +01:00
Jean-Michel Picod
b487961cbd
Moved to non-deprecated API to init Python intepreter
2022-12-06 18:07:10 +01:00
Jean-Michel Picod
5bd6379b5b
Move message to debug
2022-12-05 22:05:23 +01:00
Jean-Michel Picod
07a8f7a6de
Raise the buffer size even more.
...
I was too conservative as it requires 261 bytes. Let's put 270 for the
peace of mind.
2022-12-05 22:05:15 +01:00
Jean-Michel Picod
c23c2b2aef
Rollback the firmware part
2022-12-05 20:05:28 +01:00
Jean-Michel Picod
ba27eb03e0
Update CHANGELOG
2022-12-05 19:42:23 +01:00
Jean-Michel Picod
83e6b223c4
Adapt ARM code to comply with SIM module firmware 4.12
2022-12-05 19:35:11 +01:00
Jean-Michel Picod
89702a4e6e
Add SIM module firmware 4.12 from Sentinel
2022-12-05 19:33:41 +01:00
Jean-Michel Picod
c2aed7900c
Temporary fix buffer overflow until new SIM firmware is released
2022-12-05 16:53:59 +01:00
Jean-Michel Picod
b70320d47d
Fixing some ISO7816-4 logic.
...
- Fixing overflow in BigBuffer if requesting to much data
- Fixing integer wrapping with the SIM module by capping APDU data
length
- Fixing chaining logic which was loosing previously received data
2022-12-05 10:54:38 +01:00
Jean-Michel Picod
8da4da6aa5
Also update comment about total size for Mifare keys storage.
2022-11-24 09:40:34 +01:00
Jean-Michel Picod
5bf0200b02
Update CHANGELOG.md
2022-11-24 09:37:02 +01:00
Jean-Michel Picod
ba83c26c1e
Add one more sector for Mifare keys on SPI flash.
...
This is a breaking change and after firmware upgrade, dictionnaries
should be loaded into flash again to ensure they're valid.
2022-11-24 09:35:22 +01:00
Jean-Michel Picod
1adec4dfb2
Fix overflow in SPI memory when writing default key dictionnaries.
...
Boundaries were defined in the memory layout but weren't enforced
by the client, causing an overflow when trying to load a
dictionnary that was too big.
It's too hard to enforce it on the ARM side as the command is a
generic write.
Now that limits are defined, also outputs them as part of the
`hw status` command.
2022-11-24 03:16:58 +01:00
Jean-Michel Picod
32d47cb6a4
Fix prolematic return codes in mifare.
...
Parts of the code returned positive values for error codes, which
could result in the client exiting (return value 2).
2022-11-04 11:06:59 +01:00
Jean-Michel Picod
b768f8e1a3
Fix comment and unreachable boundary.
2022-10-31 20:28:35 +01:00
Jean-Michel Picod
cee55d43ee
Modified logic to also try key B on MF cards.
...
In configurations where keyA is unknown but ACLs are configured to allow
all blocks to be read by keyB the command `hf mf dump` was failing.
This commit attempts to fix this behavior by trying keyA first and
swapping for keyB if half of the allowed tries failed.
2022-10-31 20:13:09 +01:00