Commit graph

39 commits

Author SHA1 Message Date
pwpiwi fef3084ec2
fix gcc8 compiler warnings on string overflows (#905) 2020-01-03 07:17:21 +01:00
pwpiwi 1f4789fe53
fix 'hf 15 csetuid' (#890)
* fix 'hf 15 csetuid'
* check for error codes, prevent client crash
* some include file refactoring
* some whitespace fixes
* allow longer timeout for write commands
* add function to send EOF only
* modify 'hf list 15' to display "<EOF>"
* add tracing of Reader commands
* if REQ_OPTION is set on write commands, send separate EOF to request tag response
* use #defines instead of hex constants
* switch off field after UID update
* return last tag response (if there is any)
* iso15693: decode WRITE_MULTI_BLOCK in 'hf list 15'
2019-12-20 08:25:14 +01:00
pwpiwi d3bcdbdabf
mod 'hf list' (#881)
* switch to argtable command line parsing (i.e. options must now be preceded by '-')
* add option '-r' to display relative times
* add option '-u' to display times in microseconds
* fix: graceful exit if trace is requested from offline PM3
2019-11-13 18:00:51 +01:00
pwpiwi c41dd5f9f6 fix 'hf iclass reader'
* code deduplication. Use functions from iso15693.c
* speedup CodeIso15693AsReader()
* invert reader command coding. 0 now means 'unmodulated' ( = field on)
* decode SOF only as a valid tag response in Handle15693SamplesFromTag()
* complete decoding of EOF in Handle15693SamplesFromTag()
* determine and write correct times to trace
* FPGA-change: generate shorter frame signal to allow proper sync in StartCountSspClk()
* modify StartCountSspClk() for 16bit SSC transfers
* whitespace in util.c
* add specific LogTrace_ISO15693() with scaled down duration. Modify cmdhflist.c accordingly.
* allow 'hf 15 raw' with single byte commands
* check for buffer overflow, card timeout and single SOF in 'hf 15 raw'
2019-10-21 21:48:08 +02:00
pwpiwi ae60ceca92 fix 'hf iclass sim'
* add simulation of multiple pages (PAGESEL by @sherhannn9)
* maintain cipher states per page
* update cipher state after UPDATE commands (@sherhannn9)
* add simulation of personalization mode
* respond with SOF on HALT
* display "<SOF>" instead of "0f" in 'hf list iclass'
* standard LED handling
2019-10-02 08:20:17 +02:00
pwpiwi 3d2c9c9b06 fix 'hf iclass sim'
* fix debug print on unhandled commands
* deduplicate: use sim functions from iso15693.c
* fix times in tracelog and 'hf list iclass' (sim only)
* don't check parity in 'hf list iclass'
* fix timing in TransmitTo15693Reader()
2019-09-10 08:42:59 +02:00
pwpiwi b8dd1ef649
upgrading 'hf mfu' (#830)
* chg: write new dump file format by @mceloff
* chg: rename 'hf mfu dump' option 'n' to 'f' to align with other commands and RRG repo
* chg: replace ISO14443A_CMD_READBLOCK by MIFARE_CMD_READBLOCK, same for WRITEBLOCK
* fix: mifare_ultra_readblock() returned 14 bytes instead of 16
* chg: param_gethex_ex() now checks maximum output buffer length
* chg: ul_comp_write() was incomplete and for magic testing only
* fix: 16bit ULC counter had been displayed as 32bit
* chg: add check for 7 Byte UID, drop check for ATQA in type identification GetHF14AMfU_Type()
* fix: send HALT instead of dropping field in order to maintain a defined state
* chg: DropField() when command ends
* chg: check for invalid page ranges in 'hf mfu dump'
* fix: print correct lock bits when page range is used
* fix: do not write (incomplete) dumpfile when page range is used
* add: use UID for filename when no filename is given (RRG repo)
* chg: don't clear trace on each ULC authentication, clear trace at beginning of each command
* fix: don't send (DESFire?) deselect command after authentication
2019-06-06 07:33:12 +02:00
pwpiwi a8561e356b
fix hf mf sim (#812)
* fix parity encryption (thanks to Eloff, http://www.proxmark.org/forum/viewtopic.php?id=6347)
* add support to simulate Mifare Mini, Mifare 2K and Mifare 4K
* change to standard LED handling (A: PM is working, B: reader is sending, C: tag is responding, D: HF field is on)
* NAK on unknown commands
* allow unencrypted HALT
* don't display messages during simulation (or we will miss next reader command)
* use DMA to receive reader command
* switch earlier from send to listen mode
* move ADC initializer to iso14443_setup
* remove remainders of incomplete Mifare 10Byte UID simulation
* show 'short' bytes (7Bits or 8Bits without parity) in 'hf list mf' and 'hf list 14a'
* whitespace
2019-04-19 10:22:10 +02:00
Oleg Moiseenko fdd9395d1a Ndef and MAD (#801)
* move mifare stuff to separate folder
* add mad and ndef
2019-03-19 07:51:10 +01:00
pwpiwi 53fb848a0a
add tracing functions (#784)
* add trace buffer for PCSC smartcard readers
* new option 'p' in 'hf list' to select PCSC trace buffer
* 'sc list' now supports PCSC smartcard readers
* add 'hf list 14-4' for ISO 14443-4 protocol
2019-02-16 17:51:04 +01:00
pwpiwi 0d2624a0cc
Add hf list 15 (#754)
and refactoring: move all of hf list code to cmdhflist.c
2019-01-16 09:54:19 +01: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
pwpiwi babca445ff
rework of GetFromBigBuf() (#597)
* this should fix crashes reported in issue #497
* don't allow receiver thread to write directly into arbitrary main thread's memory
* instead use cmdBuffer[] for CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K as well
* add timeout and warning options to GetFromBigBuf(), same as in WaitForResponseTimeoutW()
* move GetFromBigBuf() from data.c to comms.c
* remove data.c and data.h
2018-05-08 07:54:49 +02:00
merlokk 738ed6e476 small fix 2018-02-15 00:20:00 +02:00
merlokk 6dec58aa44 small fix hf list mf 2018-02-15 00:18:02 +02:00
merlokk 079563a092 small fix and added line to changelog. 2018-02-14 12:36:22 +02:00
merlokk 868deeb783 move annotate* functions 2018-02-13 17:14:51 +02:00
merlokk 45b4ac09c9 added hardnested sketch. final cleaning. 2018-02-13 17:07:49 +02:00
merlokk 0113dcf3fd nested works 2018-02-13 15:12:41 +02:00
merlokk 8253ca0e1b code cleaning 2018-02-13 12:35:33 +02:00
merlokk 597fca4ff1 check parity works 2018-02-13 12:33:15 +02:00
merlokk 2d7bdee30b added parity check of deciphered command 2018-02-12 18:53:12 +02:00
Oleg Moiseenko bf52d74adc small fix 2018-02-11 00:45:12 +02:00
Oleg Moiseenko 856da9a1c0 added cipherstream recovery 2018-02-11 00:44:24 +02:00
Oleg Moiseenko e01bc7942c move ks to authdata 2018-02-11 00:40:24 +02:00
Oleg Moiseenko 7bea15816e added some cone in nested. not tested. 2018-02-11 00:28:23 +02:00
Oleg Moiseenko e0158d3373 added destroy 2018-02-10 23:28:15 +02:00
Oleg Moiseenko dca8220f72 mock of key checking 2018-02-10 23:25:28 +02:00
Oleg Moiseenko c6a886fb4f added mock of key check 2018-02-10 23:06:01 +02:00
Oleg Moiseenko 747885a6ed hf list mf 1st auth works 2018-02-10 22:33:32 +02:00
Oleg Moiseenko 28ee794f59 fix appearance 2018-02-10 20:41:56 +02:00
Oleg Moiseenko 7b215d149a correct 1st key calculation 2018-02-10 20:28:30 +02:00
Oleg Moiseenko b957bcd382 added get parity 2018-02-10 19:19:56 +02:00
Oleg Moiseenko a31f7f899b small fix 2018-02-10 19:06:34 +02:00
Oleg Moiseenko aadc6bf1e1 combine all auth data to single struct and fill it 2018-02-10 19:03:29 +02:00
merlokk fb30f5a101 added check reader/tag 2018-02-09 19:40:39 +02:00
merlokk 6c30a244eb added some get auth data 2018-02-09 19:32:17 +02:00
merlokk 6612a5a201 moved some functions and added auth sequence annotation 2018-02-09 18:23:04 +02:00
merlokk 4f131b53ea added cmdhflist file 2018-02-09 17:37:31 +02:00