Commit graph

5 commits

Author SHA1 Message Date
grauerfuchs
763d1befc1 Bugfix: Output typing on print of HID card formats (#895)
* Bugfix: Output typing on print of HID card formats

The 'PrintAndLog' calls were using signed types and sometimes too few bits in width for formatting/outputting the data as was revealed in the forums. This commit will correct the printf-formatted output typing on display of the fields.

* Update hidcardformats.c

Updated to use macros as requested by @pwpiwi
2019-12-06 16:06:24 +01:00
grauerfuchs
0d7ee55f9d
Adding new Kastle 32-bit format from @xilni
As approved by @0xFFFF on RfidResearchGroup/proxmark3 and provided by @xilni, this commit adds the format into the official repo as well. As I don't have any of the cards available for testing, I have been unable to personally verify the format encodes/decodes as intended.
2018-09-14 06:32:29 -04:00
grauerfuchs
be59094de9 lf hid improvements - encoding and long tag simulation
**DEVICE FIRMWARE UPDATE**
The code changes needed to support long tag emulation required an update to the device firmware. As of this patch, devices running older firmware will not be able to read or emulate HID tags until the firmware is updated. Additionally, devices with the firmware from this update or newer will not properly read or encode HID tags with a prior version client.

The 'lf hid encode' command has been further refined, and is now entirely parameterized to support use of fields other than facility code and card number. The client help data has been updated to show the correct syntax.
2018-08-30 21:01:21 -04:00
grauerfuchs
5d643cc033 lf hid: Added encode/decode support for Issue Level
Issue Level added to encode/decode support
By default, invalid parity will not show on decode (with option to show)
Added two new 36-bit formats including first format to use issue level
2018-08-28 13:34:21 -04:00
grauerfuchs
b5a5fc4d9f Redesign of lf hid card format handler as discussed with @marshmellow42
The new handler accepts multiple formats of the same length.
Because of this, the existing pack/unpack commands are unsupported
and have been removed and replaced with 'lf hid encode' and 'lf hid decode'.
The decode command will test a packed Prox ID against all programmed
formats and return results for all matching formats.
The encode command takes the parameter of format name instead of
bit length (as per the old pack command). Additionally, an 'lf hid write'
command has been added as a single-command combination of encode and clone.

To support easier addition of new formats, a library for handling card
fields has been added. This will allow direct access to the card bits,
to linear fields, and to non-linear (jumping) fields in a single line
of code without having to resort to managing bit positions or masks
on the underlying data. A number of new formats have been added as working
examples of the new support functions.
2018-08-27 14:03:46 -04:00