Commit graph

2413 commits

Author SHA1 Message Date
pwpiwi
6116334485
Merge pull request #969 from pwpiwi/gcc10_fixes
Gcc10 fixes
2021-03-30 08:59:58 +02:00
pwpiwi
cbecb8a209 gcc10 compiler fixes:
- Check for availability of getenv_s() in argtable3.c
2021-03-18 08:25:16 +01:00
pwpiwi
d3f8d76d6c Fix gcc10 compiler warnings
- update argtable3 to latest versions
2021-03-18 08:23:17 +01:00
pwpiwi
8ac5d5cba1 Fix gcc10 compiler warnings
- fix attribute format for MINGW in tinycbor/cbor.h
- add pragma to prevent "unaligned pointer" warning in cmddata.c. We know what we are doing there.
- whitespace fixes
2021-01-29 08:26:33 +01:00
pwpiwi
ad326d84ad Fix gcc 10 link issues
- avoid linker error by providing string.[ch] in bootrom
2021-01-28 09:00:08 +01:00
pwpiwi
555fa19773
Cleanup armsrc/string.c and string.h (#964)
- remove unnecessary memxor(), strreverse(), and itoa() functions
- Use correct types in function declarations and definitions
- add memmove() function. Gcc may generate calls to memcmp(), memcpy(), memset() and memmove()
2021-01-25 09:27:38 +01:00
pwpiwi
efd0327132
Avoid link error due to duplicate definition of blocknr in hitag.c and hitagS.c (#963) 2021-01-25 09:26:27 +01:00
pwpiwi
622dd1af3b
Merge pull request #938 from pwpiwi/fix_printf_scanf
Fix some printf/scanf format strings
2021-01-22 17:34:42 +01:00
Iceman
e6158a48ec
Update README.md
added link to Proxmark3 community discord server
2020-07-29 17:33:56 +02:00
pwpiwi
4b27ca5cf6
Merge pull request #943 from dgorbunov/patch-1
Compile Error: Add string.h to ui.c
2020-07-14 09:00:27 +02:00
Daniel Gorbunov
79d9ddc584
Add string.h
Failed to compile without this line on MacOS Big Sur Beta.
2020-07-12 10:13:15 -04:00
pwpiwi
98a67bc908 Fix some printf/scanf format strings 2020-05-11 14:46:22 +02:00
pwpiwi
ebf1404a81
Merge pull request #926 from pwpiwi/fix_iso15693_fpga
* make fpga_version_info.c phony and delete it on 'make clean'
* wait for transfer to complete before returning from FpgaSendCommand()
* log correct tag times in iclass simulation
* shorten pulse from TC1 to TC0 in StartCountSspClk()
* shorten ssp_frame pulse in fpga/hi_reader.v
* some reformatting and whitespace fixes
* NOISE_THRESHOLD /= 2 (starting with c41dd5f it became a relative threshold)
* remove superfluous reader initialization
2020-04-11 08:56:14 +02:00
pwpiwi
c85805b8a2
update CI/.travis.yml (#929)
* drop checks for MacOS 10.11 and 10.12
* add checks for Ubuntu 16.04 and 18.04
* add libnewlib-arm-none-eabi as prerequisite on Ubuntu
2020-04-09 09:19:25 +02:00
pwpiwi
852ecedc16
compatibility fix: get_clocktime() is not always available 2020-04-07 09:04:47 +02:00
pwpiwi
6792435739 fixing iso15693
* NOISE_THRESHOLD /= 2 (starting with c41dd5f it became a relative threshold)
* remove superfluous reader initialization
2020-04-03 17:42:38 +02:00
pwpiwi
f66d28afcc Merge branch 'master' into fix_iso15693_fpga 2020-03-31 08:55:35 +02:00
pwpiwi
7a53739728 fixing some fpga and iclass issues
* make fpga_version_info.c phony and delete it on 'make clean'
* wait for transfer to complete before returning from FpgaSendCommand()
* log correct tag times in iclass simulation
* shorten pulse from TC1 to TC0 in StartCountSspClk()
* shorten ssp_frame pulse in fpga/hi_reader.v
* some reformatting and whitespace fixes
2020-03-31 08:39:16 +02:00
pwpiwi
5bc3841ad1
fix 'hf mf perso' result feedback (#920) 2020-03-16 13:33:19 +01:00
pwpiwi
aa8ff592ae
add a specific check function for static nonces (used in 'hf mf nested') (#911)
* add a specific check function for static nonces in 'hf mf nested'
* uses a fixed nr_enc and does all the crypto operations on client
* for all possible keys calculate par_enc and ar_enc and send them to device
* CHANGELOG update
2020-03-16 13:32:00 +01:00
pwpiwi
bedae7768c
Merge pull request #913 from 0x2b3bfa0/patch-1
Fix #912: ukbhit() false positive
2020-02-13 08:37:17 +01:00
Helio Machado
8f831ceb0b Fix #912 2020-02-09 18:04:46 +01:00
pwpiwi
d6e1d48284
Merge pull request #910 from pwpiwi/small_USB_response
Improve USB communications
2020-02-06 21:49:15 +01:00
pwpiwi
df7b80fecc fix WaitForResponse (without timeout) 2020-02-06 07:59:18 +01:00
pwpiwi
01aa068b6f reenable intermediate "Waiting for a response from the proxmark..." message 2020-02-04 08:21:17 +01:00
pwpiwi
3458bb279b replace msleep() by thread signalling in comms.c 2020-01-27 14:55:40 -05:00
pwpiwi
d2ca5dbfe8 uart_posix.c rework
* added some LED handling in appmain.c (helped with debugging)
* finally replaced the infamous device unlink by msleep(1000)
* fixed some format strings in comms.c (with -DCOMMS_DEBUG)
* made uart_receive() and uart_send() behave as described in header
* some formating
2020-01-27 14:14:40 -05:00
pwpiwi
fd66752193 cleaning up uart_posix.c
* whitespace fixes
* sorting out #includes
2020-01-24 03:24:39 -05:00
pwpiwi
ac37ee816b Add missing includes 2020-01-23 17:02:33 -05:00
pwpiwi
929b61c670 Always enable fast response mode (was enabled for flasher only)
* ensure that CMD_ACK is used exclusively for the very last response of each PM3 operation. All Dbprintf() must be before.
* always switch off field before exiting
* append null packet for USB transfers % 64 bytes
* reformatting and whitespace fixes
2020-01-23 22:18:51 +01:00
pwpiwi
b8ed9975e5 modify USB communications
* use different data types for commands and responses
* use variable length responses
* maintain client/flasher compatibility with old format (e.g. when using old bootloader)
* maintain bootloader compatibility with old format (e.g. when using old or RRG flasher.exe)
* fix length of version string in appmain.c
2020-01-17 09:31:14 +01:00
pwpiwi
867e10a5fd usb communication (device side) refactoring
* merge cmd.c into usb_cdc.c
* move back usb_cdc.[ch] to common/
* declare low level functions usb_read() and usb_write() and more functions as static
* use cmd_receive() in bootrom.c and appmain.c
* remove unused memory wasting csrTab[100] in usb_cdc.c
* replace more byte_t by uint8_t
* more whitespace fixes
2020-01-15 18:49:28 +01:00
pwpiwi
72622d6429 usb communication (device side) housekeeping
* move cmd.[ch] and usb_cdc.[ch] to armsrc
* sorting out #includes
* replace byte_t by uint8_t
* some reformatting
* whitespace fixes
* (no functional changes)
2020-01-15 18:46:09 +01:00
pwpiwi
d00a30d56f
Merge pull request #909 from pwpiwi/fix_button_break
Fix "Sending bytes to proxmark failed" with BUTTON_PRESS()
2020-01-15 18:31:56 +01:00
pwpiwi
6b34699adc fix "Sending bytes to proxmark failed" after BUTTON_PRESS() 2020-01-10 08:45:45 +01:00
pwpiwi
1d04b933df appmain.c cleanup
* reformatting
* whitespace fixes
* replace byte_t by uint8_t
2020-01-10 08:21:07 +01:00
pwpiwi
a749b1e58b
speedup 'hf mf chk' (#901)
* add separate timeout for tag response to nr_ar
* measure response time and use it for response timeout
* don't drop field between keyblocks
* some reformatting
* some whitespace fixes
* fishing for microseconds in TransmitFor14443a()
* allow arbitrary number of keys in MifareChkKeys()
* and move progress printing to MifareChkKeys()

Co-authored-by: uzlonewolf <github_com@hacker-nin.com>
2020-01-09 15:42:31 +01:00
pwpiwi
f0c48553cb
fix hf search (#908)
* fix memory access violation in HF14B_Other_Reader()
2020-01-07 22:33:55 +01:00
pwpiwi
fef3084ec2
fix gcc8 compiler warnings on string overflows (#905) 2020-01-03 07:17:21 +01:00
pwpiwi
a4ff62be63
fix 'hf iclass writebl' and 'hf iclass clone' (#896)
* check for correct responses after block updates
* reduce number of tries from 10 to 3
* Allow to override warning on attempt to clone blocks < 5
* add same warning and override option to 'hf iclass writebl'
* some reformatting and minor refactoring
* Drop field after dump and clone functions
* If dumping AA1 with Credit Key, authenticate as Debit Key
* Initialize reader when beginning to clone
2019-12-28 17:03:20 +01:00
Phil
1d4b67cb3d "hf mf ekeyprn d" doesn't works properly (#904)
FIX: command "hf mf ekeyprn  d" doesn't use the correct offset to locate the A key in data[] array and record the 2 last bytes followed by 4 0x00 instead of the 6 good bytes (All the A keys are corrupted in file dumpkeys.bin). B keys are not affected.
2019-12-28 14:04:46 +01:00
uzlonewolf
5a03ea993f Nested loop fix for static nonces
* add detection of static tag nonces
* add tag nonce to error message
* modify mfCheckKeys() to pass button press events upstream
* don't abort nested when a static nonce is encountered
* modify nested to try multiple keys in a single operation
* Print keys remaining only every 10 seconds, and add estimated worst-case time
2019-12-23 16:08:23 +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
e73c9f1bd4
fix 'hf iclass chk' (#894)
* Check for Credidt Keys as well
* reduce authentication tries from 6 to 3
* correct text in 'hf iclass clone' for 'l' parameter
* some reformatting and whitespace fixes
2019-12-09 08:27:42 +01:00
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
pwpiwi
28ae37b746
fix 'hf iclass replay' (#888)
* implement option -n for authentication with replayed NR/MAC pairs in 'dump' and 'readbl'
* delete 'hf iclass replay'
2019-12-04 18:34:53 +01:00
pwpiwi
00848e096b
Hitag fixes (#887)
* don't display error message during 'lf search' when no Hitag tag is present
* remove superfluous options in 'lf hitag read'
* fix setting of default threshold when selecting FPGA_CMD_SET_EDGE_DETECT_THRESHOLD major mode
* some refactoring
2019-11-25 08:38:23 +01:00
pwpiwi
e938f71011
Merge pull request #884 from pwpiwi/fix_iclass_snoop
* determine and write meaningful times into trace
* code deduplication: use ISO15693 snoop function
* speed up SnoopIso15693(), reduce DMA buffer size
* add jamming option '-j' to 'hf iclass snoop'
* fix issue #882
* whitespace fixes
* make room for one more bit for FPGA minor mode
* new mode FPGA_HF_READER_MODE_SEND_JAM
* implement jamming in Handle15693SampleFromReader
2019-11-19 18:11:26 +01:00
pwpiwi
cd028159be implement 'hf iclass snoop -j'
* fix long option --jam
* make room for one more bit for FPGA minor mode
* new mode FPGA_HF_READER_MODE_SEND_JAM
* implement jamming in Handle15693SampleFromReader
2019-11-13 18:03:40 +01:00
pwpiwi
be09ea8603 fix 'hf iclass snoop'
* code deduplication: use ISO15693 snoop function
* speed up SnoopIso15693(), reduce DMA buffer size
* add jamming option '-j' to 'hf iclass snoop'
* fix issue #882
* whitespace fixes
2019-11-13 18:03:39 +01:00