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).
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"
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;
^
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] https://github.com/Proxmark/proxmark3/pull/184/commits/ed1525805c940fe738fc05286ffd22e0ce3a0fbf
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.
iceman1001 [Mon, 16 May 2016 17:04:04 +0000 (19:04 +0200)]
CHG: added an entry to copy the 77-mm-usb-device-blacklist.rules file into /etc/udev/rules.d and reload the rules.
All needs to be executed as root, so I use sudo.
pm3:>make udev
Is all that is needed to install it on Linux systems.
iceman1001 [Sun, 15 May 2016 17:27:04 +0000 (19:27 +0200)]
CHG: added the possibility to "remagic" the new found Mifare Ultralight tags, which answers to chinese backdoor commands for uid change.
The script now deals with to different kind of tags. Mifare Classic 1k gen1 and Mifare Ultralight gen1 (7bytes uid)
-Classic will get UID: 01 02 03 04
-Ultralight will get UID: 53 80 71 02 00 D9 80
iceman1001 [Sat, 14 May 2016 12:34:35 +0000 (14:34 +0200)]
CHG: Changed cardnumber printing from %d (signed) to %u (unsigned) for AWID50, it now prints correct in all cases. Thanks to @ntk for reminding me about it.
iceman1001 [Sun, 8 May 2016 16:52:19 +0000 (18:52 +0200)]
REM: commented out a reference to Logtrace in bigbuf.c, since its already declared as "extern" in bigbuff.h
Lets see if this reduces compilation errors for Mac OS X users.
iceman1001 [Fri, 6 May 2016 17:09:29 +0000 (19:09 +0200)]
FIX: This tries to fix the memalign issued on MAC OS X, which it doesn't have. However its standard Malloc is already 16byte memaligned.
ref: http://stackoverflow.com/questions/196329/osx-lacks-memalign
CHG: Much more stable 14B functionality when Sending as Reader/PCD and Reading from Tag/PICC. The read distance is up to 2.5cm and is not nearly so position picky as previous version. The logtrace now also logs times.. kind of.
Getting there slowly.