Commit graph

1432 commits

Author SHA1 Message Date
iceman1001 1f3d5401a6 FIX: adding a silent mode for Topaz detection.
FIX: adding a silent mode for 14B detection.
2016-03-06 13:21:42 +01:00
iceman1001 3607b5a96a ADD: Added the autodetection of Topaz to "HF SEARCH"
FIX:  Fixed a minor bug in "HF SEARCH" where it always found a "14b" tag, making the command never test for other formats afterward the 14b test.
The 14b detection is not good still, conflicting return values is main reason for this bug
2016-03-06 12:40:04 +01:00
iceman1001 38e4191705 CHG; a fix for "HF TUNE", I always were annoyed with the hf tune where it printed one value per row endlessly. So this fixes that, it uses "\r" to print on the same row. Works on MINGW/WINDOWS. Havn'nt tested it on Linux yet. But it looks good now. 2016-03-06 10:35:25 +01:00
iceman1001 eb891c385e ADD; added Marshmellow42 's fixes for indala and stuff.
CHG: updated the CHANGELOG.md
2016-03-06 07:56:44 +01:00
iceman1001 0db11b71ef ADD: Added the HitagS from @spenneb ref:https://events.ccc.de/congress/2015/Fahrplan/events/7166.html
PM3 Master PR: https://github.com/Proxmark/proxmark3/pull/167

Adjusted the ENUM names to fit in my fork.  We need a better namestandard for it.
2016-03-04 19:06:47 +01:00
iceman1001 7f0cb92e0d CHG: Added @icsom 's changes to his legic.lua script. 2016-03-01 07:07:56 +01:00
iceman1001 ff3e074478 CHG: some minor changes to the 14b, the read 14b lua, 2016-03-01 07:03:00 +01:00
iceman1001 c728b2b4cf FIX: Added @marshmellow42 's fix for ASK/Biphase simulation on deviceside.
CHG: Added @marshmellow42 's refactoring of "gprox-II" demod.
2016-03-01 06:57:02 +01:00
iceman1001 07291f87d8 ADD: finished of the "LF GUARD SIM" command. needs testing. 2016-02-28 23:28:38 +01:00
iceman1001 0d2c590974 ADD: num_to_bytebitsLSBF function.
ADD: lf guard clone - works...  needs some checking.
ADD: added a option to "addparity" to set zero on fixed pos.
2016-02-28 22:43:21 +01:00
iceman1001 733eb42022 ADD: Added three legic luascript from @iscom (Mosic) Great work! 2016-02-28 14:50:49 +01:00
iceman1001 2453ca6529 CHG: better not to show the unfinished commands.. 2016-02-27 19:48:19 +01:00
iceman1001 50564be0f8 ADD: Started to add a "LF GUARD CLONE/SIM" functionality. *not working* all thats needed now is fixing the transformation from FacilityCode/CardNumber -> raw data for t55x7. 2016-02-27 19:47:10 +01:00
iceman1001 98c799ba49 BUG: smash stack in addParity call. Didn't take in consideration that it adds bits per parity to the array.. 2016-02-27 19:21:49 +01:00
iceman1001 90639dd1cc FIX: lets see if this fixes the pyramid clone crash on OSX 2016-02-27 18:57:49 +01:00
iceman1001 69c4516d32 chg: minor changes to text, explaining current implementation for "lf pyramid clone/sim" only works for 26bits. 2016-02-27 12:12:05 +01:00
iceman1001 220d638d92 ADD: started to add a lua script for reading 14b tags, will help when making scripts against iso 14443b tags. 2016-02-27 09:24:40 +01:00
iceman1001 4b3655e7f4 FIX: spelling misstakes.
FIX: output of block number should be two digits for nicer layout
FIX: strange branching in the pyramid demod in cmddata.c,  it will now always print the unknown length message
FIX: another go at the coverity scan bug in proxmark3.c. (resource leak for cmd)
2016-02-27 09:21:19 +01:00
iceman1001 ce9a7cbf33 ADD: "LF PYRAMID SIM" 2016-02-26 22:40:13 +01:00
iceman1001 581b31fb8a FIX: "LF PYRAMID CLONE" now works. 2016-02-26 22:10:27 +01:00
iceman1001 f087591d59 FIX: calcs wiegand correct, adds wiegand parity correct, adds checksum correct, add even parity to blocks correct.
- when ran it clones nice,  the "lf search" finds a pyramid och checksom is ok.  However,  the wiegand decode is wrong.
Something about where in bitarray to put the startformat bit and wiegand bits...
2016-02-26 21:11:56 +01:00
iceman1001 f6af1cf0ad FIX: the 14b crc was called wrong in LUA. You enter a hexstring already, and get a hexstring back. 2016-02-25 17:51:02 +01:00
iceman1001 71cb7328e3 ADD: added some pyramid commands. //not finished. 2016-02-25 17:49:48 +01:00
iceman1001 683180cb60 ADD: added a simple test of known pwd algos based on uid. 2016-02-24 08:31:46 +01:00
iceman1001 b9411ebac8 ADD: added a simple sleep function. Thanks to Mosci 2016-02-23 08:24:01 +01:00
iceman1001 a75d63f19b ADD: added the crc8legic to Lua. call it with core.crc8legic
also a helper function to take a hexstring and calc the crc on it, was added inside utils.lua

   Call it inside a lua-script like this:

        local utils = require('utils')
        local data = '01020304'
	local crc = utils.Crc8Legic(data)
	print (uid,  ('%02x'):format(crc))
2016-02-22 17:50:32 +01:00
iceman1001 c0f15a05b3 ADD: Marshmellows fixes for "lf t55xx" and "lf cmdread" ref: https://github.com/Proxmark/proxmark3/pull/166/files 2016-02-21 17:44:25 +01:00
iceman1001 b03006794f CHG: removing some time-debug statements.
CHG:  increased the time-out message 2sec, in proxmark,  to make "hf mf chk" work better.
CHG:  still trying to solve the "hf mf mifare" WDT_HIT bug.

With these changes,  the "hf mf chk" / "Hf mf nested" looks similar and should be a bit faster.
2016-02-19 22:34:39 +01:00
iceman1001 e66ff99cc9 CHG: revert old fiddeling, I should not touch the HIDflasher. 2016-02-19 22:32:38 +01:00
iceman1001 95215e873f FIX: this free call still annoys Coverity Scan. 2016-02-19 22:31:35 +01:00
iceman1001 0516439959 ADD: Added @marshmellow42 's new ST (sequence terminator detection) 2016-02-19 22:30:19 +01:00
iceman1001 25606bd724 FIX: For ld (linker) there is no "-=", so lets try re-assign ldlibs instead 2016-02-18 23:01:12 +01:00
iceman1001 28d47dc9b4 CHG: textual change in README.md
FIX: Mac OSX ld (linker) warning for -L/usr/local/lib,  testing to remove it for mac builds.
2016-02-18 21:08:47 +01:00
iceman1001 75cf8623d6 FIX: Undo one of my fixes.. *sigh* need to be more specific when / where to call free. 2016-02-18 20:48:24 +01:00
iceman1001 eb5206bd20 FIX: resource leak, forgot a free 2016-02-18 20:39:41 +01:00
iceman1001 1abd86f17a CHG: CHange the definition of MAX_GRAPH_TRACE_LEN to match eachother.
REM:  removed a include header to graph.h in ui.h.
2016-02-18 20:19:33 +01:00
iceman1001 dfc5ee8893 FIX: Removed a double const 2016-02-18 20:08:55 +01:00
iceman1001 45293f1096 FIX: the #define M_PI is now optional. Moved a bunch of header invocations into the ui.h 2016-02-18 20:08:34 +01:00
iceman1001 02ac2ed464 FIX: 256 is too big for uint8_t 2016-02-18 20:07:50 +01:00
iceman1001 805cd07e25 CHG: this makefile should compile on Ubuntu 1404 without problems. The QT4-5 detection is inside MINQW detection part. 2016-02-18 18:55:44 +01:00
iceman1001 fd9552568d CHG: First step to make my makefile better for other dev.env's These changes makes it look more like PM3 master version. The extra libs are added when MINGW is detected. 2016-02-18 18:43:20 +01:00
iceman1001 6cf8fcb002 FIX: corrected one of my own bugs which made the calccrc8 not accept the input hexstring. 2016-02-18 17:46:11 +01:00
iceman1001 838c15a643 ADD: added some time debug statements to be able to measure execution time.
CHG: change the auth_ex method to send usb package faster,
REM: removed some bucketsort changes.
2016-02-17 17:30:37 +01:00
iceman1001 aacb96d7ed FIX: Coverity scan fixes, hard to keep track of stringlengths while reading and copying in C. 2016-02-17 10:46:08 +01:00
iceman1001 b882b54314 FIX: introduced a bug in a loop by uint8_t inside crapto1.c
CHG: textual helptext change in "hf mf nested"
CHG: loop inside "nested". Still not fast enough. I wonder if qsort can be exchanged for radixsort or bucket sort?
2016-02-16 23:46:34 +01:00
iceman1001 7504dc50d5 Merge branch 'master' of https://github.com/iceman1001/proxmark3
Conflicts:
	armsrc/crypto1.c
2016-02-16 21:43:45 +01:00
iceman1001 a1689f417f CHG: print_hex_break now prints rownumber instead of byte position 2016-02-16 21:39:25 +01:00
iceman1001 c2a714e3ce ADD: forgot to add the bruteforce command to the commandtable. *experimental, its a simple bruteforce* *not tested*
CHG: some textual changes to helptext.
2016-02-16 21:11:17 +01:00
iceman1001 1fe0992d06 FIX: marshmellow42 's fix using memcpy instead of re-assign pointer.
Ref: 38b3509542
2016-02-16 18:15:18 +01:00
iceman1001 f7f844d0ba CHG: added timeouts for downloading values from device, to make the client more responsive.
CHG: still curious for the printf_hex_breaks method, why it behavies strange.
2016-02-16 10:54:41 +01:00
iceman1001 98b2a3a1e9 FIX: the port error 10 on Mac, is fixed by @marshmellow42 , a wrong string format specifier was the root cause.
ADD: some other adjustments from @marshmellow42 to the fsk demod identifier string.
2016-02-16 09:24:45 +01:00
iceman1001 b0c2f708bc CHG: -O4 changed into -O3 to remove some compiler warnings clang, on mac .. 2016-02-15 22:06:17 +01:00
iceman1001 a182a680b0 ADD: a print_hex_break function,
CHG: "hf legic decode" looks better.
2016-02-15 22:05:26 +01:00
iceman1001 9827020ac5 CHG: "hf legic decode" now prints nicely. Still a strange bug for first row.. 2016-02-15 19:56:08 +01:00
iceman1001 d7fd908447 FIX: change the "hf legid load", to use the WaitForResponseTimeout, instead of locking the client if device doesn't answer.
CHG: starting to fix the "hf legic decode" and printing the user segements.  *WORK IN PROGRESS*
2016-02-15 15:03:07 +01:00
iceman 5fdf867253 CHG: some timing 2016-02-15 02:49:04 +01:00
iceman e7902ca0a5 chg: removed testmessage 2016-02-15 02:45:43 +01:00
iceman1001 60bb5ef73b FIX: "hf legic decode" the stamp_len variable was int, but its used as a uint8_t.
FIX: cmdlfem4x.c needed ref to cmdmain.h for clearCommandBuffer
2016-02-14 15:30:26 +01:00
iceman1001 4c36581b96 CHG: clearCommandBuffer(); before calling cmdparser. 2016-02-14 15:24:11 +01:00
iceman1001 c6e0a2ebeb FIX: Faster data load. 2016-02-14 13:29:20 +01:00
iceman1001 e579e76873 FIX: The "hf legic load" had an bug where it send the read byte as uint32_t to the device. 2016-02-14 12:36:42 +01:00
iceman1001 4469412e88 ADD: adding a presco demod, given 0x10D as preamble, .. *work in progress* 2016-02-14 11:58:25 +01:00
iceman1001 3b920280db ADD: Calc legic Crc8 method on given input hexstring. 2016-02-14 11:56:54 +01:00
iceman1001 5a6e19e614 ADD: Started to add a Presco LF clone functionality. Can calc Wiegand from printed number. 2016-02-13 20:53:06 +01:00
iceman1001 6bb7609cad CHG: had to move the SwapBits method. 2016-02-12 16:19:18 +01:00
iceman1001 a11ca2f305 FIX: @wllm-rbnt 's typo fixes 2016-02-12 07:37:10 +01:00
iceman1001 fe144f121d CHG: Updated Reveng from 1.3.0 -> 1.3.1
It now allows of values to be entered as hex i.e. 0x00
2016-02-11 18:28:34 +01:00
iceman1001 df4ee66ea9 CHG: my idea of malloc and free for bucketsort didn't work so well. Back to the original. 2016-02-10 21:44:32 +01:00
iceman 6b10e3294e CHG: remade the mfchkkeys loop inside nested. This one send multiple keys at once, instead of one by one 2016-02-10 21:44:50 +01:00
iceman 480e2f2394 Merge branch 'master' of https://github.com/iceman1001/proxmark3
Conflicts:
	client/cmdhfmf.c
	client/cmdmain.c
2016-02-10 13:29:23 +01:00
iceman 719b2377be chg: what? 2016-02-10 13:22:48 +01:00
iceman 847f7404ff CHG: added some timing messages, 2016-02-10 13:20:23 +01:00
iceman1001 a9e4e78f83 CHG: syntax suger 2016-02-10 13:12:01 +01:00
iceman1001 6f79363dba Syntax suger 2016-02-10 13:10:27 +01:00
iceman1001 089d061f2d CHG: Extracted @piwi's bucketsort into separate files under /common 2016-02-10 13:09:33 +01:00
iceman1001 e0b30228e9 FIX: clearing a char array. 2016-02-10 13:07:44 +01:00
iceman1001 9260bcca56 ADD: added a valid pyramid T55x7 configblock. 2016-02-10 13:07:04 +01:00
iceman1001 7177c51334 ADD: added @marshmellow42 's print statement for "lf viking clone".
ADD:  added a printstatement for "lf viking sim" to make it behave like clone.
2016-02-10 13:06:02 +01:00
iceman 60faf34855 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-02-09 20:58:21 +01:00
iceman1001 022346a195 FIX: @marshmellow's fix for "lf viking clone", wrong mask was applied.
see:  http://www.proxmark.org/forum/viewtopic.php?pid=19896#p19896
2016-02-09 20:42:59 +01:00
iceman 6c6da3d466 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-02-09 15:53:53 +01:00
iceman ef9b8b2c2b empty row..Merge branch 'master' of https://github.com/iceman1001/proxmark3
Conflicts:
	client/proxmark3.c
2016-02-09 15:53:34 +01:00
iceman1001 ea54ec7395 CHG: Syntax suger 2016-02-09 15:17:07 +01:00
iceman ca3ed45928 :syntax sugger 2016-02-09 15:04:08 +01:00
iceman1001 66afab80bd CHG: test of re-adding @piwi's bucketsort to @blapost's crapt1 v3.3 imp. 2016-02-09 14:57:58 +01:00
iceman1001 46a33c182d CHG: moved a call to "free" to outside of if-statement. 2016-02-09 14:48:42 +01:00
iceman1001 a0048c6967 CHG: increased timeout when calling "hw tune". 2016-02-09 14:46:46 +01:00
iceman1001 9f8fc207a2 ADD: added superchargers types, Thanks to rmaisonneuve for compiling it. 2016-02-07 15:54:25 +01:00
iceman 61dda55df6 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-28 22:44:43 +01:00
iceman1001 c9f8bc53c4 REM: commented out a reference to radixsort, which I'vent gotten to work. 2016-01-25 20:32:24 +01:00
iceman1001 d294f5825d CHG: Syntax suger
Experiment:  unfolded a loop.
Experiment: speeding up "Hf mf nested"
CHG: removed some default keys from "hf mf nested". It wasn't being used anyway.
CHG: changed the way "hf mf nested" reports back keys
CHG: "hf mf nested"  and "hf mf chk"   now prints the key-table.
CHG: changed the output list for "hf mf chk"
2016-01-25 20:28:34 +01:00
iceman1001 05e07571a4 FIX: earlier NULL check. 2016-01-25 20:23:44 +01:00
iceman1001 df0dd9e9b6 REM: removed unused code. 2016-01-25 20:22:59 +01:00
iceman1001 109def22c8 FIX: Moved a free() call. 2016-01-25 20:22:00 +01:00
iceman1001 f66114426b CHG: removed a debug statement 2016-01-21 13:01:07 +01:00
iceman1001 93048e8b8b CHG: Added the urls to the new Wiki on github inside the flasher.c usuage text.
CHG:  Syntax suger
2016-01-21 08:02:41 +01:00
iceman1001 5496654aad CHG: Added some more identifications to token list, courtesy from a forum user 2016-01-21 07:33:55 +01:00
iceman1001 810f53792e ADD: added the possibility to choose which block num to attack with "hf mf mifare" Before it only worked on block 0. 2016-01-20 22:26:01 +01:00
iceman1001 0920f54c66 CHG: Remake the "hf mf chkkeys" It now prints the found keys like "hf mf nested" does. It also tries to read key B if Key A was found. It also continues to the next key to find, when there is one match. Earlier all keys in .dic file, was tested even if it was found. 2016-01-20 19:51:30 +01:00
iceman1001 e7d099dcaa CHG: syntax suger, text edit 2016-01-20 17:46:23 +01:00
iceman1001 87b28d31a1 CHG: Syntax suger 2016-01-20 17:45:42 +01:00
iceman1001 05fd71264a FIX: Coverity Scan complains that the realloc might fail.. 2016-01-20 13:03:49 +01:00
iceman1001 bf22fab73b FIX: Coverity Scans complain about uninitialized usage of struct. Setting s->ODD and s->EVEN to zero should do the trick. 2016-01-20 11:31:24 +01:00
iceman 1156e3e32f Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-16 21:54:01 +01:00
iceman 6c38d4c96f Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-16 21:50:55 +01:00
iceman f10646ef74 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-13 12:33:09 +01:00
iceman 63852b2f51 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-12 21:58:03 +01:00
iceman b725f2ca21 Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-12 19:26:56 +01:00
iceman 2c29cba82a Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-12 17:18:11 +01:00
iceman a70991cf6d Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-01-12 16:45:32 +01:00
iceman 1f1929a4aa CHG: maybe this init works better? 2016-01-12 15:57:53 +01:00
iceman1001 5e32cf7575 FIX: #lld -> %#PRIu64" since the arguments are uin64_t 2016-01-19 22:37:17 +01:00
iceman1001 495d7f1326 FIX: Coverity scan, forgot one fread ...
CHG: Syntax suger
2016-01-19 22:25:34 +01:00
iceman1001 b112787d4f ADD: Some instructions for configure CoverityScan using alternative compiler like the ARM-NONE-EABI-GCC
FIX: stupid clock() == -1 on systems who doesn't have it..
2016-01-19 21:48:29 +01:00
iceman1001 704d552a77 FIX: Coverity Scans, z_stream.opaque not initialized, use Z_NULL; 2016-01-19 20:28:29 +01:00
iceman1001 886968335b FIX: Coverity scan, complain on z_stream.opaque is not initialized. Google it,says use: Z_NULL 2016-01-19 20:26:19 +01:00
iceman1001 841d7af0dc FIX: Coverity Scan warnings on not using the fread return value. 2016-01-19 19:52:01 +01:00
iceman1001 52cf34c1cc CHG: Syntax suger, space -> tabs. etc.
FIX: Coverity Scan says out-of-bounds,  Increased the databuffer. Legic List command needs to be re-done.
2016-01-19 19:33:23 +01:00
iceman1001 5f5aa82bb9 FIX: Coverity Scan says fgetc() returns a INT, 2016-01-19 19:32:10 +01:00
iceman1001 67d78d0cde CHG: syntax suger 2016-01-19 19:31:34 +01:00
iceman1001 89a40c3d1d REM: removed a print. The printing is done in the calling function. 2016-01-19 18:06:14 +01:00
iceman1001 8130eba4d1 CHG: Syncronized so all different parts uses the same implementation of Crapto1 v3.3 2016-01-19 18:01:16 +01:00
iceman1001 1a4b67382a FIX: Coverity Scan resource leak 2016-01-19 17:23:36 +01:00
iceman1001 a0f33b6682 CHG: started to clean up the crapto1 imp in client/nonce2key/ folder. 2016-01-19 17:22:18 +01:00
iceman1001 0697080e26 FIX: CoverityScan complains on getchar(), not reading the returning value 2016-01-19 16:58:07 +01:00
iceman1001 639a571810 FIX: Coverity scan, remove a resource leak, wrong varible type. 2016-01-19 16:29:49 +01:00
iceman1001 a429510647 REM: Removed #define llx PRIx64, all these defines are located in proxmark3.h 2016-01-19 16:29:07 +01:00
iceman1001 bb0fc401cc ADD: another key found 2016-01-18 23:28:34 +01:00
iceman1001 ce161f5633 ADD: added the "llu" macro shortcut as format specifier. 2016-01-16 23:04:19 +01:00
iceman1001 952f3dc78f CHG: changed output for the "hf mf nested" to show KEY: A or B instead of 0/1 2016-01-16 23:02:54 +01:00
iceman1001 4750877f2d FIX: Coverity fix with resource leakage
ADD: Implemented a addon to "hf mf nested"  if there is KEY_A 's found but not the same KEY_B,  try just read it from tag.
Makes the command a bit slower when it does these reads.   Plus some annoying debug statements,

CHG: changed the output for "hf mf nested"  to write Key A or B instead of 0 & 1..
2016-01-16 23:02:04 +01:00
iceman1001 e1ad67eaf2 FIX: Coverity Scan fixes, a bunch of them. 2016-01-16 22:58:44 +01:00
iceman1001 8977988fb6 FIX: forgot a lua object for the call to ConvertAsciiToHex. Thanks @romaric for finding it. 2016-01-15 21:47:32 +01:00
iceman1001 7f975d7e17 FIX: one of these days I will start being more observant about argument order 2016-01-15 15:22:25 +01:00
iceman1001 28093ebc10 FIX: wrong format specifier syntax 2016-01-15 12:53:13 +01:00
iceman1001 621601ecef ADD: some clocking for 'hf mf mifare', 'hf mf nested', 'hf mf chk' 2016-01-15 12:45:15 +01:00
iceman1001 3e110ad5ee REM: removed a dublett at end of file. 2016-01-15 12:43:56 +01:00
iceman1001 43d3f76921 FIX: this should remove some warnings while compiling on linux and when running Travis-CI in a docker container.
some format specifier for uint64_t
and getting the git history in the perl script.
2016-01-15 12:43:29 +01:00
iceman1001 c2d2a5a6b5 CHG: Tried to unfold some loops inside ARM/crypto1 imp. It can't hurt, feels stabil. 2016-01-13 22:24:12 +01:00
iceman1001 4b2e63be17 FIX: Some <= fix for pwpivi 's hardnested suggested on the Pm3 forum. 2016-01-13 21:51:47 +01:00
iceman1001 738eeccd9d CHG: Tested to unfold some loops inside the crypto1 implementation to see if it generates some speed ups. Feels ok. 2016-01-13 21:51:06 +01:00
iceman1001 63c236144b FIX: Coverity, out-of-bounds read, 124 is less than (0x10*8)+2 (130)
FIX: Coverity, dead-code, bitcomparison always false.   Copy-paste error?  but  0x0F can never be equal 0x10..  I guessing its 0x01. @pwpivi have to correct me if its wrong.
2016-01-13 14:53:32 +01:00
iceman1001 54d893143c FIX: Coverity, out-of-bounds read ... 2016-01-13 14:51:02 +01:00
iceman1001 6b1111d7b8 FIX: Coverity, resource leak, and variable can't be negative, 2016-01-13 13:22:25 +01:00
iceman1001 089f91dc9d FIX: GCC 4.8 complains the pointer is set before its used in a call to free(). Doesn't complain on Mingw, only Ubuntu.15.10 2016-01-13 13:15:34 +01:00
iceman1001 40a532d97d FIX: Coverity, strlen(Cmd) can never be lesser than zero.. *douh* 2016-01-13 12:58:10 +01:00
iceman1001 b891758968 FIX: Coverity, resource leaks 'nd more.. in "lf t55xx bruteforce" nasty piece of code... 2016-01-13 12:50:18 +01:00
iceman1001 4b8ee00f0d FIX: forgot to change a modified call from @pwpivi 's last update. 2016-01-13 12:49:21 +01:00
iceman1001 0d5ee8e245 ADD: @pwpiwi 's latest changes to 'hf mf hardnested' 2016-01-13 09:31:13 +01:00
iceman1001 d16b33feb5 REM: Removed lot of obselete code from before. 2016-01-13 00:24:37 +01:00
iceman1001 3a532acfe1 ADD: "lf hid bruteforce" for a simple bruteforce attact against a HID reader. *work in progress* 2016-01-13 00:16:11 +01:00
iceman1001 d04b71c168 FIX: tcgetattr for Linux in Ukbhit(), should return -1 if fail. 2016-01-13 00:14:08 +01:00
iceman1001 f37fe8cb10 FIX: Coverity, Unchecked return value, CID #121288, lets do the same check that is everywhere is this call is used. 2016-01-13 00:08:23 +01:00
iceman1001 3f3fdce685 FIX: Coverity, CID# 121351, #121371, #121372, old code that is not used any more, I should remove this. 2016-01-13 00:07:14 +01:00
iceman1001 978920b9fc FIX: textual changes 2016-01-13 00:05:55 +01:00
iceman1001 6178e80e4a FIX: Coverity, resource leak, CID #121357, Mat needs to be free 2016-01-12 23:56:15 +01:00
iceman1001 33db73516d FIX: Coverity, logical vs bitwise operator, remove the extra '&' for it to become bitwise. 2016-01-12 23:42:42 +01:00
iceman1001 95d96ea38a FIX: Coverity, Unintended sign extension, data[7] would have become int, then uint64_t. Should work better now with adding typecasting. 2016-01-12 23:40:57 +01:00
iceman1001 3906036e11 FIX: Coverity, Resource leak, CID #121361, filehandle f needs to be free 2016-01-12 23:38:47 +01:00
iceman1001 e683ecb6a5 FIX: Coverity, Resource leak, CID# 121360, keyBlock needs to be free 2016-01-12 23:37:33 +01:00
iceman1001 60daed79db FIX: Coverity, out-of-bounds write, CID#121340, CID#121341, CID#121342, CID#121343, wrong size in check, sprintf always adds a null terminator, so if filepath would have been 996 chars long, this might had happend... but no more. 2016-01-12 23:35:06 +01:00
iceman1001 f1db8c2207 CHG: Syntax suger 2016-01-12 23:29:05 +01:00
iceman1001 e72d1fbba2 FIX: Coverity, CID#121314, Explicit null dereferenced, in really odd occasions buf would be NULL, and sending NULL to memcpy dereferences it. Not sure about this fix. 2016-01-12 23:27:42 +01:00
iceman1001 395ec4e99c FIX: Coverity, CID# 121337, Out-of-bounds. In the loop, variable i, can be as much as 1051, overflowing the databuf with size 1024. 2016-01-12 23:16:20 +01:00
iceman1001 5cba446201 FIX: Coverity, uninitialized scalar variable, filename array could be NULL.. 2016-01-12 23:10:38 +01:00
iceman1001 628d1cb085 FIX: Coverity, CID #121346, resouce leak, close filehandle. 2016-01-12 23:06:53 +01:00
iceman1001 f7c30d806c FIX: Coverity, out-of-bounds, CID#121330, CID#121331, CID#121332, CID#121333,
keyNbr has to be smaller then ICLASS_KEYS_MAX (since the Iclass_Key_Table array is initialised with it).
2016-01-12 23:05:10 +01:00
iceman1001 3c40616979 FIX: Coverity, Dereference null return, CID #212329, filehandle could be NULL 2016-01-12 22:57:23 +01:00
iceman1001 8b15860ed1 FIX, Coverity, Unsigned compared against 0. CID #212326, keyNBr will never be negative. 2016-01-12 22:53:13 +01:00
iceman1001 ddb748a973 FIX, Coverity, Argument can't be negative, CID #212324, ftell(f) can be negative, not allowed in malloc. 2016-01-12 22:49:29 +01:00
iceman1001 4bb17c6633 FIX: Coverity , Argument can't be negative, CID #121323, ftell(f) can be negative, not allowed in malloc.
FIX: forgot to close the filehandle :(
2016-01-12 22:47:48 +01:00
iceman1001 9c4e28a445 FIX, Coverity, Argument can't be negative. CID# 212322, ftell(f) can be negative. Not allowed in malloc... 2016-01-12 22:43:28 +01:00
iceman1001 7144c99b07 CHG: syntax suger 2016-01-12 22:42:31 +01:00
iceman1001 e994394a40 FIX: Coverity, Identical code for different branches, CID #121315, added a message and different return value. 2016-01-12 22:37:35 +01:00
iceman1001 4c685ac887 FIX: Coverity, unintended sign extention, CID #121363, (numbits << 16) becomes int, then uint64_t. But the signness might set all upper bits to 1 in the process. 2016-01-12 22:33:54 +01:00
iceman1001 28415b5d90 FIX: Coverity, unchecked return value, CID #121292,..
basicallty the flush queue commmand is replaced with clearCommandBuffer();.
2016-01-12 22:30:22 +01:00
iceman1001 1d42f25fcd FIX: Coverity, out-of-bounds write, CID# 121336, s_index should take factor in consideration when looping. Not sure about this one.
FIX: another thing struck me, the g_index wasn't increased, meaning the "un-decimation" always worked on the same first byte of GraphBuffer.
2016-01-12 22:15:49 +01:00
iceman1001 fc893f8e33 FIX: minor fixes to the HID wiegand generation command. Still not complete 2016-01-09 17:20:06 +01:00
iceman1001 5cc88edfaf CHG: syntax suger 2016-01-09 17:19:09 +01:00
iceman1001 dd79e03a1a ADD: a new pwdgen algo Nicknamed C, (Huge props to @Bettse for everything) also added to the "hf mfu info" command. However, that will not work given the system's lockbits.. :( Maybe I'll add a function to test all imp pwdgens given a UID without making a authentication call to tag.
ADD:   BSWAP_32 macro, for changing endianness.
2016-01-09 17:17:36 +01:00
iceman1001 dd0434a6ed FIX: @marshmellow42 's cleanup of includes. 2016-01-08 15:29:06 +01:00
iceman1001 7f6ccd3926 FIX: coverty scan defects.
- bigbuf.c  is comparision correct (iLen versus numofparity)
- cmdhfepa.c  resourceleak, add a call to free
- cipherutils.c  resourceleak, added calls to free
2016-01-08 15:28:24 +01:00
iceman1001 fcb1cdba15 REM: code cleanup. 2016-01-08 14:31:27 +01:00
iceman1001 c46ea881a4 FIX: coverty scan, resourceleak in "hf mf sniff", added call to 'free' befor return.
FIX: coverty scan, overflow in "hf 14a raw",  added an extra len check against USB_CMD_DATA_SIZE
2016-01-08 14:30:56 +01:00
iceman1001 f4fbfb83e2 ADD: @go_tus 's code to generate wiegand codes from FacilityCode/SiteCode and Cardnumber. Almost there, formatlength supported is 26,34,35,37,38,40,44,75,84, when its finised. 2016-01-08 14:28:13 +01:00
iceman1001 ab7bb49475 FIX: coverty scan reveals some resourceleaks and overruns, which is supposed to be fixed now.
/armsrc/des.c   overflow 7 instead of 6
/client/cmdlfhitag.c  overflows traclen
/client/util.c   sprint_bin_break  overflows.
/client/cmdhficlass.c   need to free memory after malloc.

ADD:  RotateRight macro in util.h
2016-01-08 14:25:10 +01:00
iceman1001 69e312afe7 ADD: added a Q5 parameter for "lf t55xx wipe",
the default config blocks is:
         t55x7      : 000880E0
         t5555 (Q5) : 6001F004
2016-01-04 10:13:38 +01:00
iceman1001 fe8042f29a ADD: added @pwpiwi 's corrections to "hf mf hardnested" 2016-01-04 10:11:20 +01:00
iceman1001 09181a5462 code clean up, added some comments to hitag 2016-01-03 17:17:44 +01:00
iceman1001 a531720ae6 added @pwpiwi 's latest changes to "hf mf hardnested" 2016-01-03 17:16:50 +01:00
iceman1001 58962d4c3e added @broken_bad's imp of showing T555/Q5 trace data. (with my modifications ;) ) 2016-01-03 17:16:06 +01:00
iceman1001 341fd1debc FIX: removed printBits reference. 2015-12-23 11:59:34 +01:00
iceman1001 e869d59871 ADD: @marshmellow42 's changes to "hf mfu dump" 2015-12-21 19:48:33 +01:00
iceman1001 f4d0ffd1b9 CHG: some textual change to README.txt
ADD: a prng.c to collect some different PRNG's i've ran into
ADD: some changes the tea implementation
ADD: a enhanced version - SwapEndian64ex
2015-12-21 19:48:00 +01:00
iceman1001 a7474bb30a add: added @AdamLaurie 's iclass raw keys changes 2015-12-21 19:44:47 +01:00
iceman1001 9332b857ff ADD: @marshmellow42 's fixes for Q5, t55xx, fskclock,
ADD:  got tired of always writing wrong "hf 14a list",  so I hooked it back up to call the "hf list" with argument. Things becomes smoother that way.
2015-12-16 11:01:46 +01:00
iceman1001 2b1f4228c2 ADD: @marshmellow42 's changes to "hf mfu *" ,
ADD: @marshmellow42 's changes to "hf mf sim",
ADD: @pwpiwi 's parity files was missing.
2015-12-15 09:34:55 +01:00
iceman1001 f8ada309e9 ADD: @pwpiwi 's latest code from his 'hardnested' branch. 2015-12-15 08:51:29 +01:00
iceman1001 8c671cfb97 FIX: minor fixes in hf mfu, from @marshmello42 's branch. 2015-12-14 22:52:04 +01:00
iceman1001 508b37ba9c REM: removed an unused doublett function "printBits" in util.c
ADD:  added a new string helper function "sprint_hex_ascii" in util.c
ADD:  added "LF AWID BRUTE", a very simple bruteforce command for the awid commands.
      it takes a facility-code,  and iterates all possible 0xFFFF cardnum by sending sim command. It also uses the usb_poll function to stop the bruteforce on keypress and not leaving the pm3 device running the simulation.
the command implements the help parameter.
2015-12-14 22:50:54 +01:00
iceman1001 0c97a4562d ADD: @marshmellow42 's fixes to cmdlft55xx.c (save_restoreGB)
ADD: started with a skeleton method for printing  hex and ascill.
2015-12-10 10:30:13 +01:00
iceman1001 2b9006bd14 Two fixes for warnings when compiling on Ubuntu14.04.
FIX: a wrongly set parameter call to memset in CmdT55xxWipe .
FIX: an ignored fread call in  cmdhficlass.c,
2015-12-09 15:29:18 +01:00
iceman1001 bf32dd923f ADD: @marshmello42 's fixes for low frequency demodulation lengths greater the 512bits. 2015-12-09 14:58:16 +01:00
iceman1001 0a886a1d1b ADD: a TEA crypto algorithm implemention. 2015-12-09 14:57:16 +01:00
iceman1001 f74d0b89a2 added some keys 2015-12-05 22:18:42 +01:00
iceman1001 5247c0c193 ADD: hooked up the new pwdgen functions inside the "hf mfu info", to be tested if the authlimit is not set. 2015-12-02 23:06:03 +01:00
iceman1001 9984b1735a CHG: updated helptext for lf t55xx bruteforce
ADD: a ROL function in util.c
ADD: two pwdgen functions in cmdhfmfu.c,  call them with a 7byte UID and get a 4byte number back. Will see if it can be connected with the "hf mfu info" command,  make data extraction easier later on.
ADD: added some more easy pwd in the dictionary file default_pwd.dic
2015-12-02 22:46:11 +01:00
iceman1001 8ce3e4b4e9 add: missing two hard_nested files.. 2015-12-02 16:48:25 +01:00
iceman1001 d08faa4e02 ADD: Added the possibility to exit the bruteforce mode (either rangesearch or file) with the keyboard.
FIX:  if not found, the range search printed wrong number.
2015-12-01 22:47:03 +01:00
iceman1001 3f26796673 FIX: the lfsampling.c for t55xx had a tendecy to enter a neverending loop. Moved exit branch into the while statement, which seems to solve it.
FIX: Strange int -> uint8_t casting behavior  (0x05 gets the 25bit set and becomes 0x10005 instead) in fskdemod,  removed int and sscanf.
2015-12-01 22:38:37 +01:00
iceman1001 fff6d2a3ba FIX: added a break if the device starts acting strange when aquirering data from tag. 2015-12-01 20:44:12 +01:00
iceman1001 060fdaf998 FIXES: the custom keys testloop now increases the read pwd :) 2015-12-01 16:44:53 +01:00
iceman1001 21865cda09 ADD: added the possibility to load a default pwd file to be used with the "lf t55xx bruteforce" command.
new option:
      lf t55xx brutefore i default_pwd.dic    -  will load default pwds from file and test against tag.
2015-12-01 13:07:01 +01:00
iceman1001 1063a0a872 textual fix. 2015-11-27 17:00:48 +01:00
iceman1001 91079e36b5 FIX: the t55xx bruteforce method got some fixes, in commandname, uint32_t instead of int, and output texts. 2015-11-27 16:59:35 +01:00
iceman1001 c188b1b9b2 ADD: @go_tus simple bruteforce for t55xx, refactored a bit.
ADD: @pwpiwi 's implementation of Hardnested
2015-11-27 16:24:00 +01:00
iceman1001 1a570b0a6a CHG: Missing some headers
FIX: some message/warning in pm3_binlib.c  @gm4tr1x
2015-11-23 10:49:16 +01:00
iceman1001 e9a92fe237 FIX: the read counter in "hf 14a sim" (for ntag/ev) should work better now. Instead of always returning zero, it increases aswell.
--Started to add the TI demod into the 'LF SEARCH"
2015-11-22 21:48:15 +01:00
iceman1001 5636ee8ce6 ADD: 'hf mfu info' now prints following settings:
NFC_COUNTER_EN       - If set, every read,fast_read increases a counter.
      NFC_COUNTER_PROT_PWD - If set, reading nfc_counter needs a successfull pwd authentication before
These new settings is only valid for NTAG213/215/216,
2015-11-22 18:13:26 +01:00
iceman1001 a126332a7b ADD: @marshmellow's fixes to awid, viking and T55x7
ADD: 'lf t55xx detect' now can be called with a password.
ADD: trying to add the read counter and increase counter commands for ntag sim.
2015-11-22 17:33:41 +01:00
iceman1001 52f2df615b ADD: lf indalademod output, The binary string is now printed with linebreaks every 16bits
ADD: lf awid code is modified,  some minor changes in outputs
ADD: lf t55xx write now prints the password on the same row,  looks better when using the new "lf t55xx wipe" command.
ADD: the ioprox T55X7_IOPROX_CONFIG_BLOCK block.
2015-11-21 18:48:58 +01:00
iceman1001 6426f6ba86 @marshmellows last LF changes.
- wipe a t55x7 tag
- stable demods
-
2015-11-20 16:56:43 +01:00
iceman1001 57c7b44be5 FIX: some fixes to indalademod and viking from @marshmellow42 2015-11-10 18:56:43 +01:00
iceman1001 0956e0dba5 FIX: an error that I introduced to the csetblock command with wrong length of crc calcs.
CHG:  variable name in csetblock change.  just trying to be consistant.
ADD:  code clean up in hf 14a,  added some help text methods.
2015-11-10 11:45:45 +01:00
iceman1001 70459879e9 added @marshmellows new viking demod.
adjusted it to fit with the clone/demod  that is under  "lf viking" commands.

did some code clean up,  3spaces into tab.
2015-11-10 11:42:59 +01:00
iceman1001 4db2af08cd fix: forgot to remove this when merging piwi's fixes. 2015-11-09 22:06:48 +01:00
iceman1001 edaf10af99 CHG: minor code clean up, removed commented old code.
ADD: usb_poll_validate_length  to some deviceside loops.
ADD: @marshmellow42 's fixes to LF
2015-11-09 21:51:34 +01:00
iceman1001 bca7107931 ADD: @marshmellow fix for em41x clock.
CHG: swap the int to a uint8_t to skip a compiler error
2015-11-09 21:49:02 +01:00
iceman1001 cc3c0a5148 ADD: @piwi's fixes to .history 2015-11-09 21:46:57 +01: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 94422fa23f ADD: @marshmellow42 's fixex and resetread t55x7 2015-11-02 20:46:17 +01:00
iceman1001 afa86e5c03 ADD: help text for 'hf snoop' / 'hf search' / 'hf list'
CHG: minor code changes.
CHG: makefile ,  moved hi_sniffer.v from LF into HF row.  @piwi suggestion for PR https://github.com/Proxmark/proxmark3/pull/141
2015-11-01 19:49:08 +01:00
iceman1001 84f9cf0626 ADD: a minor xor script 2015-10-30 09:07:04 +01:00
iceman1001 f218d50efb ADD: @gm4tr1x found some new known mifare keys. 2015-10-30 09:05:22 +01:00
iceman1001 1d0ccbe04b ADD: added the "hf snoop" patch original from @Enio, rearranged by @Etmatrix.
ADD:  added the "t55x7" refactoring by @marshmellow42
2015-10-27 21:47:21 +01:00
iceman1001 1c8fbeb93e ADD: 'LF T55X7 WAKEUP' command. For tags with AOR bit set, send this command with password to wake tag up and be able to do a "LF SEARCH" etc on it.
CHG:  Minor code changes on T55X7 code.   Default password is back to 'FF FF FF FF',
REM:  removed @marshmellow42 's wakeup option in "lf t55x7 read",

---  BASICALLY:
if a  T55X7 tag has following bits set:
AOR -  send wakeup command with pwd, to enable LF interacting with it.
PWD -  send read/write/trace/info command with pwd.  No need to send wakeup.
2015-10-21 09:12:33 +02:00
iceman1001 f82894ba69 CHG: move some methods, its easier to read now. Cosmetic change. 2015-10-21 09:07:36 +02:00
iceman1001 9276e859a6 ADD: @marshmellows42 's fixes for "lf cmdread" and CHANGELOG.md
ADD:  Added the "lf t55x7 wakeup" command. It will send a pwd,  and leave the antenna on.
Process like:
1. lf t55x7 wakeup p 11223344
2. lf search

---
It is still not finished,  will work together with the "lf t55x7 commands" in next step when I figure out the process from the datasheets.
2015-10-20 19:00:02 +02:00
iceman1001 b87f99f4bb ADD: some more keys found on a pastebin 2015-10-19 22:41:53 +02:00
iceman1001 a826cb0df1 FIX: tnp3sim, now can insert keys if the dumpfile is blank. Like the ,,,lander dumps... 2015-10-19 22:39:08 +02:00
iceman1001 f14c9bf915 FIX: "abort trap 6" error when runing the tnp3sim.lua script was because the CMD_MIFARE_EML_MEMSET needs to sent the bytewitdh now with recent changes in code to deal with different sizes in emulatormemory. the third argument should be 16 instead of 0. 2015-10-17 14:35:04 +02:00
iceman1001 d8a3b6c117 FIX: @tony pointed out that there was a method name lost... its been reinstated :) 2015-10-17 14:16:42 +02:00
iceman1001 a739812e89 FIX: thanks @tony, for pointing out a "end" statement inside tnp3sim.lua
ADD: @marshmello42 fixs for t55x7
2015-10-16 23:16:46 +02:00
iceman1001 952a812c00 FIX: a suggested fix for #136 where the "lf t55x7 read" command when called with a password. The call will now try loading the config block, decode it and see if PWD is set.
If PWD Bit is set,  the call will be allowed to execute.
If PWD Bit is NOT set,  the call will print a message and excute the call but without sending the password.
If config block is not being able to read or decode,   the call with print a warning message and exit the call.
2015-10-15 19:17:20 +02:00
iceman1001 6a09bea427 CHG: code clean up. Have some questions regarding the CopyVikingTo method. The configblock looks wrong.. 2015-10-15 11:30:37 +02:00
iceman1001 ac2df3460a ADD: @marshmellows fixes for t55x7 reading signal.
ADD: @marshmellows "diphase" definition for T55x7.
MOV: extracted the aquisition from the t55x7 methods and put them inside lfsampling.c
FIX: pcf7931 write,   there is 16bytes in a block.. not 4 as I thought before.
FIX: t55x7 lowered the WRITE_0 to 16.  Even bigger gap.
2015-10-15 10:23:15 +02:00
iceman1001 274e7dd110 FIX: fixed the "lf pcf7931 write" input validation. *untested* 2015-10-14 11:16:43 +02:00
iceman1001 ba52aac40e FIX: Removed a arrat from the struct configPcf in "LF PCF7931" 2015-10-12 21:49:11 +02:00
iceman1001 2285d9dd94 FIX: I did a clean up of the "LF PCF7931" code. The write command is not quite done.
FIX: Added some more "clearCommandBuffer" calls before sending..
2015-10-12 21:30:54 +02:00
iceman1001 5ee53a0e75 ADD: There were lot of calls to enable tracing, but very few to turn it of afterwards in the methods.
Don't know if it has some influence but can't hurt calling  "set_tracing(FALSE);"  when method returns.
2015-10-11 19:14:17 +02:00