diff --git a/.gitignore b/.gitignore index f61e85eb91..5b45564b35 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,7 @@ tools/jtag_openocd/openocd_configuration ppls patches/* *- Copy.* -client/lualibs/mf_default_keys.lua +client/lualibs/mfc_default_keys.lua client/lualibs/pm3_cmd.lua # recompiled fpga_version_info.c diff --git a/client/Makefile b/client/Makefile index e54e708e68..f33c1ae9e0 100644 --- a/client/Makefile +++ b/client/Makefile @@ -32,6 +32,7 @@ platform = $(shell uname) ROOT_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST)))) VPATH = ../common uart +vpath %.dic dictionaries OBJDIR = obj LDLIBS ?= -L/usr/local/lib @@ -290,7 +291,7 @@ ifeq "$(SUPPORTS_AVX512)" "True" endif BINS = proxmark3 flasher -CLEAN = $(BINS) *.moc.cpp ui/ui_overlays.h lualibs/pm3_cmd.lua lualibs/mf_default_keys.lua +CLEAN = $(BINS) *.moc.cpp ui/ui_overlays.h lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua # need to assign dependancies to build these first... all: $(BINS) @@ -299,7 +300,7 @@ all-static: LDLIBS:=-static $(LDLIBS) all-static: $(BINS) proxmark3: LDLIBS+=$(LUALIB) $(JANSSONLIB) $(MBEDTLSLIB) $(CBORLIB) $(ZLIB) $(REVENGLIB) $(QTLDLIBS) -proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(OBJCOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(LUALIB) $(JANSSONLIB) $(CBORLIB) $(REVENGLIB) $(MBEDTLSLIB) $(ZLIB) lualibs/pm3_cmd.lua lualibs/mf_default_keys.lua +proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(OBJCOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(LUALIB) $(JANSSONLIB) $(CBORLIB) $(REVENGLIB) $(MBEDTLSLIB) $(ZLIB) lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua $(info [=] LD $@) $(Q)$(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(OBJCOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(LDLIBS) -o $@ @@ -321,7 +322,7 @@ lualibs/pm3_cmd.lua: ../include/pm3_cmd.h $(info [=] GEN $@) $(Q)awk -f pm3_cmd_h2lua.awk $^ > $@ -lualibs/mf_default_keys.lua : default_keys.dic +lualibs/mfc_default_keys.lua : mfc_default_keys.dic $(info [=] GEN $@) $(Q)awk -f default_keys_dic2lua.awk $^ > $@ diff --git a/client/cmdflashmem.c b/client/cmdflashmem.c index a89d2eae62..905e6c6c8a 100644 --- a/client/cmdflashmem.c +++ b/client/cmdflashmem.c @@ -59,9 +59,9 @@ static int usage_flashmem_load(void) { PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, " mem load f myfile"); // upload file myfile at default offset 0 PrintAndLogEx(NORMAL, " mem load f myfile o 1024"); // upload file myfile at offset 1024 - PrintAndLogEx(NORMAL, " mem load f default_keys m"); - PrintAndLogEx(NORMAL, " mem load f default_pwd t"); - PrintAndLogEx(NORMAL, " mem load f default_iclass_keys i"); + PrintAndLogEx(NORMAL, " mem load f dictionaries/mfc_default_keys m"); + PrintAndLogEx(NORMAL, " mem load f dictionaries/t55xx_default_pwds t"); + PrintAndLogEx(NORMAL, " mem load f dictionaries/iclass_default_keys i"); return PM3_SUCCESS; } static int usage_flashmem_dump(void) { diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 3cbbd1a675..4b815355b8 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -244,8 +244,8 @@ static int usage_hf_iclass_chk(void) { PrintAndLogEx(NORMAL, " e elite"); PrintAndLogEx(NORMAL, " c credit key (if not use, default is debit)"); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, " hf iclass chk f default_iclass_keys.dic"); - PrintAndLogEx(NORMAL, " hf iclass chk f default_iclass_keys.dic e"); + PrintAndLogEx(NORMAL, " hf iclass chk f dictionaries/iclass_default_keys.dic"); + PrintAndLogEx(NORMAL, " hf iclass chk f dictionaries/iclass_default_keys.dic e"); return 0; } static int usage_hf_iclass_lookup(void) { @@ -260,8 +260,8 @@ static int usage_hf_iclass_lookup(void) { PrintAndLogEx(NORMAL, " r raw"); PrintAndLogEx(NORMAL, " e elite"); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, " hf iclass lookup u 9655a400f8ff12e0 p f0ffffffffffffff m 0000000089cb984b f default_iclass_keys.dic"); - PrintAndLogEx(NORMAL, " hf iclass lookup u 9655a400f8ff12e0 p f0ffffffffffffff m 0000000089cb984b f default_iclass_keys.dic e"); + PrintAndLogEx(NORMAL, " hf iclass lookup u 9655a400f8ff12e0 p f0ffffffffffffff m 0000000089cb984b f dictionaries/iclass_default_keys.dic"); + PrintAndLogEx(NORMAL, " hf iclass lookup u 9655a400f8ff12e0 p f0ffffffffffffff m 0000000089cb984b f dictionaries/iclass_default_keys.dic e"); return 0; } static int usage_hf_iclass_permutekey(void) { diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 3c88a23eaa..0586453204 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -206,7 +206,7 @@ static int usage_t55xx_chk() { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, " lf t55xx chk m"); - PrintAndLogEx(NORMAL, " lf t55xx chk i default_pwd.dic"); + PrintAndLogEx(NORMAL, " lf t55xx chk i dictionaries/t55xx_default_pwds.dic"); PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } diff --git a/client/default_iclass_keys.dic b/client/dictionaries/iclass_default_keys.dic similarity index 100% rename from client/default_iclass_keys.dic rename to client/dictionaries/iclass_default_keys.dic diff --git a/client/default_keys.dic b/client/dictionaries/mfc_default_keys.dic similarity index 99% rename from client/default_keys.dic rename to client/dictionaries/mfc_default_keys.dic index 54c355de41..c33736806d 100644 --- a/client/default_keys.dic +++ b/client/dictionaries/mfc_default_keys.dic @@ -22,7 +22,7 @@ a0478cc39091, # d2ece8b9395e, //lib # -# more Keys from mf_default_keys.lua +# more Keys from mfc_default_keys.lua 000000000001, 000000000002, 00000000000a, diff --git a/client/dictionaries/bmp_sort_keys.dic b/client/dictionaries/mfc_keys_bmp_sorted.dic similarity index 100% rename from client/dictionaries/bmp_sort_keys.dic rename to client/dictionaries/mfc_keys_bmp_sorted.dic diff --git a/client/dictionaries/icbpm_sort_keys.dic b/client/dictionaries/mfc_keys_icbmp_sorted.dic similarity index 100% rename from client/dictionaries/icbpm_sort_keys.dic rename to client/dictionaries/mfc_keys_icbmp_sorted.dic diff --git a/client/dictionaries/mrzd_sort_keys.dic b/client/dictionaries/mfc_keys_mrzd_sorted.dic similarity index 100% rename from client/dictionaries/mrzd_sort_keys.dic rename to client/dictionaries/mfc_keys_mrzd_sorted.dic diff --git a/client/default_ultralight_keys.dic b/client/dictionaries/mfulc_default_keys.dic similarity index 100% rename from client/default_ultralight_keys.dic rename to client/dictionaries/mfulc_default_keys.dic diff --git a/client/default_pwd.dic b/client/dictionaries/t55xx_default_pwds.dic similarity index 100% rename from client/default_pwd.dic rename to client/dictionaries/t55xx_default_pwds.dic diff --git a/client/luascripts/mfkeys.lua b/client/luascripts/mfckeys.lua similarity index 96% rename from client/luascripts/mfkeys.lua rename to client/luascripts/mfckeys.lua index f15bb6d5e2..128967c372 100644 --- a/client/luascripts/mfkeys.lua +++ b/client/luascripts/mfckeys.lua @@ -9,7 +9,7 @@ Copyright (C) 2013 m h swende --]] local cmds = require('commands') -local keylist = require('mf_default_keys') +local keylist = require('mfc_default_keys') local lib14a = require('read14a') local getopt = require('getopt') local utils = require('utils') @@ -19,9 +19,9 @@ author = "Holiman" version = 'v1.0.1' desc = ("This script implements Mifare check keys.\ It utilises a large list of default keys (currently %d keys).\ -If you want to add more, just put them inside /lualibs/mf_default_keys.lua\n"):format(#keylist) +If you want to add more, just put them inside /lualibs/mfc_default_keys.lua\n"):format(#keylist) example = [[ - 1. script run mfkeys + 1. script run mfckeys ]] usage = [[ Arguments: @@ -54,7 +54,7 @@ end -- waits for answer from pm3 device local function checkCommand(response) if not response then - print("Timeout while waiting for response. Increase TIMEOUT in mfkeys.lua to wait longer") + print("Timeout while waiting for response. Increase TIMEOUT in mfckeys.lua to wait longer") return nil, "Timeout while waiting for device to respond" end @@ -230,7 +230,7 @@ local function perform_check(numsectors) local end_time = os.time() print('') - print('[+] mfkeys - Checkkey execution time: '..os.difftime(end_time, start_time)..' sec') + print('[+] mfckeys - Checkkey execution time: '..os.difftime(end_time, start_time)..' sec') core.fast_push_mode(false) diff --git a/client/scripting.c b/client/scripting.c index 1f6c61ff81..596b535fa9 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -50,7 +50,7 @@ static int l_clearCommandBuffer(lua_State *L) { } /** - * Enable / Disable fast push mode for lua scripts like mfkeys + * Enable / Disable fast push mode for lua scripts like mfckeys * The following params expected: * *@brief l_fast_push_mode diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index f143438c42..75c554e940 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -166,7 +166,7 @@ p : EPURSE m : macs e : elite -pm3 --> hf iclass lookup u 010a0ffff7ff12e0 p feffffffffffffff m 66348979153c41b9 f default_iclass_keys.dic e +pm3 --> hf iclass lookup u 010a0ffff7ff12e0 p feffffffffffffff m 66348979153c41b9 f dictionaries/iclass_default_keys.dic e ``` ## Mifare @@ -181,7 +181,7 @@ Options card memory : 0 - MINI(320 bytes), 1 - 1K, 2 - 2K, 4 - 4K d : write keys to binary file -pm3 --> hf mf chk *1 ? d default_keys.dic +pm3 --> hf mf chk *1 ? d dictionaries/mfc_default_keys.dic ``` Check for default keys from local memory @@ -254,7 +254,7 @@ pm3 --> hf mf sim u 353c2aa6 Simulate Mifare Sequence ``` -pm3 --> hf mf chk *1 ? d default_keys.dic +pm3 --> hf mf chk *1 ? d dictionaries/mfc_default_keys.dic pm3 --> hf mf dump 1 pm3 --> script run dumptoemul -i dumpdata.bin pm3 --> hf mf eload 353C2AA6 @@ -263,7 +263,7 @@ pm3 --> hf mf sim u 353c2aa6 Clone Mifare 1K Sequence ``` -pm3 --> hf mf chk *1 ? d default_keys.dic +pm3 --> hf mf chk *1 ? d dictionaries/mfc_default_keys.dic pm3 --> hf mf dump pm3 --> hf mf restore 1 u 4A6CE843 k hf-mf-A29558E4-key.bin f hf-mf-A29558E4-data.bin ``` @@ -512,9 +512,9 @@ m : upload 6 bytes keys (mifare key dictionary) i : upload 8 bytes keys (iClass key dictionary) t : upload 4 bytes keys (pwd dictionary) -pm3 --> mem load f default_keys m -pm3 --> mem load f default_pwd t -pm3 --> mem load f default_iclass_keys i +pm3 --> mem load f dictionaries/mfc_default_keys m +pm3 --> mem load f dictionaries/t55xx_default_pwds t +pm3 --> mem load f dictionaries/iclass_default_keys i ``` ## Sim Module diff --git a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md index 0d3665f37d..84f64821cd 100644 --- a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md +++ b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md @@ -1,9 +1,9 @@ ### First things on your RDV40 You will need to run these commands to make sure your rdv4 is prepared ``` -pm3 --> mem load f default_keys m -pm3 --> mem load f default_pwd t -pm3 --> mem load f default_iclass_keys i +pm3 --> mem load f dictionaries/mfc_default_keys m +pm3 --> mem load f dictionaries/t55xx_default_pwds t +pm3 --> mem load f dictionaries/iclass_default_keys i pm3 --> lf t55xx deviceconfig a 29 b 17 c 15 d 47 e 15 p pm3 --> lf t55xx deviceconfig r 1 a 31 b 20 c 18 d 50 e 15 p pm3 --> lf t55xx deviceconfig r 2 a 31 b 20 c 18 d 40 e 15 p