Commit graph

54 commits

Author SHA1 Message Date
Ave f1146d360f
Introduce compatible write support to hf mfu wrbl 2020-09-07 22:34:44 +03:00
Philippe Teuwen 026707b960 arm: fix prototypes 2020-05-11 13:48:57 +02:00
Philippe Teuwen d19754567d summer restructuring:
* .h include only the strict minimum for their own parsing
  * this forces all files to include explicitment their needs and not count on far streched dependencies
  * this helps Makefile to rebuild only the minimum
  * according to this rule, most standalone .h are now gone
  * big app.h is gone
  * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway
* all unrequired include were removed
* split common/ into common/ (client+arm) and common_arm/ (os+bootloader)
  * bring zlib to common/
  * bring stuff not really/not yet used in common back to armsrc/ or client/
  * bring liblua into client/
  * bring uart into client/
  * move some portions of code around (dbprint, protocols,...)
* rename unused files into *_disabled.[ch] to make it explicit
* rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash
* remove PrintAndLogDevice
* move deprecated-hid-flasher from client to tools
* Makefiles
  * treat deps in armsrc/ as in client/
  * client: stop on warning (-Werror), same as for armsrc/

Tested on:

* all standalone modes
* Linux
2019-08-11 21:42:01 +02:00
iceman1001 53f2058c7a chf: hf mf eget\nhf mf eset\nhf mf eclr - uses NG 2019-05-27 07:46:27 -04:00
Philippe Teuwen a91d0a7b19 Smart color handling:
* if on Windows, no color, as usual
* if on Linux, color only on real term
  * no color when > foo
  * no color in the logfile
2019-04-30 00:41:52 +02:00
Philippe Teuwen 9602e641e2 Merge branch 'master' into experimental_varlen
* master:
  translation
  document offsets
  textual
  textual
  typo
  'hf mf sim' full-byte anti-collision frame support
2019-04-22 21:39:38 +02:00
Eloff 960b21793c 'hf mf sim' full-byte anti-collision frame support 2019-04-18 21:02:48 +03:00
Philippe Teuwen 4eaa2fc5aa move common util fcts to /common to avoid common files (e.g. crc) to depend on non-common files 2019-04-16 23:02:40 +02:00
iceman1001 6c1b8f809e chg: update armside debug to fit with offical repo. 2019-04-10 08:42:00 +02:00
iceman1001 ac88c435f6 remove old iso14443crc.c, fully replaced by crc16.c functions. 2019-04-09 10:12:15 +02:00
McEloff 4588384587
Merge branch 'master' into temp 2019-04-08 10:26:30 +03:00
iceman1001 593202867a remove include 2019-04-07 10:56:35 +02:00
Philippe Teuwen ebdfba033d arg names 2019-04-06 20:35:58 +02:00
Eloff 791ff18381 'hf mf sim' - bugs fix, refactoring 2019-04-05 00:15:55 +03:00
vratiskol 8f11fcc193 Remove FLAG_RANDOM_NONCE 2019-03-27 22:35:11 +01:00
vratiskol a068f7c2bc Mifare Sim
Compilation OK
Emulation 1k OK with android
2019-03-27 14:18:26 +01:00
vratiskol 64c3ae8b34 hf mf sim 2019-03-15 21:04:25 +01:00
Philippe Teuwen 0373696662 make style 2019-03-10 00:00:59 +01:00
Philippe Teuwen 8a7c6825b5 armsrc: fix mix of spaces & tabs 2019-03-09 20:34:41 +01:00
Philippe Teuwen 60f292b18e remove spurious spaces & tabs at end of lines 2019-03-09 08:59:13 +01:00
Philippe Teuwen edc19f202a Convert the few files with still Windows carriage returns 2019-03-09 08:49:41 +01:00
iceman1001 f906cb7f89 chg: 'hf mf sim' @piwi's changes part 1 2017-11-11 22:41:52 +01:00
iceman1001 b3f787a64f fixes: armside 2017-07-30 10:01:30 +02:00
iceman1001 e99acd00cc CHG: the mifare Auth command can make use of a random nonce aswell.
CHG: since sim commands are timing critical, I'm testing a smaller prand prng function from Intel
2017-01-29 10:41:48 +01:00
iceman1001 53d5dc643f CHG: fiddled with the headerfiles... and makefile... Tried to make them behave nice. So it isnt a hell to add new functions from third-party (like des, aes etc)
Added a lot of #ifndef ,   extern C,
Move inside from ARMSRC -> THUMBS,  which made the compiled image smaller.. I don't know if it broke anything.
Moved MF_DBGLEVEL definitions into common.h
Moved print_result from util.c into appmain.c
Also split up some struct typedef  into header files so they could be reused in other code places.

''' danger '''  this might have broken stuff...
2017-01-25 00:33:03 +01:00
iceman1001 405944a0ac CHG: moved to header file 2017-01-21 10:31:54 +01:00
iceman1001 c981c53ff3 MOV: moved the #DEFINES into protocols.h 2016-04-14 11:34:36 +02:00
iceman1001 c2731f37be CHG: a major remake of the "hf mf c*" commands. Ie chinese magic tags. Tried to make them consistent in parameter calls and simplified. And fixed the annoying gen1 tags that answers with a ACK/NACK on HALT commands.. 2015-11-09 21:46:15 +01:00
iceman1001 0de8e3874d A lot of changes...
.. ntag simulation stuff from @marshmellows branch "ntag/sim"
.. hf mf mifare fixes from @pwpivi.
.. hw status command
.. speedtest function from @pwpivi
.. Viking Functionalities,   (not a proper DEMOD, but a start)
.. GetCountUS  better precision from @pwpivi
.. bin2hex,  hex2bin  from @holiman

...
starting with getting the T55x7 CONFIGURATION_BLOCK for different clone situations. Ripped from Adam Lauries RFidler,   nothing working or finished..
...
Started working with the T55x7 read command with password actually performs a write block...  See Issue #136  https://github.com/Proxmark/proxmark3/issues/136    Not solved yet.

...
Started add SHA256..   not working yet..
2015-10-04 18:01:33 +02:00
iceman1001 7838f4beba MERGED: @holimans changes
MERGED: @piwi changes
MERGED: @marshmellows changes.

I'm not even gonna try write up all that stuff..

ADD: changed some commands inside the "Hf 14a sim" on deviceside.
ADD: @mobeius "two nonce" version for mfkey32.   It is also inside the "hf 14a sim" with the "x" parameter.
2015-07-22 23:00:52 +02:00
iceman1001 2d2f7d1948 ADD: @marshmellow42 's changes / fixes. 2015-05-31 21:47:33 +02:00
iceman1001 95aeb706d7 CHG: @marshmellow42 changes on deviceside.
ADD: increase debuglevel for printing a statment in ul_ev1_auth
2015-05-27 23:23:46 +02:00
iceman1001 bcf61bd34a Merge branch 'master' of https://github.com/Proxmark/proxmark3
Conflicts:
	README.txt
	armsrc/appmain.c
	armsrc/apps.h
	armsrc/des.c
	armsrc/iclass.c
	armsrc/mifarecmd.c
	armsrc/mifareutil.c
	armsrc/mifareutil.h
	client/cmddata.c
	client/cmdhf.c
	client/cmdhf14a.c
	client/cmdhficlass.c
	client/cmdhfmfu.c
	client/cmdhfmfu.h
	client/cmdscript.c
	client/lualibs/commands.lua
	client/lualibs/html_dumplib.lua
	client/scripting.c
	client/util.c
	common/protocols.h
	include/usb_cmd.h
2015-05-23 08:16:40 +02:00
marshmellow42 8258f40969 Iceman1001 s MFU clean up
cleaned up MF UL_C auth code device side.
2015-05-17 20:49:25 -04:00
iceman1001 4d2e4eea58 CHG: the "HF MFU" authentication changes.
CHG: name change from "hf 14a snoop"  ->  "hf 14a sniff"..
2015-05-16 15:34:01 +02:00
marshmellow42 cceabb79e6 mfu info / dump attempt at missing auths
NOT TESTED.  will test soon.  probably has bugs!
2015-05-16 01:00:31 -04:00
marshmellow42 f168b2633b MF Ultralight - Iceman's updates + mine
Beginning of Ultralight additions.
detection of Ultralight Types added
dump command now auto detects type
can authenticate Ultralight C
2015-04-29 18:27:31 -04:00
iceman1001 aa60d1560e NEW: HF MFU SETPWD - set password to a Ultralight C tag.
NEW: HF MFU SETUID - set UID to a magic UL / UL-C tag.   *not implemented*
CHG: minor alignment for "Hf list" output.
CHG: removed unneeded function parameters to the ultralight commands
CHG: the const MAX_MIFARE_FRAME_SIZE is changed to MAX_FRAME_SIZE in the ultralight commands since the UL-Ev1 can have bigger frames than 18bytes.
CHG: adding DES support for the Ultralight-c read commands on deviceside.
2015-03-30 16:24:03 +02:00
pwpiwi f71f4deb8f BigBuf and tracing rework: allow much longer traces in in hf commands
- provided a BigBuf_malloc() function to dynamically allocate parts of BigBuf
  e.g. for DMA-Buffers, Frame-Buffers, Emulator-Memory
- the whole rest of BigBuf is now available for traces (instead of a small fixed amount)
- send actual traceLen together with trace data
- changed client side to cope with varying traceLen
- changed small buffers to automatic variables instead of parts of BigBuf
2015-01-28 07:18:51 +01:00
iceman1001 c8b6da2295 Merge branch 'master' of https://github.com/holiman/proxmark3
Conflicts:
	armsrc/appmain.c
	armsrc/apps.h

Step 1 for the Ultralight / Ultralight-c
2015-01-20 20:59:24 +01:00
iceman1001 a631936e84 ADD: Midnitesnaks's & Pentura labs Ultralight-c modifications in ARMSRC.
ADD:  des.c  ,  aes.c  in ARMSRC
2015-01-13 23:18:04 +01:00
pwpiwi 6a1f2d82bb bugfixes iso14443a (hf 14a commands)
- buffers were too small to handle 256 byte frames
- parity bits were only handled for up to 32 byte frames
- trace format was inefficient
- removed parity calculation from decoders in iclass.c (parity not used on air anyway)
2014-12-16 07:41:07 +01:00
pwpiwi baeaf57950 fix/add support for 4K (and other non 1K) card sizes in hf mf commands
- hf mf rdsc (fix): didn't account for 16 block sectors, allowed max sector 63 instead of 39
- hf mf ecfill (add): added (optional) card size parameter and support for non 1K cards
- hf mf dump (add): added (optional) card size parameter and support for non 1K cards
- hf mf dump (fix): Access Condition 011 not handled correctly (tried to access with key A)
- hf mf restore (add): added (optional) card size parameter and support for non 1K cards
- hf mf nested (fix): didn't account for 16 block sectors, allowed max sector 63 instead of 39
- hf mf nested (fix): always dumped 16 keys to dumpkeys.bin instead of correct number
- hf mf chk (fix): always dumped 16 keys to dumpkeys.bin instead of correct number
- hf mf eget (fix): displayed three instead of one block
- hf mf eload (add): load 4K .eml files (but accepts 1K .eml files for backwards compatibility)
- hf mf esave (add): always save the whole emulator memory (4K) instead of 1K only
- hf mf ecfill (add): added (optional) card size parameter and support for non 1K cards
2014-09-10 19:04:50 +02:00
roel@libnfc.org 981bd4292e integrated MIFARE ultralight features, contributed by 'midnitesnake' 2013-10-11 08:43:23 +00:00
micki.held@gmx.de 9492e0b098 Major rework of hf mf nested:
- PM: used GetCountMifare in MifareNested() for improved timing accuracy and to deliver better quality nonces
- PM: MifareNested now delivers exactly two different nonces to avoid time consuming multiple lfsr_recovery32() on client side
- Client: replaced quicksort by bucketsort in crapto1.c which is faster 
- Client: use multithreading (two parallel calls to lfsr_recovery32())
- Client: fixed a small bug in mfnested() (always showed trgkey=0)
- Client: introduced a mutex for PrintAndLog() to avoid interlaced printing
Minor rework of hf mf chk:
- Avoid time consuming off/on cycles. Send a "halt" instead.
2013-09-15 09:33:17 +00:00
Merlokbr@gmail.com 0014cb46da 1. emulator works. tested on ARC1302, NXP pegoda, touchtag, my firm's readers.
2. added increment, decrement, restore, transfer commands
3. fixed several small bugs and small code cleaning
4. there is strange behavier in the emulator: for 7BUID is seems that there is must be a feature that cam make work card withouth 2nd anticollision loop. NXP reader authenticates, but cant read card contents. all the rest readers works, BUT.... my 7BUID mifare card dont work AT ALL  .... I dont know what i should do )
2011-06-25 13:03:01 +00:00
Merlokbr@gmail.com 8556b852ed 1. updated usb commands
2. added abilities to: clear, get, set, load from card, load from nested card emulator dump
3. tried to fix proxmark promt have seen everywhere (not so good)
4. reorganized arm code
2011-06-17 18:39:54 +00:00
Merlokbr@gmail.com 8f51ddb0bd 1. fixed send manchester
2. emulator commands select, authenticate, read block, write block works
3. nested authentication - not working (maybe next release)
4. small bugfixes
5. mifare1ksim - in alpha state!!! code not so clear!!!
2011-06-16 14:43:49 +00:00
Merlokbr@gmail.com 9ca155ba44 0. its alpha version!!!
1. commands changed from "hf 14a" to "hf mf" 
2. some code cleaning and small bugfixes
3. alpha version hf mf sim
4. added internal function GetTickCount() for time measuring
2011-06-10 13:35:10 +00:00
Merlokbr@gmail.com f397b5cc87 1. fixed hf 14a mifare. added functionality to ignore one Nt
2. completed hf 14a nested
3. added hf 14a chk to check keys
5. added check keys to hf 14a mifare and hf 14a nested
6. added debug level to mifare commands
7. small bugs and improvements
2011-06-07 12:35:52 +00:00