Commit graph

2128 commits

Author SHA1 Message Date
Iceman ab981f0581 Merge pull request #17 from alexgrin/iceman_master
Fixing warning:
2016-08-02 10:14:01 +02:00
Alexis Green 6e321dd8f3 Fixing warning:
warning: ignoring return va 'scanf', declared with attribute warn_unused_result [-Wunused-result]
2016-08-01 13:03:46 -07:00
Iceman 981aefe33d Merge pull request #16 from alexgrin/iceman_master
Fixing clang compilation warning
2016-08-01 09:02:49 +02:00
Alexis Green 22e31cd087 Fixing clang compilation warning
warning: shifting a negative signed value is undefined [-Wshift-negative-value]
2016-07-31 22:35:16 -07:00
iceman1001 9f52c9db28 FIX: removed a compiler warning, the stringlen is not used anymore. 2016-07-31 22:03:46 +02:00
iceman1001 b1013281d3 minor textual fix 2016-07-31 22:01:40 +02:00
iceman1001 af4308b97b CHG: Moved some includes, defines, structs from .c into header file. 2016-07-31 22:00:49 +02:00
iceman1001 cc4c8fd6cf FIX: getting rid of a compiler warning message. 2016-07-31 21:59:29 +02:00
iceman1001 a41d3dbb90 ADD: started to rework the wiegand converting. Extracted it from the 'lf hid' file. Looks decent but still needs work. 2016-07-31 21:58:15 +02:00
Iceman 4a843840e3 Merge pull request #15 from alexgrin/iceman_master
Adding a 'recoverpw' command for T55xx to try to recover corrupt pass…
2016-07-31 21:53:14 +02:00
Alexis Green 415e9f00d5 Adding a 'recoverpw' command for T55xx to try to recover corrupt password written by a handheld cloner by fiddling with bits in the expected password. 2016-07-31 12:33:03 -07:00
iceman1001 a0c7eea77a CHG: moved out some help-texts into its own usage-functions. 2016-07-31 11:37:19 +02:00
iceman1001 00abc7c1ab CHG: Moved a 'include' statement to header file 2016-07-30 19:37:15 +02:00
iceman1001 955228691e REM: cleaning up some commented code. 2016-07-30 19:36:48 +02:00
iceman1001 d0724780ab FIX: Found a minor bug in 'LF CMDREAD' where it on device side didn't compare with the right char 'h' instead of 'H'. Re-wrote that whole part anyway, I changed periods to be max 0xFFFF in length, doubtful that a zero or one delay will be bigger than 65535... 2016-07-30 19:30:53 +02:00
iceman1001 dc6c90c376 CHG: The jablotron demod now deals with the strangeness of hex symbols A-F in cardid the same way a reader prints it. 2016-07-29 23:30:40 +02:00
iceman1001 dae31af21e ADD: Binary Encoded Digit -> Decimal
ADD: Decimal -> Binary Encoded Digit

Ie
  decimal 2345 becomes 0x2345
  and
  hex 0x2345 becomes decimal 2345
2016-07-29 23:29:37 +02:00
iceman1001 514ddaa2ff CHG: help text changes in cmdlfjablotron.c
CHG: increase byte size to uint16_t in crc.c CRC16Legic
2016-07-29 20:58:52 +02:00
iceman1001 f5538c1c4e chg: textual change. 2016-07-29 20:53:56 +02:00
iceman1001 ddbe76d3c6 CHG: redundant 'return' statement removed 2016-07-29 14:32:13 +02:00
iceman1001 29ce214c65 CHG: better printing output of card ID
CHG: better detecting in preambl. 16bits with 1, and a zero bit.  Also cleared this topbit when cloneing and simulating.
2016-07-29 14:31:39 +02:00
iceman1001 8ae9b358f8 CHG: textual changes to help text.
CHG: removed the 'd' as input,  the clone/sim commands is simpler.
CHG: printing of card ID is now zero padded.
2016-07-29 13:46:05 +02:00
iceman1001 6c28395106 ADD: LF JABLOTRON functionality. with clone/sim and detection in LF SEARCH.
CHG: removed no-existing crc8ja code
FIX: a check in ASKbiphaseDemod to make sure graphbuff is not empty.
2016-07-29 11:04:12 +02:00
iceman1001 e92948c60c FIX: that OEM variable that is unused. 2016-07-28 22:22:34 +02:00
iceman1001 ba4ad25b37 FIX: Fixed some warnings I didn't take notice off.
- memcpy should have been "memset"
- forgot to add function declaration into header file.
2016-07-28 22:17:44 +02:00
iceman1001 758f5ee3e5 CHG: removed the wiegand converting, since I'm not happy with how its implemented. This is rework in progress. 2016-07-28 21:50:54 +02:00
iceman1001 1e2bb9c9f4 CHG: trying to figure out why I can't get the seconds out.. 2016-07-28 21:48:53 +02:00
iceman1001 53b3c3e816 ADD: Added some new analyse functions like CHKSUM ADD/SUBTRACKT with one's complement 2016-07-28 21:47:52 +02:00
iceman1001 c827ffb098 spacing.. 2016-07-28 21:46:27 +02:00
iceman1001 ab3af4fe85 CHG: forgot to add the reflect function 2016-07-28 21:45:00 +02:00
iceman1001 3e134b4c20 CHG: merged the forum user @jason 's fixes to LEGIC. *UNTESTED*
CHG: changed the CRC implementations.
2016-07-28 21:41:44 +02:00
iceman1001 83dad64b91 ADD: some new usb commmands from EMV, and for LEGIC. 2016-07-28 21:16:02 +02:00
iceman1001 91d4cda48b CHG: removed the linking to radixsort.c 2016-07-28 20:42:46 +02:00
iceman1001 4ccdc189bd Merge branch 'master' of https://github.com/iceman1001/proxmark3 2016-07-28 20:41:54 +02:00
Iceman b82c2f85e4 Update README.md 2016-07-28 18:38:20 +02:00
iceman1001 1f1d974f02 CHG: added a comment 2016-07-23 18:33:30 +02:00
iceman1001 2de9622f0e CHG: some clearing of memory 2016-07-23 18:31:20 +02:00
Iceman a273fcfda2 Merge pull request #14 from k02a/patch-2
Addition of depending library flags...
2016-07-22 22:57:28 +02:00
Iceman 517f8f84e4 Merge pull request #13 from k02a/patch-1
Improved compilation compability on Linux
2016-07-22 22:55:00 +02:00
k02a 39814f19ab Addition of depending library flags...
Inclusion of termcap library or ncurses library solves the compilation errors on some Linux distributions, for example a currently updated Slackware Linux 14.2 x86_64 vanilla distribution (which I run).

Output:
bash-4.3# make -C proxmark3
[...]
g++ -DQT_SHARED -I/usr/lib64/qt/include/QtGui -I/usr/lib64/qt/include/QtCore -Wall -O3 obj/proxmark3.o obj/uart.o obj/util.o obj/sleep.o obj/nonce2key/crapto1.o obj/nonce2key/crypto1.o obj/nonce2key/nonce2key.o obj/nonce2key/crypto1_bs.o obj/loclass/cipher.o obj/loclass/cipherutils.o obj/loclass/des.o obj/loclass/ikeys.o obj/loclass/elite_crack.o obj/loclass/fileutils.o obj/mifarehost.o obj/parity.o obj/crc.o obj/crc16.o obj/crc64.o obj/iso14443crc.o obj/iso15693tools.o obj/data.o obj/graph.o obj/ui.o obj/cmddata.o obj/lfdemod.o obj/cmdanalyse.o obj/cmdhf.o obj/cmdhf14a.o obj/cmdhf14b.o obj/cmdhf15.o obj/cmdhfepa.o obj/cmdhflegic.o obj/cmdhficlass.o obj/cmdhfmf.o obj/cmdhfmfu.o obj/cmdhfmfhard.o obj/cmdhfmfdes.o obj/cmdhftopaz.o obj/cmdhw.o obj/cmdlf.o obj/cmdlfio.o obj/cmdlfhid.o obj/cmdlfawid.o obj/cmdlfem4x.o obj/cmdlfhitag.o obj/cmdlfti.o obj/cmdparser.o obj/cmdmain.o obj/cmdlft55xx.o obj/cmdlfpcf7931.o obj/cmdlfviking.o obj/cmdlfpresco.o obj/cmdlfpyramid.o obj/cmdlfguard.o obj/cmdlfnedap.o obj/pm3_binlib.o obj/scripting.o obj/cmdscript.o obj/pm3_bitlib.o obj/aes.o obj/protocols.o obj/sha1.o obj/sha256.o obj/cmdcrc.o obj/reveng/preset.o obj/reveng/reveng.o obj/reveng/cli.o obj/reveng/bmpbit.o obj/reveng/model.o obj/reveng/poly.o obj/reveng/getopt.o obj/tea.o obj/prng.o obj/radixsort.o obj/bucketsort.o obj/proxgui.o obj/proxguiqt.o obj/proxguiqt.moc.o -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm ../liblua/liblua.a -ldl -L/usr/lib64/qt/lib -lQtGui -lQtCore -o proxmark3
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC'
collect2: fel: ld returnerade avslutningsstatus 1
Makefile:172: receptet för målet "proxmark3" misslyckades
make[1]: *** [proxmark3] Fel 1
make[1]: Lämnar katalogen "/home/github/iceman1001/proxmark3/client"
Makefile:12: receptet för målet "client/all" misslyckades
make: *** [client/all] Fel 2
make: Lämnar katalogen "/home/github/iceman1001/proxmark3"
2016-07-22 13:52:12 +02:00
k02a a360a90bb6 Improved compilation compability on Linux
Compilation of Lua on a currently updated Slackware Linux 14.2 x86_64 vanilla distribution will cause some errors, due to a missing flags in the Makefile. I noticed that adding the termcap library solves the problem.

I also found a thread (http://lua.2524044.n2.nabble.com/readline-termcap-ncurses-td5726148.html
) where other Linux distributions might have similar problems with Lua. Included version of liblua, derived from Lua 5.2.2, also seems to depend on the Termcap library and/or ncurses library.

Output:
bash-4.3$ make -C proxmark3
make: Går till katalogen "/home/github/iceman1001/proxmark3"
make -C client all
make[1]: Går till katalogen "/home/github/iceman1001/proxmark3/client"
Compiling liblua, using platform linux
cd ../liblua && make linux
make[2]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua"
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[3]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua"
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o lapi.o lapi.c
[...]
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o linit.o linit.c
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o 
ranlib liblua.a
gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o lua.o lua.c
gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline 
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC'
collect2: fel: ld returnerade avslutningsstatus 1
Makefile:63: receptet för målet "lua" misslyckades
make[3]: *** [lua] Fel 1
make[3]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua"
Makefile:106: receptet för målet "linux" misslyckades
make[2]: *** [linux] Fel 2
make[2]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua"
Makefile:203: receptet för målet "lua_build" misslyckades
make[1]: *** [lua_build] Fel 2
make[1]: Lämnar katalogen "/home/github/iceman1001/proxmark3/client"
Makefile:12: receptet för målet "client/all" misslyckades
make: *** [client/all] Fel 2
make: Lämnar katalogen "/home/github/iceman1001/proxmark3"
2016-07-22 13:40:05 +02:00
Iceman 24d6432831 Merge pull request #12 from k02a/patch-1
Inclusion of unused oem variable
2016-07-22 10:13:11 +02:00
k02a e13ccb6b3f Inclusion of unused oem variable
When compilation of the current source code, I am getting the warning of setting the unused variable "oem". I have included this, along with minor spelling corrections/language updates in the menu system.

gcc -std=c99 -O3 -mpopcnt -march=native -g -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall -DHAVE_GUI -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED  -c -o obj/cmdlfhid.o cmdlfhid.c
cmdlfhid.c: I funktion "CmdHIDWiegand":
cmdlfhid.c:292:11: varning: variabeln "oem" sätts men används inte [-Wunused-but-set-variable]
  uint32_t oem;
           ^

Before:
pm3 --> lf hid wiegand 0 101 2001
HID 26 bit | FC: 101 CN: 2001 | Wiegand Code: 0000002004CA0FA2          
[...]
HID 40 bit | FC: 101 CN: 2001 | Wiegand Code: 0000000000000FA2

After:
pm3 --> lf hid wiegand 0 101 2001
HID 26 bit | OEM: 0 FC: 101 CN: 2001 | Wiegand code: 0000002004CA0FA2          
[...]
HID 40 bit | OEM: 0 FC: 101 CN: 2001 | Wiegand code: 0000000000000FA2
2016-07-22 09:49:02 +02:00
iceman1001 36e78d669c CHG: added some includes / libarys for HomeBrew AND QT5 compiling on MAC OSX. They are commented away, but if you need it replace the other two lines and uncomment.
All credit to @koalazak  [ref] ed1525805c
2016-07-21 17:26:17 +02:00
iceman1001 81ba7ee837 CHG: minor changes to code, mostly newlines, change a value to #DEFINE END_OF_LIST_MARKER
CHG: GOOD_BYTES_REQUIRED changed from 28 > 13,  makes it nonce collecting part faster, but the fail rate goes also up. its a value to fiddle with.
2016-07-20 12:02:08 +02:00
iceman1001 b9b480d081 chg: name error? 2016-07-07 10:01:50 +02:00
iceman1001 a8ee668770 CHG: moved includes into header file where it belong 2016-07-07 02:15:40 +02:00
iceman1001 e7470660c2 ADD: added the nonce_struct needed for @marshmellow42 's enhanced "sim x" attack. 2016-07-07 02:14:03 +02:00
iceman1001 0cbe0cb8d6 chg: changed comment 2016-07-07 02:13:02 +02:00
iceman1001 9d7e9935af syntax suger 2016-07-07 02:10:09 +02:00