Merge pull request #61 from RfidResearchGroup/master

Update
This commit is contained in:
mwalker33
2020-11-24 17:23:54 +11:00
committed by GitHub
99 changed files with 9616 additions and 1230 deletions
+28 -3
View File
@@ -18,13 +18,21 @@
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
],
"windows": {
"processId": "${input:ProcessIDWindows}",
"miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe",
"externalConsole": true,//for ProxSpace externalConsole=true is required, because the internal cosole stops updating after a while
"environment": [{
"name": "PATH","value": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin"
}]
}
},{
"name": "(gdb) Build & Launch",
"type": "cppdbg",
"request": "launch",
"program": "${cwd}/client/proxmark3",
"args": ["/dev/ttyACM0"],
"args": ["/dev/ttyACM0"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
@@ -38,7 +46,15 @@
}
],
"preLaunchTask": "client: Debug: clean & make",
"miDebuggerPath": "/usr/bin/gdb"
"miDebuggerPath": "/usr/bin/gdb",
"windows": {
"args": ["COM5"],
"miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe",
"externalConsole": true,//for ProxSpace externalConsole=true is required, because the internal cosole stops updating after a while
"environment": [{
"name": "PATH","value": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin"
}]
}
}
],
"inputs": [
@@ -50,6 +66,15 @@
"args": {
"command": "pgrep -n proxmark3",
}
},{
"id": "ProcessIDWindows",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "${workspaceFolder}/../../runme64.bat -c \"cat /proc/$(pgrep -n proxmark3)/winpid\"",
}
}
]
}
+84
View File
@@ -7,6 +7,18 @@
"label": "all: Make & run",
"type": "shell",
"command": "make -j && ./pm3",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": [
"$gcc"
],
@@ -19,6 +31,18 @@
"label": "choose: Make",
"type": "shell",
"command": "make ${input:componentType} -j",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": [
"$gcc"
],
@@ -28,6 +52,18 @@
"label": "client: Debug: make",
"type": "shell",
"command": "make client -j DEBUG=1",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": [
"$gcc"
],
@@ -37,6 +73,18 @@
"label": "client: Debug: clean & make",
"type": "shell",
"command": "make client/clean && make client -j DEBUG=1",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": [
"$gcc"
],
@@ -46,18 +94,54 @@
"label": "fullimage: Make & Flash",
"type": "shell",
"command": "make fullimage && ./pm3-flash-fullimage",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": []
},
{
"label": "BOOTROM: Make & Flash",
"type": "shell",
"command": "make bootrom && ./pm3-flash-bootrom",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": []
},
{
"label": "Run client",
"type": "shell",
"command": "./pm3",
"windows": {
"options": {
"cwd": "${workspaceFolder}/../..",
"shell": {
"executable": "${workspaceFolder}/../../runme64.bat",
"args": [
"-c \"cd ${workspaceFolderBasename} &&"
],
}
}
},
"problemMatcher": []
}
],
+2
View File
@@ -3,8 +3,10 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fix 'hf iclass wrbl' - dealing with tags in unsecured vs secured pagemode now is correct (@iceman1001)
- Change many commands to cliparser (@iceman1001, @tcprst, @mwalker33,...)
- ...
- Added compilation options for 256k Proxmark versions, see doc (@doegox)
- Added support for 10b UID in `hf 14a sim` (@doegox)
- Added `HF_TCPRST` standalone mode which read and emulate IKEA Rothult cards (@tcprst)
- Add Gallagher key checking/KDF on MIFARE Desfire (@NZSmartie)
+1 -1
View File
@@ -27,7 +27,7 @@ LD = g++
SH = sh
BASH = bash
PERL = perl
CCC =foo
SWIG = swig
CC_VERSION = $(shell $(CC) -dumpversion 2>/dev/null|sed 's/\..*//')
CC_VERSION := $(or $(strip $(CC_VERSION)),0)
+2 -2
View File
@@ -34,7 +34,7 @@
|[Notes on file formats used with Proxmark3](/doc/extensions_notes.md)|[Notes on MFU binary format](/doc/mfu_binary_format_notes.md)|[Notes on FPGA & ARM](/doc/fpga_arm_notes.md)|
|[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|[Notes on Magic cards](/doc/magic_cards_notes.md)|
|[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)|[Notes on Cloner guns](/doc/cloner_notes.md)|
|[Notes on cliparser usage](/doc/cliparser.md)|||
|[Notes on cliparser usage](/doc/cliparser.md)|[Notes on clocks](/doc/clocks.md)||
## Build for non-RDV4 Proxmark3 platforms
@@ -57,7 +57,7 @@ On the software side: quite a lot, see the [Changelog file](CHANGELOG.md).
This repo compiles nicely on
- Proxspace v3.x
- [latest release v3.7](https://github.com/Gator96100/ProxSpace/releases)
- [latest release v3.7.1](https://github.com/Gator96100/ProxSpace/releases)
- Windows/mingw environment with Qt5.6.1 & GCC 4.9
- Ubuntu 16.04 -> 20.04
- ParrotOS, Gentoo, Pentoo, Kali, Nethunter, Archlinux, Fedora, Debian
+47 -25
View File
@@ -1776,13 +1776,19 @@ void iClass_Dump(uint8_t *msg) {
BigBuf_free();
}
static bool iclass_writeblock_ext(uint8_t blockno, uint8_t *data, uint8_t *mac) {
static bool iclass_writeblock_ext(uint8_t blockno, uint8_t *data, uint8_t *mac, bool use_mac) {
// write command: cmd, 1 blockno, 8 data, 4 mac
uint8_t write[16] = { 0x80 | ICLASS_CMD_UPDATE, blockno };
uint8_t write[14] = { 0x80 | ICLASS_CMD_UPDATE, blockno };
uint8_t write_len = 14;
memcpy(write + 2, data, 8);
memcpy(write + 10, mac, 4);
AddCrc(write + 1, 13);
if (use_mac) {
memcpy(write + 10, mac, 4);
} else {
AddCrc(write + 1, 9);
write_len -= 2;
}
uint8_t resp[10] = {0};
uint32_t eof_time = 0, start_time = 0;
@@ -1819,7 +1825,8 @@ void iClass_WriteBlock(uint8_t *msg) {
iclass_writeblock_req_t *payload = (iclass_writeblock_req_t *)msg;
uint8_t write[16] = { 0x80 | ICLASS_CMD_UPDATE, payload->req.blockno };
uint8_t write[14] = { 0x80 | ICLASS_CMD_UPDATE, payload->req.blockno };
uint8_t write_len = 14;
Iso15693InitReader();
@@ -1844,23 +1851,30 @@ void iClass_WriteBlock(uint8_t *msg) {
}
}
// calc new mac for write
uint8_t wb[9];
wb[0] = payload->req.blockno;
memcpy(wb + 1, payload->data, 8);
// new block data
memcpy(write + 2, payload->data, 8);
if (payload->req.use_replay) {
doMAC_N(wb, sizeof(wb), payload->req.key + 4, mac);
uint8_t pagemap = get_pagemap(&hdr);
if (pagemap == PICOPASS_NON_SECURE_PAGEMODE) {
// Unsecured tags uses CRC16, but don't include the UPDATE operation code
// byte0 = update op
// byte1 = block no
// byte2..9 = new block data
AddCrc(write + 1, 9);
write_len -= 2;
} else {
// Secure tags uses MAC
uint8_t wb[9];
wb[0] = payload->req.blockno;
memcpy(wb + 1, payload->data, 8);
if (payload->req.use_credit_key)
doMAC_N(wb, sizeof(wb), hdr.key_c, mac);
else
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
}
memcpy(write + 2, payload->data, 8); // data
memcpy(write + 10, mac, sizeof(mac)); // mac
AddCrc(write + 1, 13);
memcpy(write + 10, mac, sizeof(mac));
}
start_time = eof_time + DELAY_ICLASS_VICC_TO_VCD_READER;
@@ -1869,7 +1883,7 @@ void iClass_WriteBlock(uint8_t *msg) {
uint8_t tries = 3;
while (tries-- > 0) {
iclass_send_as_reader(write, sizeof(write), &start_time, &eof_time);
iclass_send_as_reader(write, write_len, &start_time, &eof_time);
if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occured
res = false;
@@ -1961,22 +1975,30 @@ void iClass_Restore(iclass_restore_req_t *msg) {
}
// main loop
bool use_mac;
for (uint8_t i = 0; i < msg->item_cnt; i++) {
iclass_restore_item_t item = msg->blocks[i];
// calc new mac for data, using 1b blockno, 8b data,
uint8_t wb[9] = {0};
wb[0] = item.blockno;
memcpy(wb + 1, item.data, 8);
uint8_t pagemap = get_pagemap(&hdr);
if (pagemap == PICOPASS_NON_SECURE_PAGEMODE) {
// Unsecured tags uses CRC16
use_mac = false;
} else {
// Secure tags uses MAC
use_mac = true;
uint8_t wb[9] = {0};
wb[0] = item.blockno;
memcpy(wb + 1, item.data, 8);
if (msg->req.use_credit_key)
doMAC_N(wb, sizeof(wb), hdr.key_c, mac);
else
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
if (msg->req.use_credit_key)
doMAC_N(wb, sizeof(wb), hdr.key_c, mac);
else
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
}
// data + mac
if (iclass_writeblock_ext(item.blockno, item.data, mac)) {
if (iclass_writeblock_ext(item.blockno, item.data, mac, use_mac)) {
Dbprintf("Write block [%02x] " _GREEN_("successful"), item.blockno);
written++;
} else {
+9 -3
View File
@@ -1301,7 +1301,7 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) {
// We need to listen to the high-frequency, peak-detected path.
iso14443a_setup(FPGA_HF_ISO14443A_TAGSIM_LISTEN);
iso14a_set_timeout(201400); // 106 * 19ms default
iso14a_set_timeout(201400); // 106 * 19ms default *100?
int len = 0;
@@ -2903,9 +2903,11 @@ void ReaderIso14443a(PacketCommandNG *c) {
goto OUT;
}
}
if ((param & ISO14A_SET_TIMEOUT))
uint32_t save_iso14a_timeout = 0;
if ((param & ISO14A_SET_TIMEOUT)) {
save_iso14a_timeout = iso14a_get_timeout();
iso14a_set_timeout(timeout);
}
if ((param & ISO14A_APDU)) {
uint8_t res;
@@ -2969,6 +2971,10 @@ void ReaderIso14443a(PacketCommandNG *c) {
if ((param & ISO14A_REQUEST_TRIGGER))
iso14a_set_trigger(false);
if ((param & ISO14A_SET_TIMEOUT)) {
iso14a_set_timeout(save_iso14a_timeout);
}
if ((param & ISO14A_NO_DISCONNECT))
return;
+2 -1
View File
@@ -2082,9 +2082,10 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint8_t *datain) {
if (!iso14443a_select_card(uid, NULL, &cuid, true, 0, true)) {
if (DBGLEVEL >= DBG_ERROR) Dbprintf("Can't select card");
errormsg = MAGIC_UID;
mifare_classic_halt_ex(NULL);
break;
}
mifare_classic_halt_ex(NULL);
break;
}
// wipe tag, fill it with zeros
+25 -3
View File
@@ -188,7 +188,6 @@ set (TARGET_SOURCES
${PM3_ROOT}/client/src/emv/crypto.c
${PM3_ROOT}/client/src/emv/crypto_polarssl.c
${PM3_ROOT}/client/src/emv/dol.c
${PM3_ROOT}/client/src/emv/dump.c
${PM3_ROOT}/client/src/emv/emv_pk.c
${PM3_ROOT}/client/src/emv/emv_pki.c
${PM3_ROOT}/client/src/emv/emv_pki_priv.c
@@ -289,6 +288,7 @@ set (TARGET_SOURCES
${PM3_ROOT}/client/src/graph.c
${PM3_ROOT}/client/src/jansson_path.c
${PM3_ROOT}/client/src/preferences.c
${PM3_ROOT}/client/src/pm3.c
${PM3_ROOT}/client/src/pm3_binlib.c
${PM3_ROOT}/client/src/pm3_bitlib.c
${PM3_ROOT}/client/src/prng.c
@@ -361,7 +361,7 @@ if (NOT SKIPPYTHON EQUAL 1)
add_definitions(-DHAVE_PYTHON)
set(ADDITIONAL_DIRS ${PYTHON3_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
set(ADDITIONAL_LNK ${PYTHON3_LIBRARIES} ${ADDITIONAL_LNK})
set(ADDITIONAL_LNKDIRS ${PYTHON3_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
set(ADDITIONAL_LNKDIRS ${PYTHON3_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
endif (PYTHON3EMBED_FOUND)
endif (NOT SKIPPYTHON EQUAL 1)
@@ -425,7 +425,7 @@ if (SKIPPYTHON EQUAL 1)
else (SKIPPYTHON EQUAL 1)
if (PYTHON3EMBED_FOUND)
message(STATUS "Python3 library: Python3 embed found, enabled")
elseif (PYTHON_FOUND)
elseif (PYTHON3_FOUND)
message(STATUS "Python3 library: Python3 found, enabled")
else (PYTHON3EMBED_FOUND)
message(STATUS "Python3 library: Python3 not found, disabled")
@@ -455,6 +455,28 @@ else (SKIPWHEREAMISYSTEM EQUAL 1)
message(STATUS "Whereami library: system library not found, using local library")
endif (WHEREAMI_FOUND)
endif (SKIPWHEREAMISYSTEM EQUAL 1)
# Lua SWIG
if (EXISTS ${PM3_ROOT}/client/src/pm3_luawrap.c)
set (TARGET_SOURCES
${PM3_ROOT}/client/src/pm3_luawrap.c
${TARGET_SOURCES})
add_definitions(-DHAVE_LUA_SWIG)
message(STATUS "Lua SWIG: wrapper found")
endif (EXISTS ${PM3_ROOT}/client/src/pm3_luawrap.c)
# Python SWIG
if (NOT SKIPPYTHON EQUAL 1)
if (PYTHON3EMBED_FOUND OR PYTHON3_FOUND)
if (EXISTS ${PM3_ROOT}/client/src/pm3_pywrap.c)
set (TARGET_SOURCES
${PM3_ROOT}/client/src/pm3_pywrap.c
${TARGET_SOURCES})
add_definitions(-DHAVE_PYTHON_SWIG)
message(STATUS "Python SWIG: wrapper found")
endif (EXISTS ${PM3_ROOT}/client/src/pm3_pywrap.c)
endif (PYTHON3EMBED_FOUND OR PYTHON3_FOUND)
endif (NOT SKIPPYTHON EQUAL 1)
message(STATUS "===================================================================")
add_executable(proxmark3
+62 -3
View File
@@ -285,11 +285,24 @@ ifneq ($(SKIPREADLINE),1)
READLINE_FOUND = 1
endif
########
# SWIG #
########
ifneq ("$(wildcard src/pm3_luawrap.c)","")
SWIG_LUA_FOUND = 1
endif
ifeq ($(PYTHON_FOUND),1)
ifneq ("$(wildcard src/pm3_pywrap.c)","")
SWIG_PYTHON_FOUND = 1
endif
endif
#######################################################################################################
CFLAGS ?= $(DEFCFLAGS)
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
PM3CFLAGS = $(CFLAGS)
PM3CFLAGS += -I./src -I../include -I../common -I../common_fpga $(INCLUDES)
PM3CFLAGS += -I./src -I./include -I../include -I../common -I../common_fpga $(INCLUDES)
# WIP Testing
#PM3CFLAGS += -std=c11 -pedantic
@@ -315,10 +328,16 @@ ifeq ($(PYTHON_FOUND),1)
PM3CFLAGS += -DHAVE_PYTHON
endif
ifeq ($(SWIG_LUA_FOUND),1)
PM3CFLAGS += -DHAVE_LUA_SWIG
endif
ifeq ($(SWIG_PYTHON_FOUND),1)
PM3CFLAGS += -DHAVE_PYTHON_SWIG
endif
CXXFLAGS ?= -Wall -Werror -O3
PM3CXXFLAGS = $(CXXFLAGS)
PM3CXXFLAGS += -I../include
PM3CXXFLAGS += -I../include -I./include
ifeq ($(QT_FOUND),1)
PM3CFLAGS += -DHAVE_GUI
@@ -414,6 +433,13 @@ else
endif
endif
ifeq ($(SWIG_LUA_FOUND),1)
$(info Lua SWIG: wrapper found)
endif
ifeq ($(SWIG_PYTHON_FOUND),1)
$(info Python SWIG: wrapper found)
endif
$(info compiler version: $(shell $(CC) --version|head -n 1))
$(info ===================================================================)
@@ -506,7 +532,6 @@ SRCS = aiddesfire.c \
emv/crypto.c\
emv/crypto_polarssl.c\
emv/dol.c \
emv/dump.c \
emv/emv_pk.c\
emv/emv_pki.c\
emv/emv_pki_priv.c\
@@ -540,6 +565,7 @@ SRCS = aiddesfire.c \
mifare/mifaredefault.c \
mifare/mifarehost.c \
mifare/ndef.c \
pm3.c \
pm3_binlib.c \
pm3_bitlib.c \
preferences.c \
@@ -572,6 +598,16 @@ SRCS += bucketsort.c \
parity.c \
util_posix.c
# swig
SWIGSRCS =
ifeq ($(SWIG_LUA_FOUND),1)
SWIGSRCS += pm3_luawrap.c
endif
ifeq ($(SWIG_PYTHON_FOUND),1)
SWIGSRCS += pm3_pywrap.c
endif
# gui
ifeq ($(QT_FOUND),1)
CXXSRCS = proxgui.cpp proxguiqt.cpp proxguiqt.moc.cpp
@@ -585,6 +621,7 @@ ifeq ($(platform),Darwin)
endif
OBJS = $(SRCS:%.c=$(OBJDIR)/%.o)
OBJS += $(SWIGSRCS:%.c=$(OBJDIR)/%.o)
OBJS += $(CXXSRCS:%.cpp=$(OBJDIR)/%.o)
OBJS += $(OBJCSRCS:%.m=$(OBJDIR)/%.o)
@@ -649,6 +686,7 @@ endif
ifneq (,$(INSTALLSHARE))
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
$(Q)$(CP) $(INSTALLSHARE) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
$(Q)$(CP) src/pm3.py $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)/pyscripts
endif
@true
@@ -711,6 +749,18 @@ ifneq ($(WHEREAMI_FOUND),1)
$(Q)$(MAKE) --no-print-directory -C $(WHEREAMILIBPATH) all
endif
########
# SWIG #
########
src/pm3_luawrap.c: pm3.i
$(info [=] GEN $@)
$(Q)$(SWIG) -lua -o $@ $<
src/pm3_pywrap.c: pm3.i
$(info [=] GEN $@)
$(Q)$(SWIG) -python -o $@ $<
########
# misc #
########
@@ -725,6 +775,14 @@ src/version.c: default_version.c
# easy printing of MAKE VARIABLES
print-%: ; @echo $* = $($*)
# SWIG files emit a number of warnings, we've to ignore them
%wrap.o: %wrap.c
$(OBJDIR)/%wrap.o : %wrap.c $(OBJDIR)/%.d
$(info [-] CC $<)
$(Q)$(MKDIR) $(dir $@)
$(Q)$(CC) $(DEPFLAGS) $(PM3CFLAGS) -Wno-missing-prototypes -Wno-missing-declarations -Wno-missing-field-initializers -c -o $@ $<
$(Q)$(POSTCOMPILE)
%.o: %.c
$(OBJDIR)/%.o : %.c $(OBJDIR)/%.d
$(info [-] CC $<)
@@ -747,6 +805,7 @@ $(OBJDIR)/%.o : %.m $(OBJDIR)/%.d
$(Q)$(POSTCOMPILE)
DEPENDENCY_FILES = $(patsubst %.c, $(OBJDIR)/%.d, $(SRCS)) \
$(patsubst %wrap.c, $(OBJDIR)/%.d, $(SWIGSRCS)) \
$(patsubst %.cpp, $(OBJDIR)/%.d, $(CXXSRCS)) \
$(patsubst %.m, $(OBJDIR)/%.d, $(OBJCSRCS))
-1
View File
@@ -66,7 +66,6 @@ add_library(pm3rrg_rdv4 SHARED
${PM3_ROOT}/client/src/emv/crypto.c
${PM3_ROOT}/client/src/emv/crypto_polarssl.c
${PM3_ROOT}/client/src/emv/dol.c
${PM3_ROOT}/client/src/emv/dump.c
${PM3_ROOT}/client/src/emv/emv_pk.c
${PM3_ROOT}/client/src/emv/emv_pki.c
${PM3_ROOT}/client/src/emv/emv_pki_priv.c
+1 -1
View File
@@ -64,7 +64,7 @@ int push_cmdscriptfile(char *path, bool stayafter) { return PM3_SUCCESS; }
static bool OpenPm3(void) {
if (conn.run) { return true; }
// Open with LocalSocket. Not a tcp connection!
bool ret = OpenProxmark("socket:"PM3_LOCAL_SOCKET_SERVER, false, 1000, false, 115200);
bool ret = OpenProxmark(session.current_device, "socket:"PM3_LOCAL_SOCKET_SERVER, false, 1000, false, 115200);
return ret;
}
+6 -10
View File
@@ -35,8 +35,7 @@
int CLIParserInit(CLIParserContext **ctx, const char *vprogramName, const char *vprogramHint, const char *vprogramHelp) {
*ctx = malloc(sizeof(CLIParserContext));
if (!*ctx) {
printf("ERROR: Insufficient memory\n");
fflush(stdout);
PrintAndLogEx(ERR, "ERROR: Insufficient memory\n");
return 2;
}
(*ctx)->argtable = NULL;
@@ -220,16 +219,15 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
res = param_gethex_to_eol((char *)tmpstr, 0, data, maxdatalen, datalen);
switch (res) {
case 1:
printf("Parameter error: Invalid HEX value\n");
PrintAndLogEx(ERR, "Parameter error: Invalid HEX value\n");
break;
case 2:
printf("Parameter error: parameter too large\n");
PrintAndLogEx(ERR, "Parameter error: parameter too large\n");
break;
case 3:
printf("Parameter error: Hex string must have EVEN number of digits\n");
PrintAndLogEx(ERR, "Parameter error: Hex string must have EVEN number of digits\n");
break;
}
fflush(stdout);
return res;
}
@@ -246,8 +244,7 @@ int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
int len = strlen(argstr->sval[i]);
if (len > ((sizeof(tmpstr) / 2) - ibuf)) {
printf("Parameter error: string too long (%i chars), expect MAX %zu chars\n", len + ibuf, (sizeof(tmpstr) / 2));
fflush(stdout);
PrintAndLogEx(ERR, "Parameter error: string too long (%i chars), expect MAX %zu chars\n", len + ibuf, (sizeof(tmpstr) / 2));
return 2;
}
@@ -263,8 +260,7 @@ int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
return 0;
if (ibuf > maxdatalen) {
printf("Parameter error: string too long (%i chars), expected MAX %i chars\n", ibuf, maxdatalen);
fflush(stdout);
PrintAndLogEx(ERR, "Parameter error: string too long (%i chars), expected MAX %i chars\n", ibuf, maxdatalen);
return 2;
}
+1
View File
@@ -118,6 +118,7 @@ set_property(TARGET pm3rrg_rdv4_hardnested PROPERTY POSITION_INDEPENDENT_CODE ON
target_include_directories(pm3rrg_rdv4_hardnested PRIVATE
../../common
../../include
../include
../src
jansson)
target_include_directories(pm3rrg_rdv4_hardnested INTERFACE hardnested)
+1 -1
View File
@@ -1,5 +1,5 @@
MYSRCPATHS =
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../jansson
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../../include -I../jansson
MYCFLAGS =
MYDEFS =
MYSRCS = hardnested_bruteforce.c
+69 -2
View File
@@ -1132,8 +1132,6 @@ e2a9e88bfe16
aade86b1f9c1
5ea088c824c9
c67beb41ffbf
5ea088c824c9
c67beb41ffbf
b84d52971107
52b0d3f6116e
#
@@ -1209,3 +1207,72 @@ FEE2A3FBC5B6
0602721E8F06
FC0B50AF8700
F7BA51A9434E
#
# eskart
# eskisehir transport card
E902395C1744
4051A85E7F2D
7357EBD483CC
D8BA1AA9ABA0
76939DDD9E97
3BF391815A8D
#
# muzekart
# museum card for turkey
7C87013A648A
E8794FB14C63
9F97C182585B
EC070A52E539
C229CE5123D5
E495D6E69D9C
26BF1A68B00F
B1D3BC5A7CCA
734EBE504CE8
974A36E2B1BA
C197AE6D6990
4D80A10649DF
037F64F470AD
C9CD8D7C65E5
B70B1957FE71
CE7712C5071D
C0AD1B72921A
45FEE09C1D06
E592ED478E59
F3C1F1DB1D83
704A81DDACED
89E00BC444EF
AFAAFCC40DEC
ECC58C5D34CA
57D83754711D
D0DDDF2933EC
240F0BB84681
9E7168064993
2F8A867B06B4
#
# bursakart
# bursa transport card
#
A0A1A2A3A4A5
755D49191A78
DAC7E0CBA8FD
68D3263A8CD6
865B6472B1C0
0860318A3A89
1927A45A83D3
B2FE3B2875A6
#
# playland
# maltepe park
#
ABCC1276FCB0
AABAFFCC7612
#
# lunasan
# kocaeli fair
#
26107E7006A0
#
# gamefactory
# ozdilek
#
17D071403C20
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
cd ..
make src/pm3_luawrap.c
make src/pm3_pywrap.c
@@ -0,0 +1,10 @@
#!/bin/bash
cd ..
rm -rf build
mkdir build
(
cd build
cmake ..
make -j
)
@@ -0,0 +1,7 @@
#!/bin/bash
cd ..
(
cd build
make -j
)
@@ -0,0 +1,4 @@
#!/bin/bash
cd ..
make -j

Some files were not shown because too many files have changed in this diff Show More