From: midnitesnake Date: Sun, 9 Nov 2014 11:37:07 +0000 (+0000) Subject: forgot one edit within the client for ultralight C and desfire X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/8b70b6e7c224e57a65692294909e17897923c704?hp=16a372ab75c10b0ffb3786adc4029cd1df2f6066 forgot one edit within the client for ultralight C and desfire --- diff --git a/client/Makefile b/client/Makefile index eede2268..3316b1c5 100644 --- a/client/Makefile +++ b/client/Makefile @@ -13,7 +13,7 @@ CXX=g++ VPATH = ../common OBJDIR = obj -LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread ../liblua/liblua.a +LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lcrypto -lpthread ../liblua/liblua.a LDFLAGS = $(COMMON_FLAGS) CFLAGS = -std=c99 -I. -I../include -I../common -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4 LUAPLATFORM = generic @@ -24,11 +24,9 @@ QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4 MOC = $(QTDIR)/bin/moc LUAPLATFORM = mingw else ifeq ($(platform),Darwin) -#CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Versions/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers -#QTLDLIBS = -framework QtGui -framework QtCore -CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui -QTLDLIBS = -F/opt/local/Library/Frameworks -framework QtGui -framework QtCore -MOC = moc +CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4 +QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) +MOC = $(shell pkg-config --variable=moc_location QtCore) LUAPLATFORM = macosx else CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4 @@ -78,10 +76,12 @@ CMDSRCS = nonce2key/crapto1.c\ cmdhflegic.c \ cmdhficlass.c \ cmdhfmf.c \ + cmdhfmfu.c \ + cmdhfmfdesfire.c \ cmdhw.c \ cmdlf.c \ - cmdlfhid.c \ cmdlfio.c \ + cmdlfhid.c \ cmdlfem4x.c \ cmdlfhitag.c \ cmdlfti.c \ diff --git a/client/util.c b/client/util.c index 15e911a1..8d770678 100644 --- a/client/util.c +++ b/client/util.c @@ -248,3 +248,13 @@ int param_getstr(const char *line, int paramnum, char * str) return en - bg + 1; } + +// Needed to Authenticate to Ultralight C tags & DESFIRE tags +void rol (uint8_t *data, const size_t len){ + uint8_t first = data[0]; + for (size_t i = 0; i < len-1; i++) { + data[i] = data[i+1]; + } + data[len-1] = first; +} + diff --git a/client/util.h b/client/util.h index ce8876ed..44a7eb56 100644 --- a/client/util.h +++ b/client/util.h @@ -45,3 +45,5 @@ uint64_t param_get64ex(const char *line, int paramnum, int deflt, int base); int param_gethex(const char *line, int paramnum, uint8_t * data, int hexcnt); int param_getstr(const char *line, int paramnum, char * str); +// Needed to Authenticate to Ultralight C tags & DESFIRE tags +void rol (uint8_t *data, const size_t len);