Commit graph

2169 commits

Author SHA1 Message Date
Fl0-0
a7e1b46d51 Jansson gcc8 fix (#679)
* Fix error in error.c
* Fix error in load.c
2018-09-22 17:51:13 +02:00
pwpiwi
050aa18b13
RDV40 compatibility fixes (#678)
* detect and use RDV40 higher voltage ADC channel for hw tune, hf tune, hw detectreader
* fix mode switching in hw detectreader
* detect Smartcard Slot in hw version
* i2c changes from https://github.com/RfidResearchGroup/proxmark3
* some formatting in proxmark3.h
2018-09-21 08:27:35 +02:00
marshmellow42
2758d83652
Merge pull request #658 from grauerfuchs/master
rework of 'lf hid' commands for better card format handling
2018-09-18 22:23:47 -04:00
marshmellow42
161c40fb52
Merge branch 'master' into master 2018-09-18 22:12:11 -04:00
Oleg Moiseenko
696e863078 added EMV tag #9F6E (#676) 2018-09-18 18:52:41 +02:00
Oleg Moiseenko
556826b5d5 Added loading EMV transaction parameters from json file (#659)
* added default params file
* added jansson
* added test function.
* added tlv tree to function
* add params from json works
* added to `hf emv exec`: load params from json and some refactoring
* added `scan` command
2018-09-18 07:15:34 +02:00
Michael Farrell
82258709f6 Remove unused functions le32toh, le24toh, hextobinstring, binarraytobinstring, print_hex, print_hex_break, sprint_hex_ascii, sprint_ascii, SwapEndian64ex (#667)
* Remove unused method le32toh.
* Delete unused function le24toh
* Remove unused functions hextobinstring, binarraytobinstring
* Remove unused functions print_hex, print_hex_break
* Delete unused functions sprint_hex_ascii, sprint_ascii
* Remove unused function SwapEndian64ex
2018-09-17 08:35:45 +02:00
AntiCat
2dedd5eaec Update changelog and fix build error (#674)
* Update CHANGELOG.md
2018-09-17 07:56:53 +02:00
uhei
b4ba1eeabe fpgaloader: fix function accordingly to #669 (#673)
FpgaSetupSscDma uses uint16_t and not int with #669
2018-09-17 07:55:51 +02:00
pwpiwi
6a5d4e17f4
rework iso14443b device functions including FPGA I/Q signal transfer (#669)
* rework iso14443b device functions
* hf_read_rx_xcorr.v: transfer i/q pair in one 16bit frame
* hi_read_tx.v: invert ssp_dout. When nothing is transferred (ssp_dout=0), this results in no modulation (carrier on)
* adjust arm sources accordingly
* iso14443b.c: switch off carrier after hf 14b sri512read and hf 14b srix4kread
* iso14443b.c: fix DMA circular buffer handling
2018-09-16 00:53:28 +02: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
173ba1e1a2
Merge branch 'master' into master 2018-09-13 21:30:24 -04:00
grauerfuchs
fc7a78f2d1 Changes requested by @marshmellow42
Added CHANGELOG details for new lf hid commands
Restored basic ARM-side decoding of 26-bit and 35-bit cards
2018-09-13 21:05:11 -04:00
grauerfuchs
53e2f2fad1
Correction to Samyrun offline mode
update to Samyrun offline mode to support changes to HID ARM-side commands

This code has not yet been tested
2018-09-13 06:30:26 -04:00
wllm-rbnt
53edb044c0 Allow clean Legic simulation exit without button press (#668) 2018-09-10 18:19:31 +02:00
AntiCat
1b902aa01a Legic Tag Simulator (#666)
* FPGA Hi-Simulate: Formatted code
* FPGA Hi-Simulate: Fixed documantation
* FPGA Hi-Simulate: Freed up 4 LUTs
* FPGA Hi-Simulate: Added 212kHz SSP-Clock option
* Legic: Moved card simulator into separate file & cleaned interface.
Reader and card simulation have almost no common code. Moreover the sim
uses an SSP Clock at 212kHz for all timings to prevent any drifting from
the PRNG. This clock speed is not available in reader simulation mode (SSP
runs at up to 3.4MHz, and changes speed between TX and RX). For these
reasons having the code in separate files makes it significantly cleaner.
* Legic: Implemented RX and TX for card simulation
* Legic: Implemented setup phase for card simulation
* Legic: Implemented read command for card simulation
* Legic: Implemented write command for card simulation
2018-09-09 16:40:20 +02:00
Oleg Moiseenko
6e3d8d671a implement argtable in hf 14a apdu (#490)
* added `hf 14a reader` to source and added functionality to exec empty commands
* added `hf 14a raw`
* added samples to command's help
* added some help
* added changelog
* update to new argtable3 --- https://github.com/argtable/argtable3
* changed included getopt to `https://github.com/freebsd/freebsd/blob/master/include/getopt.h` (getopt from freebsd with simplified BSD license)
2018-09-06 07:48:54 +02:00
Oleg Moiseenko
f3c8131a0d update travis config (#662) 2018-09-06 07:38:38 +02: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
grauerfuchs
18a3bf6119
Merge pull request #9 from Proxmark/master
Pulling in most recent changes in official code tree
2018-08-22 18:57:48 -04:00
marshmellow42
d62f7bad20
Merge pull request #649 from grauerfuchs/master
client: lf hid - parity completed, native long-tag support in pack/unpack/clone
2018-08-22 11:21:50 -04:00
marshmellow42
43591e6464 Add Smartcard functions (RDV4.0) (#646)
* allow common makefile options-defines

* remove non-existing file references

* Uncomment lcd option (still) not enabled by default

use Makefile_Enabled_Options.common
to enable lcd if desired.

* Add Smartcard Functions

* add smartcard to menu + make get atr work

sc is now functioning as far as my limited knowledge takes me

* sc cleanup - add init to all sc commands...

because cmds won't work until the first init happens.  (multiple inits
don't appear to affect it negatively)

* default options to exclude Smartcard

for main repo

* update changelog
2018-08-21 05:08:49 +02:00
AntiCat
f684231796 Legic: fixed write (#655)
Due to an oversight the bytes to be written were fetched
from the wrong location. This is fixed now.
2018-08-21 05:08:06 +02:00
AntiCat
da05bc6eca Legic: rewrite reader to use xcorrelation and precise timing (#654)
* Legic: rewrite reader to use xcorrelation and precise timing
 - Even tough Legic tags transmit just AM, receiving using
   xcorrelation results in a significantly better signal
   quality.
 - Switching from bit bang to a hardware based ssc frees
   up CPU time for other tasks e.g. prng and demodulation
 - Having all times based on a fixed ts, results in perfect
   rwd-tag synchronization without magic +/- calculations.
* hi_read_tx: remove jerry-riged hysteresis based receiver
- This feature got obsolete by a x-correlation based receiver.
* Legic: adjusted sampling to new ssp clock speed
- Sampling is 4 times faster and pipeline daly reduced to 1/4.
 The new code samples each bit earyler to account for the
 shorter pipeline. That introduced bit errors by leeking the
 next bit into the current one.
* Legic: average 8 samples for better noise rejection.
* Update CHANGELOG.md
2018-08-20 22:29:34 +02:00
grauerfuchs
1ee624fe6a Adding native support for HID long-format
Removal of "l" flag for long writes; not needed anymore.
    Added HID Corporate 1000 48-bit format to known formats list
    Simulation not yet updated; need to modify ARM commands to support it
    Completed parity support on all included HID formats
2018-08-19 11:14:52 -04:00
pwpiwi
315e18e66c
ISO15693 device side improvements (#652)
* ISO15693 device side improvements
* increase accuracy by doubling the sample frequency (hi_read_rx_xcorr.v)
* adjust armsrc/iso15693.c and client/cmdhf15.c accordingly
* use more accurate approximation for sqrt(ci^2 + cq^2)
* improve EOF detection (was often mistaken for Logic0, resulting in "error, uneven octet! (extra bits!)")
* hi_read_r_xcorr.v: avoid overflows during accumulation and truncation
* explicitely cast unsigned ADC samples to signed
2018-08-15 14:03:20 +02:00
Oleg Moiseenko
c80eb8ba79 some cards need to have Le=0x00, some need to not have... (#651) 2018-08-14 10:15:51 +02:00
AntiCat
8ff31e935d fix: 32bit tick timer based on TC0 and TC1 (#653)
TC1 counts the number of TC0 overflows (carry bits).
In random conditions TC1 would return or stay at zero,
instead of counting up. This due to the behavior of the
reset signal.

SAM7S Series Datasheet, 33.5.6 Trigger:
Regardless of the trigger used, it will be taken into account
at the following active edge of the selected clock. This means
that the counter value can be read differently from zero just
after a trigger, especially when a low frequency signal is
selected as the clock.

The new code first prepares TC1 and asserts TC1 trigger and
then prepares TC0 and asserts TC0 trigger. The TC0 start-up
will reset TC1.
2018-08-14 09:24:02 +02:00
Fl0-0
6a0915eac2 Bootrom version fix + .gitignore (#645)
* Fix bootrom Makefile

* Add armsrc/fpga_version_info.c to .gitignore
2018-08-07 09:23:11 +02:00
marshmellow42
dfdca20c6c fix option comments to be more clear 2018-08-06 07:39:39 -04:00
marshmellow42
a2937cea8d Separate WITH_LF and WITH_LF_StandAlone 2018-08-06 07:27:37 -04:00
pwpiwi
472345daee
mod hw version: (#631)
* create fpga version info at compile time (by additional functionality in fpgacompress)
* remove hw version caching (prepare USB reconnect)
* fix calculation of available compressed bytes in fpga_loader.c
2018-08-05 18:15:03 +02:00
marshmellow42
5125e4263c allow common makefile options-defines (#635) 2018-08-05 18:13:44 +02:00
marshmellow42
f366aea3e1
Merge pull request #638 from grauerfuchs/master
fix truncation issue on "lf t55 config d"
2018-08-04 07:43:27 -04:00
grauerfuchs
b6a04aff48
fix truncation issue on "lf t55 config" modulation
Fix for issue #637
2018-08-04 06:26:36 -04:00
Michael Farrell
ab20cc35b7 Adds lf hid pack and lf hid unpack offline commands. (#614)
* These are used to pack and unpack the bit length, facility code and card number from "short" HID Prox IDs.
* This also simplifies some repeated code that is used to parse hex digits in lfhid, and adds basic client-side validation to the `lf hid clone` and `lf hid sim` commands, for when an ID that is too long is entered.
* Implements parity checks/calculation for 26-bit H10301 cards.
* Adds links to useful resources for HID Prox cards.
* Adds an explicit warning about the lack of parities on non-26-bit cards.
* Changes all the examples to use 26-bit IDs that have a parity bit set.
2018-07-30 19:33:06 +02:00
pwpiwi
913a54a86a
save 2.3K flash-memory by avoiding a single floating point operation (#630) 2018-07-26 17:18:10 +02:00
Fl0-0
00349d8204 Fix Gcc 8 warnings (#632) 2018-07-26 17:17:11 +02:00
pwpiwi
b2e0ac5d3b fix: array index out of range in mfkeys.log (thanks to @TomHarkness) 2018-07-19 18:01:18 +02:00
Michael Farrell
577b1c27f5 Allow disabling unlink() with -DNO_UNLINK. (#625) 2018-07-09 09:49:03 +02:00
stuiterveer
fdee1ffa84 Ignore DS_Store (#620)
Prevent further commits containing DS_Store files
2018-06-20 06:34:00 +02:00
pwpiwi
44964fd181
Code cleanup (#616)
* coverity fixes (including a real bug in cmdhftopaz.c)
* Typo fix
* replace TRUE/FALSE by stdbool true/false
2018-06-13 08:13:20 +02:00
Michael Farrell
2bb7f7e327 Fixes a double-free issue in CloseProxmark: (#617)
- CloseProxmark now clears global state.

- CloseProxmark now checks for a non-null serial_port before calling uart_close, to avoid unintentional double-free'ing serial_port.

- main now calls CloseProxmark once.
2018-06-04 13:54:41 +02:00
pwpiwi
ad939de501
USB comms: part 4 towards @micolous PR #463
* make uart_communication(), storeCommand() and getCommand() static in comms.c
* move receiver thread creation and respective mutexes to comms.c
* add mutex and signal for tx buffer
* use comms.c for flasher as well
* remove comm functions from client/proxmark3.h
* this completes isolating all USB communication related functions in comms.c
* don't assume a port to be defined by a name. Change parameter in OpenProxmark() to void*
* comms.c: set sp and serial_port_name to NULL when offline
2018-06-03 14:25:20 +02:00
Fl0-0
9b4661c53b Delete .DS_Store (#613)
Mac hidden file accidentally merged in PR #593.
2018-05-29 18:05:32 +02:00
Dominic Celiano
803674b2d6 Added mifarePlus.lua script for communication with Mifare Plus. (#593)
Personalize MifarePlus EV1 cards
2018-05-28 21:32:48 +02:00
marshmellow42
e8924be8ba fix gui (plot) bugs (#604)
G keypress event would cause a crash if no data
Q keypress didn't work.

Thanks to @iceman1001 for identifying and providing the fixes.
2018-05-15 08:19:49 +02:00
pwpiwi
0000a4cda2
fix HitagS simulation erors (issue #605) (#606) 2018-05-11 05:24:02 +02:00