Merge branch 'master' of https://github.com/iceman1001/proxmark3
This commit is contained in:
@@ -7,7 +7,7 @@ include ../common/Makefile.common
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
COMMON_FLAGS += -std=c99 -O3 -mpopcnt -march=native -g
|
||||
COMMON_FLAGS += -std=c99 -O3 -g
|
||||
|
||||
#VPATH = ../common ../zlib
|
||||
OBJDIR = obj
|
||||
@@ -20,7 +20,7 @@ LUAPLATFORM = generic
|
||||
|
||||
ifneq (,$(findstring MINGW,$(platform)))
|
||||
LDLIBS += -L/mingw/lib -lgdi32
|
||||
CFLAGS += -I/mingw/include -D__USE_MINGW_ANSI_STDIO=1
|
||||
CFLAGS += -I/mingw/include -D__USE_MINGW_ANSI_STDIO=1 -march=x86-64
|
||||
CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
|
||||
MOC = $(QTDIR)/bin/moc
|
||||
LUAPLATFORM = mingw
|
||||
@@ -46,7 +46,8 @@ else ifeq ($(platform),Darwin)
|
||||
# OS X, QT5 detection needs this.
|
||||
export PKG_CONFIG_PATH=/usr/local/Cellar/qt5/5.6.1-1/lib/pkgconfig/
|
||||
|
||||
CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O3
|
||||
CFLAGS += -march=native
|
||||
CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O3
|
||||
QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
|
||||
MOC = $(shell pkg-config --variable=moc_location QtCore)
|
||||
|
||||
@@ -64,6 +65,7 @@ else ifeq ($(platform),Darwin)
|
||||
|
||||
LUAPLATFORM = macosx
|
||||
else
|
||||
CFLAGS += -march=native
|
||||
CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O3
|
||||
QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
|
||||
LUALIB += -ldl
|
||||
|
||||
@@ -834,9 +834,9 @@ int CmdHFiClassReader_Dump(const char *Cmd) {
|
||||
ul_switch_off_field();
|
||||
memset(MAC,0,4);
|
||||
// AA2 authenticate credit key and git c_div_key - later store in dump block 4
|
||||
if (!select_and_auth(CreditKEY, MAC, c_div_key, true, false, false, false)){
|
||||
if (!select_and_auth(CreditKEY, MAC, c_div_key, true, elite, rawkey, false)){
|
||||
//try twice - for some reason it sometimes fails the first time...
|
||||
if (!select_and_auth(CreditKEY, MAC, c_div_key, true, false, false, false)){
|
||||
if (!select_and_auth(CreditKEY, MAC, c_div_key, true, elite, rawkey, false)){
|
||||
ul_switch_off_field();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ int usage_legic_calccrc(void){
|
||||
PrintAndLog(" c <8|16> : Crc type");
|
||||
PrintAndLog("");
|
||||
PrintAndLog("Samples:");
|
||||
PrintAndLog(" hf legic crc b deadbeef1122");
|
||||
PrintAndLog(" hf legic crc b deadbeef1122 u 9A c 16");
|
||||
PrintAndLog(" hf legic crc d deadbeef1122");
|
||||
PrintAndLog(" hf legic crc d deadbeef1122 u 9A c 16");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_rdmem(void){
|
||||
@@ -678,8 +678,8 @@ int CmdLegicCalcCrc(const char *Cmd){
|
||||
|
||||
while(param_getchar(Cmd, cmdp) != 0x00) {
|
||||
switch(param_getchar(Cmd, cmdp)) {
|
||||
case 'b':
|
||||
case 'B':
|
||||
case 'd':
|
||||
case 'D':
|
||||
// peek at length of the input string so we can
|
||||
// figure out how many elements to malloc in "data"
|
||||
bg=en=0;
|
||||
@@ -1274,4 +1274,4 @@ int CmdHFLegic(const char *Cmd) {
|
||||
int CmdHelp(const char *Cmd) {
|
||||
CmdsHelp(CommandTable);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1081,7 +1081,7 @@ int CmdHF14AMfChk(const char *Cmd) {
|
||||
char filename[FILE_PATH_SIZE]={0};
|
||||
char buf[13];
|
||||
uint8_t *keyBlock = NULL, *p;
|
||||
uint8_t stKeyBlock = 20;
|
||||
uint16_t stKeyBlock = 20;
|
||||
|
||||
sector_t *e_sector = NULL;
|
||||
|
||||
|
||||
@@ -1431,7 +1431,7 @@ static const uint64_t crack_states_bitsliced(statelist_t *p){
|
||||
#endif
|
||||
|
||||
if ( !lstate_p ) {
|
||||
__sync_fetch_and_add(&total_states_tested, bucket_states_tested);
|
||||
__atomic_fetch_add(&total_states_tested, bucket_states_tested, __ATOMIC_SEQ_CST);
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -1618,7 +1618,7 @@ out:
|
||||
#endif
|
||||
|
||||
}
|
||||
__sync_fetch_and_add(&total_states_tested, bucket_states_tested);
|
||||
__atomic_fetch_add(&total_states_tested, bucket_states_tested, __ATOMIC_SEQ_CST);
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -1636,8 +1636,8 @@ static void* crack_states_thread(void* x){
|
||||
if (keys_found) break;
|
||||
else if(key != -1) {
|
||||
if (TestIfKeyExists(key)) {
|
||||
__sync_fetch_and_add(&keys_found, 1);
|
||||
__sync_fetch_and_add(&foundkey, key);
|
||||
__atomic_fetch_add(&keys_found, 1, __ATOMIC_SEQ_CST);
|
||||
__atomic_fetch_add(&foundkey, key, __ATOMIC_SEQ_CST);
|
||||
printf("*");
|
||||
fflush(stdout);
|
||||
break;
|
||||
|
||||
@@ -235,8 +235,8 @@ c2b7ec7d4eb1,
|
||||
003003003003,
|
||||
#
|
||||
# Data from: http://phreakerclub.com/forum/showthread.php?p=41266
|
||||
26973ea74321,
|
||||
71f3a315ad26,
|
||||
26973ea74321,
|
||||
71f3a315ad26,
|
||||
51044efb5aab,
|
||||
ac70ca327a04,
|
||||
eb0a8ff88ade,
|
||||
@@ -279,7 +279,7 @@ a7abbc77cc9e,
|
||||
f792c4c76a5c,
|
||||
bfb6796a11db,
|
||||
#
|
||||
# Data from
|
||||
# Data from
|
||||
8829da9daf76,
|
||||
#
|
||||
# Data from Salto A/B
|
||||
@@ -290,7 +290,7 @@ bfb6796a11db,
|
||||
2338b4913111,
|
||||
#
|
||||
# Data from stoye
|
||||
cb779c50e1bd,
|
||||
cb779c50e1bd,
|
||||
a27d3804c259,
|
||||
003cc420001a,
|
||||
f9861526130f,
|
||||
@@ -316,4 +316,38 @@ d9a37831dce5,
|
||||
c5cfe06d9ea3,
|
||||
c0dece673829,
|
||||
#
|
||||
a56c2df9a26d,
|
||||
a56c2df9a26d,
|
||||
#
|
||||
# Data from: https://pastebin.com/vbwast74
|
||||
#
|
||||
2031d1e57a3b,
|
||||
68d3f7307c89,
|
||||
9189449ea24e,
|
||||
568c9083f71c,
|
||||
53c11f90822a,
|
||||
# Vigik Keys
|
||||
# Various sources :
|
||||
# * https://github.com/DumpDos/Vigik
|
||||
# * http://newffr.com/viewtopic.php?&forum=235&topic=11559
|
||||
# * Own dumps
|
||||
021209197591,
|
||||
22729a9bd40f,
|
||||
2ef720f2af76,
|
||||
38fcf33072e0,
|
||||
424c41524f4e,
|
||||
484558414354,
|
||||
49fae4e3849f,
|
||||
4a6352684677,
|
||||
509359f131b1,
|
||||
62d0c424ed8e,
|
||||
66d2b7dc39ef,
|
||||
6bc1e1ae547d,
|
||||
6c78928e1317,
|
||||
89347350bd36,
|
||||
8ad5517b4b18,
|
||||
8fa1d601d0a2,
|
||||
a22ae129c013,
|
||||
a6cac2886412,
|
||||
aa0720018738,
|
||||
e64a986a5d94,
|
||||
bf1f4424af76,
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
000D8787,
|
||||
# ref. http://kazus.ru/forums/showpost.php?p=1045937&postcount=77
|
||||
05D73B9F,
|
||||
# ref. http://www.proxmark.org/forum/viewtopic.php?=
|
||||
89A69E60,
|
||||
# Default pwd, simple:
|
||||
00000000,
|
||||
11111111,
|
||||
|
||||
@@ -242,6 +242,7 @@ static void set_my_executable_path(void)
|
||||
my_executable_path[path_length] = '\0';
|
||||
my_executable_directory = (char *)malloc(dirname_length + 2);
|
||||
strncpy(my_executable_directory, my_executable_path, dirname_length+1);
|
||||
my_executable_directory[dirname_length+1] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -534,9 +534,11 @@ void xor(unsigned char * dst, unsigned char * src, size_t len) {
|
||||
int32_t le24toh (uint8_t data[3]) {
|
||||
return (data[2] << 16) | (data[1] << 8) | data[0];
|
||||
}
|
||||
#ifndef ANDROID
|
||||
uint32_t le32toh (uint8_t *data) {
|
||||
return (uint32_t)( (data[3]<<24) | (data[2]<<16) | (data[1]<<8) | data[0]);
|
||||
}
|
||||
#endif
|
||||
// Pack a bitarray into a uint32_t.
|
||||
uint32_t PackBits(uint8_t start, uint8_t len, uint8_t* bits) {
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BITMASK
|
||||
# define BITMASK(X) (1 << (X))
|
||||
@@ -146,7 +150,9 @@ extern void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length)
|
||||
|
||||
extern void xor(unsigned char * dst, unsigned char * src, size_t len);
|
||||
extern int32_t le24toh (uint8_t data[3]);
|
||||
#ifndef ANDROID
|
||||
extern uint32_t le32toh (uint8_t *data);
|
||||
#endif
|
||||
extern uint32_t PackBits(uint8_t start, uint8_t len, uint8_t* bits);
|
||||
extern void rol(uint8_t *data, const size_t len);
|
||||
extern uint32_t SwapBits(uint32_t value, int nrbits);
|
||||
|
||||
Reference in New Issue
Block a user