forgot one edit within the client for ultralight C and desfire

This commit is contained in:
midnitesnake 2014-11-09 11:37:07 +00:00
commit 8b70b6e7c2
3 changed files with 19 additions and 7 deletions

View file

@ -13,7 +13,7 @@ CXX=g++
VPATH = ../common VPATH = ../common
OBJDIR = obj 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) LDFLAGS = $(COMMON_FLAGS)
CFLAGS = -std=c99 -I. -I../include -I../common -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4 CFLAGS = -std=c99 -I. -I../include -I../common -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4
LUAPLATFORM = generic LUAPLATFORM = generic
@ -24,11 +24,9 @@ QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
MOC = $(QTDIR)/bin/moc MOC = $(QTDIR)/bin/moc
LUAPLATFORM = mingw LUAPLATFORM = mingw
else ifeq ($(platform),Darwin) else ifeq ($(platform),Darwin)
#CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Versions/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4
#QTLDLIBS = -framework QtGui -framework QtCore QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui MOC = $(shell pkg-config --variable=moc_location QtCore)
QTLDLIBS = -F/opt/local/Library/Frameworks -framework QtGui -framework QtCore
MOC = moc
LUAPLATFORM = macosx LUAPLATFORM = macosx
else else
CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4 CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4
@ -78,10 +76,12 @@ CMDSRCS = nonce2key/crapto1.c\
cmdhflegic.c \ cmdhflegic.c \
cmdhficlass.c \ cmdhficlass.c \
cmdhfmf.c \ cmdhfmf.c \
cmdhfmfu.c \
cmdhfmfdesfire.c \
cmdhw.c \ cmdhw.c \
cmdlf.c \ cmdlf.c \
cmdlfhid.c \
cmdlfio.c \ cmdlfio.c \
cmdlfhid.c \
cmdlfem4x.c \ cmdlfem4x.c \
cmdlfhitag.c \ cmdlfhitag.c \
cmdlfti.c \ cmdlfti.c \

View file

@ -248,3 +248,13 @@ int param_getstr(const char *line, int paramnum, char * str)
return en - bg + 1; 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;
}

View file

@ -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_gethex(const char *line, int paramnum, uint8_t * data, int hexcnt);
int param_getstr(const char *line, int paramnum, char * str); 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);