summer restructuring:

* .h include only the strict minimum for their own parsing
  * this forces all files to include explicitment their needs and not count on far streched dependencies
  * this helps Makefile to rebuild only the minimum
  * according to this rule, most standalone .h are now gone
  * big app.h is gone
  * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway
* all unrequired include were removed
* split common/ into common/ (client+arm) and common_arm/ (os+bootloader)
  * bring zlib to common/
  * bring stuff not really/not yet used in common back to armsrc/ or client/
  * bring liblua into client/
  * bring uart into client/
  * move some portions of code around (dbprint, protocols,...)
* rename unused files into *_disabled.[ch] to make it explicit
* rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash
* remove PrintAndLogDevice
* move deprecated-hid-flasher from client to tools
* Makefiles
  * treat deps in armsrc/ as in client/
  * client: stop on warning (-Werror), same as for armsrc/

Tested on:

* all standalone modes
* Linux
This commit is contained in:
Philippe Teuwen committed 2019-08-11 21:42:01 +02:00
1 parent b7d412d27b
commit d19754567d
447 files changed
+2553 -2599

No files matched your search

+8 -8
View File
@@ -28,7 +28,7 @@ ENV_CFLAGS := $(CFLAGS)
platform = $(shell uname)
VPATH = ../common ../zlib ../uart
VPATH = ../common ../common/zlib uart
OBJDIR = obj
LDLIBS =
@@ -44,18 +44,19 @@ ifneq ($(platform),Darwin)
LDLIBS += -Wl,--as-needed -latomic -Wl,--no-as-needed
endif
LUALIB = ../liblua/liblua.a
LUALIBPATH = ./liblua
LUALIB = $(LUALIBPATH)/liblua.a
JANSSONLIBPATH = ./jansson
JANSSONLIB = $(JANSSONLIBPATH)/libjansson.a
MBEDTLSLIBPATH = ../common/mbedtls
MBEDTLSLIB = $(MBEDTLSLIBPATH)/libmbedtls.a
CBORLIBPATH = ./tinycbor
CBORLIB = $(CBORLIBPATH)/tinycbor.a
LIBS = -I../zlib -I../uart -I../liblua -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH)
LIBS = -I../common/zlib -Iuart -I$(LUALIBPATH) -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH)
INCLUDES_CLIENT = -I. -I../include -I../common -I/opt/local/include $(LIBS)
LDFLAGS = $(ENV_LDFLAGS)
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -g -O3
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -Werror -g -O3
ifneq (,$(findstring MINGW,$(platform)))
CFLAGS += -mno-ms-bitfields
endif
@@ -117,7 +118,7 @@ endif
# Flags to generate temporary dependency files
DEPFLAGS = -MT $@ -MMD -MP -MF $(OBJDIR)/$*.Td
# make temporary to final dependeny files after successful compilation
# make temporary to final dependency files after successful compilation
POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d
CORESRCS = uart_posix.c \
@@ -237,7 +238,6 @@ CMDSRCS = crapto1/crapto1.c \
scripting.c \
cmdscript.c \
pm3_bitlib.c \
protocols.c \
cmdcrc.c \
reveng/preset.c \
reveng/reveng.c \
@@ -333,7 +333,7 @@ lualibs/mf_default_keys.lua : default_keys.dic
clean:
$(Q)$(RM) $(CLEAN)
$(Q)$(MAKE) --no-print-directory -C ../liblua clean
$(Q)$(MAKE) --no-print-directory -C $(LUALIBPATH) clean
$(Q)$(MAKE) --no-print-directory -C $(JANSSONLIBPATH) clean
$(Q)$(MAKE) --no-print-directory -C $(MBEDTLSLIBPATH) clean
$(Q)$(MAKE) --no-print-directory -C $(CBORLIBPATH) clean
@@ -344,7 +344,7 @@ tarbin: $(BINS)
lua_build:
$(info [*] MAKE liblua for $(LUAPLATFORM))
$(Q)$(MAKE) --no-print-directory -C ../liblua $(LUAPLATFORM)
$(Q)$(MAKE) --no-print-directory -C $(LUALIBPATH) $(LUAPLATFORM)
jansson_build:
$(info [*] MAKE jansson)
-1
View File
@@ -9,7 +9,6 @@
//-----------------------------------------------------------------------------
#include "cliparser.h"
#include <stdio.h>
#include <string.h>
void **argtable = NULL;
-1
View File
@@ -12,7 +12,6 @@
#define __CLIPARSER_H
#include "argtable3.h"
#include "util.h"
#include <stdbool.h>
#define arg_param_begin arg_lit0("hH", "help", "print this help and exit")
#define arg_param_end arg_end(20)
+13
View File
@@ -9,6 +9,19 @@
//-----------------------------------------------------------------------------
#include "cmdanalyse.h"
#include <stdlib.h> // size_t
#include <string.h>
#include <ctype.h> // tolower
#include "commonutil.h" // reflect...
#include "comms.h" // clearCommandBuffer
#include "cmdparser.h" // command_t
#include "ui.h" // PrintAndLog
#include "crc.h"
#include "crc16.h" // crc16 ccitt
#include "tea.h"
#include "legic_prng.h"
static int CmdHelp(const char *Cmd);
static int usage_analyse_lcr(void) {
+1 -14
View File
@@ -11,20 +11,7 @@
#ifndef CMDANALYSE_H__
#define CMDANALYSE_H__
#include <stdlib.h> // size_t
#include <string.h>
#include <unistd.h>
#include "cmdmain.h"
#include "proxmark3.h"
#include "ui.h" // PrintAndLog
#include "util.h"
#include "crc.h"
#include "crc16.h" // crc16 ccitt
#include "tea.h"
#include "legic_prng.h"
#include "loclass/elite_crack.h"
#include "mifare/mfkey.h" // nonce2key
#include "util_posix.h" // msclock
#include "common.h"
int CmdAnalyse(const char *Cmd);
#endif
+17
View File
@@ -9,6 +9,23 @@
//-----------------------------------------------------------------------------
#include "cmdcrc.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#ifdef _WIN32
# include <io.h>
# include <fcntl.h>
# ifndef STDIN_FILENO
# define STDIN_FILENO 0
# endif /* STDIN_FILENO */
#endif /* _WIN32 */
#include "reveng/reveng.h"
#include "ui.h"
#include "util.h"
#define MAX_ARGS 20
static int split(char *str, char *arr[MAX_ARGS]) {
+1 -16
View File
@@ -11,22 +11,7 @@
#ifndef CMDCRC_H__
#define CMDCRC_H__
#ifdef _WIN32
# include <io.h>
# include <fcntl.h>
# ifndef STDIN_FILENO
# define STDIN_FILENO 0
# endif /* STDIN_FILENO */
#endif /* _WIN32 */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdmain.h"
#include "reveng/reveng.h"
#include "ui.h"
#include "util.h"
#include "common.h"
int CmdCrc(const char *Cmd);
+15
View File
@@ -9,6 +9,21 @@
//-----------------------------------------------------------------------------
#include "cmddata.h"
#include <stdio.h>
#include <string.h>
#include <limits.h> // for CmdNorm INT_MIN && INT_MAX
#include <math.h> // pow
#include <ctype.h> // tolower
#include "commonutil.h" // ARRAYLEN
#include "cmdparser.h" // for command_t
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "comms.h"
#include "lfdemod.h" // for demod code
#include "loclass/cipherutils.h" // for decimating samples in getsamples
#include "cmdlfem4x.h" // askem410xdecode
uint8_t DemodBuffer[MAX_DEMOD_BUF_LEN];
size_t DemodBufferLen = 0;
size_t g_DemodStartIdx = 0;
+2 -19
View File
@@ -11,26 +11,9 @@
#ifndef CMDDATA_H__
#define CMDDATA_H__
#include <stdlib.h> //size_t
#include <stdint.h> //uint_32+
#include <stdbool.h> //bool
#include "cmdparser.h" // for command_t
#include "common.h"
#include <stdio.h> // also included in util.h
#include <string.h> // also included in util.h
#include <inttypes.h>
#include <limits.h> // for CmdNorm INT_MIN && INT_MAX
#include "util.h"
#include "cmdmain.h"
#include "proxmark3.h"// sendcommand
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "comms.h"
#include "lfdemod.h" // for demod code
#include "crc.h" // for pyramid checksum maxim
#include "crc16.h" // for FDXB demod checksum
#include "loclass/cipherutils.h" // for decimating samples in getsamples
#include "cmdlfem4x.h" // askem410xdecode
//#include <stdlib.h> //size_t
int CmdData(const char *Cmd);
+11 -3
View File
@@ -9,9 +9,17 @@
//-----------------------------------------------------------------------------
#include "cmdflashmem.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "pmflash.h"
#include "loclass/fileutils.h" //saveFile
#include "comms.h" //getfromdevice
#include "cmdflashmemspiffs.h" // spiffs commands
#include "mbedtls/rsa.h"
#include "mbedtls/sha1.h"
#include "mbedtls/base64.h"
#define MCK 48000000
#define FLASH_MINFAST 24000000 //33000000
@@ -209,7 +217,7 @@ static int CmdFlashMemLoad(const char *Cmd) {
}
if (datalen > FLASH_MEM_MAX_SIZE) {
PrintAndLogDevice(ERR, "error, filesize is larger than available memory");
PrintAndLogEx(ERR, "error, filesize is larger than available memory");
free(data);
return PM3_EOVFLOW;
}
@@ -310,7 +318,7 @@ static int CmdFlashMemDump(const char *Cmd) {
uint8_t *dump = calloc(len, sizeof(uint8_t));
if (!dump) {
PrintAndLogDevice(ERR, "error, cannot allocate memory ");
PrintAndLogEx(ERR, "error, cannot allocate memory ");
return PM3_EMALLOC;
}
-13
View File
@@ -11,20 +11,7 @@
#ifndef CMDFLASHMEM_H__
#define CMDFLASHMEM_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "pmflash.h"
#include "common.h"
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "util.h"
#include "util_posix.h" // msclock
#include "loclass/fileutils.h" //saveFile
#include "comms.h" //getfromdevice
#include "cmdflashmemspiffs.h" // spiffs commands
typedef enum {
DICTIONARY_NONE = 0,
+8 -5
View File
@@ -9,9 +9,12 @@
//-----------------------------------------------------------------------------
#include "cmdflashmemspiffs.h"
#include "mbedtls/base64.h"
#include "mbedtls/rsa.h"
#include "mbedtls/sha1.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "pmflash.h"
#include "loclass/fileutils.h" //saveFile
#include "comms.h" //getfromdevice
static int CmdHelp(const char *Cmd);
@@ -278,7 +281,7 @@ static int CmdFlashMemSpiFFSDump(const char *Cmd) {
uint8_t *dump = calloc(len, sizeof(uint8_t));
if (!dump) {
PrintAndLogDevice(ERR, "error, cannot allocate memory ");
PrintAndLogEx(ERR, "error, cannot allocate memory ");
return PM3_EMALLOC;
}
@@ -358,7 +361,7 @@ static int CmdFlashMemSpiFFSLoad(const char *Cmd) {
}
if (datalen > FLASH_MEM_MAX_SIZE) {
PrintAndLogDevice(ERR, "error, filesize is larger than available memory");
PrintAndLogEx(ERR, "error, filesize is larger than available memory");
free(data);
return PM3_EOVFLOW;
}
-12
View File
@@ -11,19 +11,7 @@
#ifndef CMDFLASHMEMSPIFFS_H__
#define CMDFLASHMEMSPIFFS_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "pmflash.h"
#include "common.h"
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "util.h"
#include "util_posix.h" // msclock
#include "loclass/fileutils.h" //saveFile
#include "comms.h" //getfromdevice
int CmdFlashMemSpiFFS(const char *Cmd);
+32 -10
View File
@@ -8,7 +8,29 @@
//-----------------------------------------------------------------------------
// High frequency commands
//-----------------------------------------------------------------------------
#include "cmdhf.h"
//#include "cmdhf.h"
#include <ctype.h> // tolower
#include "cmdparser.h" // command_t
#include "comms.h" // clearCommandBuffer
#include "cmdhf14a.h" // ISO14443-A
#include "cmdhf14b.h" // ISO14443-B
#include "cmdhf15.h" // ISO15693
#include "cmdhfepa.h"
#include "cmdhflegic.h" // LEGIC
#include "cmdhficlass.h" // ICLASS
#include "cmdhfmf.h" // CLASSIC
#include "cmdhfmfu.h" // ULTRALIGHT/NTAG etc
#include "cmdhfmfp.h" // Mifare Plus
#include "cmdhfmfdes.h" // DESFIRE
#include "cmdhftopaz.h" // TOPAZ
#include "cmdhffelica.h" // ISO18092 / FeliCa
#include "cmdhffido.h" // FIDO authenticators
#include "cmdhfthinfilm.h" // Thinfilm
#include "cmdtrace.h" // trace list
#include "ui.h"
static int CmdHelp(const char *Cmd);
@@ -101,15 +123,15 @@ int CmdHFSearch(const char *Cmd) {
}
}
/*
if (IfPm3Felica()) {
ans = CmdHFFelicaReader("s");
if (ans) {
PrintAndLogEx(NORMAL, "\nValid " _GREEN_("ISO18092 / FeliCa tag") " found\n");
return ans;
}
}
*/
//if (IfPm3Felica()) {
// ans = CmdHFFelicaReader("s");
// if (ans) {
// PrintAndLogEx(NORMAL, "\nValid " _GREEN_("ISO18092 / FeliCa tag") " found\n");
// return ans;
// }
//}
PrintAndLogEx(FAILED, "\nno known/supported 13.56 MHz tags found\n");
return PM3_ESOFT;
+1 -22
View File
@@ -11,28 +11,7 @@
#ifndef CMDHF_H__
#define CMDHF_H__
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "proxmark3.h"
#include "graph.h"
#include "ui.h"
#include "cmdparser.h"
#include "cmdhf14a.h" // ISO14443-A
#include "cmdhf14b.h" // ISO14443-B
#include "cmdhf15.h" // ISO15693
#include "cmdhfepa.h"
#include "cmdhflegic.h" // LEGIC
#include "cmdhficlass.h" // ICLASS
#include "cmdhfmf.h" // CLASSIC
#include "cmdhfmfu.h" // ULTRALIGHT/NTAG etc
#include "cmdhfmfp.h" // Mifare Plus
#include "cmdhfmfdes.h" // DESFIRE
#include "cmdhftopaz.h" // TOPAZ
#include "cmdhffelica.h" // ISO18092 / FeliCa
#include "cmdhffido.h" // FIDO authenticators
#include "cmdhfthinfilm.h" // Thinfilm
#include "cmdtrace.h" // trace list
#include "common.h"
int CmdHF(const char *Cmd);
int CmdHFTune(const char *Cmd);
+15
View File
@@ -12,6 +12,21 @@
//-----------------------------------------------------------------------------
#include "cmdhf14a.h"
#include <ctype.h>
#include <string.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "comms.h" // clearCommandBuffer
#include "cmdtrace.h"
#include "cliparser/cliparser.h"
#include "cmdhfmf.h"
#include "cmdhfmfu.h"
#include "emv/emvcore.h"
#include "ui.h"
#include "crc16.h"
#include "util_posix.h" // msclock
bool APDUInFramingEnable = true;
static int CmdHelp(const char *Cmd);
+2 -18
View File
@@ -12,25 +12,9 @@
#ifndef CMDHF14A_H__
#define CMDHF14A_H__
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "proxmark3.h"
#include "common.h"
#include "ui.h"
#include "util.h"
#include "cmdparser.h"
#include "cmdmain.h"
#include "mifare.h"
#include "cmdhfmf.h"
#include "cmdhfmfu.h"
#include "cmdhf.h" // list cmd
#include "mifare/mifarehost.h"
#include "emv/apduinfo.h"
#include "emv/emvcore.h"
#include "mifare.h" // structs
// structure and database for uid -> tagtype lookups
typedef struct {
+11
View File
@@ -11,6 +11,17 @@
#include "cmdhf14b.h"
#include <ctype.h>
#include "loclass/fileutils.h"
#include "cmdparser.h" // command_t
#include "comms.h" // clearCommandBuffer
#include "cmdtrace.h"
#include "crc16.h"
#include "cmdhf14a.h"
#include "protocols.h" // definitions of ISO14B protocol
#define TIMEOUT 2000
static int CmdHelp(const char *Cmd);
+1 -17
View File
@@ -11,23 +11,7 @@
#ifndef CMDHF14B_H__
#define CMDHF14B_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include "crc16.h"
#include "proxmark3.h"
#include "graph.h"
#include "util.h"
#include "ui.h"
#include "cmdparser.h"
#include "cmdmain.h"
#include "cmdhf14a.h"
#include "cmdhf.h"
#include "prng.h"
#include "mbedtls/sha1.h"
#include "mifare.h" // structs/enum for ISO14B
#include "protocols.h" // definitions of ISO14B protocol
#include "common.h"
int CmdHF14B(const char *Cmd);
+13
View File
@@ -24,6 +24,19 @@
// variant, but offers the possibility to analyze the waveforms directly.
#include "cmdhf15.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "comms.h" // clearCommandBuffer
#include "cmdtrace.h"
#include "iso15693tools.h"
#include "graph.h"
#include "crc16.h" // iso15 crc
#include "cmddata.h" // getsamples
#include "loclass/fileutils.h" // savefileEML
#define FrameSOF Iso15693FrameSOF
#define Logic0 Iso15693Logic0
#define Logic1 Iso15693Logic1
+1 -14
View File
@@ -11,20 +11,7 @@
#ifndef CMDHF15_H__
#define CMDHF15_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "proxmark3.h"
#include "graph.h"
#include "ui.h"
#include "util.h"
#include "cmdparser.h"
#include "crc16.h" // iso15 crc
#include "cmdmain.h"
#include "cmddata.h" // getsamples
#include "loclass/fileutils.h" // savefileEML
#include "common.h"
int CmdHF15(const char *Cmd);
+12
View File
@@ -9,6 +9,18 @@
//-----------------------------------------------------------------------------
#include "cmdhfepa.h"
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <inttypes.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "comms.h" // clearCommandBuffer
#include "ui.h"
#include "util_posix.h"
static int CmdHelp(const char *Cmd);
// Perform (part of) the PACE protocol
-12
View File
@@ -11,19 +11,7 @@
#ifndef CMDHFEPA_H__
#define CMDHFEPA_H__
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include "util.h"
#include "proxmark3.h"
#include "common.h"
#include "ui.h"
#include "cmdparser.h"
#include "cmdmain.h"
#include "util_posix.h"
int CmdHFEPA(const char *Cmd);
+13
View File
@@ -9,6 +9,19 @@
//-----------------------------------------------------------------------------
#include "cmdhffelica.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "cmdtrace.h"
#include "crc16.h"
#include "ui.h"
#include "mifare.h" // felica_card_select_t struct
static int CmdHelp(const char *Cmd);
/*
-12
View File
@@ -11,19 +11,7 @@
#ifndef CMDHFFELICA_H__
#define CMDHFFELICA_H__
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "proxmark3.h"
#include "common.h"
#include "ui.h"
#include "util.h"
#include "cmdparser.h"
#include "comms.h" // getfromdevice
#include "cmdhf.h" // list cmd
#include "mifare.h" // felica_card_select_t struct
int CmdHFFelica(const char *Cmd);
+7 -15
View File
@@ -21,31 +21,23 @@
#include "cmdhffido.h"
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <jansson.h>
#include <mbedtls/x509_crt.h>
#include <mbedtls/x509.h>
#include <mbedtls/pk.h>
#include "cmdparser.h" // command_t
#include "commonutil.h"
#include "comms.h"
#include "cmdmain.h"
#include "util.h"
#include "ui.h"
#include "proxmark3.h"
#include "mifare.h"
#include "emv/emvcore.h"
#include "emv/emvjson.h"
#include "emv/dump.h"
#include "cliparser/cliparser.h"
#include "crypto/asn1utils.h"
#include "crypto/libpcrypto.h"
#include "fido/cbortools.h"
#include "fido/fidocore.h"
#include "fido/cose.h"
#include "emv/dump.h"
#include "ui.h"
#include "cmdhf14a.h"
static int CmdHelp(const char *Cmd);
+2 -1
View File
@@ -21,7 +21,8 @@
#ifndef CMDHFFIDO_H__
#define CMDHFFIDO_H__
#include "common.h"
int CmdHFFido(const char *Cmd);
#endif
+160 -4
View File
@@ -13,6 +13,23 @@
#include "cmdhficlass.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "cmdtrace.h"
#include "util_posix.h"
#include "comms.h"
#include "mbedtls/des.h"
#include "loclass/cipherutils.h"
#include "loclass/cipher.h"
#include "loclass/ikeys.h"
#include "loclass/elite_crack.h"
#include "loclass/fileutils.h"
#include "protocols.h"
#define NUM_CSNS 9
#define ICLASS_KEYS_MAX 8
@@ -271,6 +288,145 @@ static int xorbits_8(uint8_t val) {
return res & 1;
}
*/
// iclass / picopass chip config structures and shared routines
typedef struct {
uint8_t app_limit; //[8]
uint8_t otp[2]; //[9-10]
uint8_t block_writelock;//[11]
uint8_t chip_config; //[12]
uint8_t mem_config; //[13]
uint8_t eas; //[14]
uint8_t fuses; //[15]
} picopass_conf_block;
typedef struct {
uint8_t csn[8];
picopass_conf_block conf;
uint8_t epurse[8];
uint8_t key_d[8];
uint8_t key_c[8];
uint8_t app_issuer_area[8];
} picopass_hdr;
static uint8_t isset(uint8_t val, uint8_t mask) {
return (val & mask);
}
static uint8_t notset(uint8_t val, uint8_t mask) {
return !(val & mask);
}
static void fuse_config(const picopass_hdr *hdr) {
uint8_t fuses = hdr->conf.fuses;
if (isset(fuses, FUSE_FPERS))
PrintAndLogEx(SUCCESS, "\tMode: Personalization [Programmable]");
else
PrintAndLogEx(NORMAL, "\tMode: Application [Locked]");
if (isset(fuses, FUSE_CODING1)) {
PrintAndLogEx(NORMAL, "\tCoding: RFU");
} else {
if (isset(fuses, FUSE_CODING0))
PrintAndLogEx(NORMAL, "\tCoding: ISO 14443-2 B/ISO 15693");
else
PrintAndLogEx(NORMAL, "\tCoding: ISO 14443B only");
}
// 1 1
if (isset(fuses, FUSE_CRYPT1) && isset(fuses, FUSE_CRYPT0)) PrintAndLogEx(SUCCESS, "\tCrypt: Secured page, keys not locked");
// 1 0
if (isset(fuses, FUSE_CRYPT1) && notset(fuses, FUSE_CRYPT0)) PrintAndLogEx(NORMAL, "\tCrypt: Secured page, keys locked");
// 0 1
if (notset(fuses, FUSE_CRYPT1) && isset(fuses, FUSE_CRYPT0)) PrintAndLogEx(SUCCESS, "\tCrypt: Non secured page");
// 0 0
if (notset(fuses, FUSE_CRYPT1) && notset(fuses, FUSE_CRYPT0)) PrintAndLogEx(NORMAL, "\tCrypt: No auth possible. Read only if RA is enabled");
if (isset(fuses, FUSE_RA))
PrintAndLogEx(NORMAL, "\tRA: Read access enabled");
else
PrintAndLogEx(WARNING, "\tRA: Read access not enabled");
}
static void getMemConfig(uint8_t mem_cfg, uint8_t chip_cfg, uint8_t *max_blk, uint8_t *app_areas, uint8_t *kb) {
// mem-bit 5, mem-bit 7, chip-bit 4: defines chip type
uint8_t k16 = isset(mem_cfg, 0x80);
//uint8_t k2 = isset(mem_cfg, 0x08);
uint8_t book = isset(mem_cfg, 0x20);
if (isset(chip_cfg, 0x10) && !k16 && !book) {
*kb = 2;
*app_areas = 2;
*max_blk = 31;
} else if (isset(chip_cfg, 0x10) && k16 && !book) {
*kb = 16;
*app_areas = 2;
*max_blk = 255; //16kb
} else if (notset(chip_cfg, 0x10) && !k16 && !book) {
*kb = 16;
*app_areas = 16;
*max_blk = 255; //16kb
} else if (isset(chip_cfg, 0x10) && k16 && book) {
*kb = 32;
*app_areas = 3;
*max_blk = 255; //16kb
} else if (notset(chip_cfg, 0x10) && !k16 && book) {
*kb = 32;
*app_areas = 17;
*max_blk = 255; //16kb
} else {
*kb = 32;
*app_areas = 2;
*max_blk = 255;
}
}
static void mem_app_config(const picopass_hdr *hdr) {
uint8_t mem = hdr->conf.mem_config;
uint8_t chip = hdr->conf.chip_config;
uint8_t applimit = hdr->conf.app_limit;
uint8_t kb = 2;
uint8_t app_areas = 2;
uint8_t max_blk = 31;
getMemConfig(mem, chip, &max_blk, &app_areas, &kb);
if (applimit < 6) applimit = 26;
if (kb == 2 && (applimit > 0x1f)) applimit = 26;
PrintAndLogEx(NORMAL, " Mem: %u KBits/%u App Areas (%u * 8 bytes) [%02X]", kb, app_areas, max_blk, mem);
PrintAndLogEx(NORMAL, "\tAA1: blocks 06-%02X", applimit);
PrintAndLogEx(NORMAL, "\tAA2: blocks %02X-%02X", applimit + 1, max_blk);
PrintAndLogEx(NORMAL, "\tOTP: 0x%02X%02X", hdr->conf.otp[1], hdr->conf.otp[0]);
PrintAndLogEx(NORMAL, "\nKeyAccess:");
uint8_t book = isset(mem, 0x20);
if (book) {
PrintAndLogEx(NORMAL, "\tRead A - Kd");
PrintAndLogEx(NORMAL, "\tRead B - Kc");
PrintAndLogEx(NORMAL, "\tWrite A - Kd");
PrintAndLogEx(NORMAL, "\tWrite B - Kc");
PrintAndLogEx(NORMAL, "\tDebit - Kd or Kc");
PrintAndLogEx(NORMAL, "\tCredit - Kc");
} else {
PrintAndLogEx(NORMAL, "\tRead A - Kd or Kc");
PrintAndLogEx(NORMAL, "\tRead B - Kd or Kc");
PrintAndLogEx(NORMAL, "\tWrite A - Kc");
PrintAndLogEx(NORMAL, "\tWrite B - Kc");
PrintAndLogEx(NORMAL, "\tDebit - Kd or Kc");
PrintAndLogEx(NORMAL, "\tCredit - Kc");
}
}
static void print_picopass_info(const picopass_hdr *hdr) {
fuse_config(hdr);
mem_app_config(hdr);
}
static void printIclassDumpInfo(uint8_t *iclass_dump) {
print_picopass_info((picopass_hdr *) iclass_dump);
}
static int CmdHFiClassList(const char *Cmd) {
(void)Cmd; // Cmd is not used so far
//PrintAndLogEx(NORMAL, "Deprecated command, use 'hf list iclass' instead");
@@ -550,14 +706,14 @@ static int CmdHFiClassELoad(const char *Cmd) {
fseek(f, 0, SEEK_SET);
if (fsize <= 0) {
PrintAndLogDevice(ERR, "error, when getting filesize");
PrintAndLogEx(ERR, "error, when getting filesize");
fclose(f);
return 1;
}
uint8_t *dump = calloc(fsize, sizeof(uint8_t));
if (!dump) {
PrintAndLogDevice(ERR, "error, cannot allocate memory ");
PrintAndLogEx(ERR, "error, cannot allocate memory ");
fclose(f);
return 1;
}
@@ -569,7 +725,7 @@ static int CmdHFiClassELoad(const char *Cmd) {
//Validate
if (bytes_read < fsize) {
PrintAndLogDevice(ERR, "error, could only read %d bytes (should be %d)", bytes_read, fsize);
PrintAndLogEx(ERR, "error, could only read %d bytes (should be %d)", bytes_read, fsize);
free(dump);
return 1;
}
@@ -1449,7 +1605,7 @@ static int CmdHFiClass_loclass(const char *Cmd) {
errors += testMAC();
errors += doKeyTests(0);
errors += testElite();
if (errors) PrintAndLogDevice(ERR, "There were errors!!!");
if (errors) PrintAndLogEx(ERR, "There were errors!!!");
return errors;
}
return PM3_SUCCESS;
-24
View File
@@ -11,31 +11,7 @@
#ifndef CMDHFICLASS_H__
#define CMDHFICLASS_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
//#include "iso14443crc.h" // Can also be used for iClass, using 0xE012 as CRC-type
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "common.h"
#include "util.h"
#include "comms.h"
#include "mbedtls/des.h"
#include "loclass/cipherutils.h"
#include "loclass/cipher.h"
#include "loclass/ikeys.h"
#include "loclass/elite_crack.h"
#include "loclass/fileutils.h"
#include "protocols.h"
#include "pm3_cmd.h"
#include "cmdhfmfu.h"
#include "cmdhf.h"
#include "protocols.h" // picopass structs,
#include "usb_cdc.h" // for usb_poll_validate_length
typedef struct iclass_block {
uint8_t d[8];
+10
View File
@@ -9,6 +9,16 @@
//-----------------------------------------------------------------------------
#include "cmdhflegic.h"
#include <stdio.h> // for Mingw readline
#include <readline/readline.h>
#include "cmdparser.h" // command_t
#include "comms.h" // clearCommandBuffer
#include "cmdtrace.h"
#include "crc.h"
#include "crc16.h"
#include "loclass/fileutils.h" //saveFile
static int CmdHelp(const char *Cmd);
#define MAX_LENGTH 1024
+3 -12
View File
@@ -11,18 +11,9 @@
#ifndef CMDHFLEGIC_H__
#define CMDHFLEGIC_H__
#include <stdio.h>
#include <string.h>
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "comms.h"
#include "util.h"
#include "crc.h"
#include "legic_prng.h"
#include "legic.h" // legic_card_select_t struct
#include "cmdhf.h" // "hf list"
#include "loclass/fileutils.h" //saveFile
#include "common.h"
#include "legic.h" // struct
int CmdHFLegic(const char *Cmd);
+13
View File
@@ -11,6 +11,19 @@
#include "cmdhflist.h"
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include "commonutil.h" // ARRAYLEN
#include "mifare/mifarehost.h"
#include "mifare/mifaredefault.h"
#include "parity.h" // oddparity
#include "ui.h"
#include "crc16.h"
#include "crapto1/crapto1.h"
#include "protocols.h"
enum MifareAuthSeq {
masNone,
masNt,
+1 -26
View File
@@ -10,32 +10,7 @@
#ifndef CMDHFLIST_H
#define CMDHFLIST_H
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "util.h"
#include "ui.h"
#include "cmdhf14a.h" // ISO14443-A
#include "cmdhf14b.h" // ISO14443-B
#include "cmdhf15.h" // ISO15693
#include "cmdhfepa.h"
#include "cmdhflegic.h" // LEGIC
#include "cmdhficlass.h" // ICLASS
#include "cmdhfmf.h" // CLASSIC
#include "cmdhfmfu.h" // ULTRALIGHT/NTAG etc
#include "cmdhfmfdes.h" // DESFIRE
#include "cmdhftopaz.h" // TOPAZ
#include "cmdhffelica.h" // ISO18092 / FeliCa
#include "emv/cmdemv.h" // EMV
#include "protocols.h"
#include "crapto1/crapto1.h"
#include "mifare/mifarehost.h"
#include "mifare/mifaredefault.h"
#include "parity.h" // oddparity
#include "iso15693tools.h" // ISO15693 crc
#include "common.h"
typedef struct {
uint32_t uid; // UID
+14 -2
View File
@@ -9,10 +9,22 @@
//-----------------------------------------------------------------------------
#include "cmdhfmf.h"
#include "mifare/mifare4.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "comms.h" // clearCommandBuffer
#include "loclass/fileutils.h"
#include "cmdtrace.h"
#include "emv/dump.h"
#include "mifare/mifaredefault.h" // mifare default key array
#include "cliparser/cliparser.h" // argtable
#include "hardnested/hardnested_bf_core.h" // SetSIMDInstr
#include "mifare/mad.h"
#include "mifare/ndef.h"
#include "protocols.h"
#include "util_posix.h" // msclock
#define MFBLOCK_SIZE 16
+2 -19
View File
@@ -11,26 +11,9 @@
#ifndef CMDHFMF_H__
#define CMDHFMF_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <mbedtls/aes.h>
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "common.h"
#include "util.h"
#include "mifare.h" // nonces_t struct
#include "mifare/mfkey.h" // mfkey32_moebious
#include "cmdhfmfhard.h"
#include "mifare/mifarehost.h" // icesector_t, sector_t
#include "util_posix.h" // msclock
#include "mifare/mifaredefault.h" // mifare default key array
#include "cmdhf14a.h" // dropfield
#include "cliparser/cliparser.h" // argtable
#include "hardnested/hardnested_bf_core.h" // SetSIMDInstr
#include "mifare/mfkey.h"
#include "mifare/mifarehost.h" // struct
int CmdHFMF(const char *Cmd);
int CmdHF14AMfELoad(const char *Cmd); // used by cmd hf mfu eload
+9
View File
@@ -9,6 +9,15 @@
//-----------------------------------------------------------------------------
#include "cmdhfmfdes.h"
#include <stdio.h>
#include <string.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmdhf14a.h"
#include "mbedtls/des.h"
uint8_t key_zero_data[16] = { 0x00 };
uint8_t key_ones_data[16] = { 0x01 };
uint8_t key_defa_data[16] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };
+1 -13
View File
@@ -10,19 +10,7 @@
#ifndef __MFDESFIRE_H
#define __MFDESFIRE_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cmdmain.h"
#include "proxmark3.h"
#include "../include/common.h"
#include "../include/mifare.h"
#include "ui.h"
#include "cmdparser.h"
#include "util.h"
#include "cmdhf14a.h"
#include "mbedtls/des.h"
#include "common.h"
int CmdHFMFDes(const char *Cmd);
@@ -10,6 +10,13 @@
#include "cmdhfmfdesfire.h"
#include "cmdparser.h" // command_t
#include "cmdhfmf.h"
#include "util.h"
#include "mbedtls/des.h"
#include "mbedtls/aes.h"
static int CmdHelp(const char *Cmd);
//DESFIRE
@@ -1,10 +1,7 @@
#ifndef __MFDESFIRE_AD_H
#define __MFDESFIRE_AD_H
#include "cmdhfmf.h"
#include "util.h"
#include "mbedtls/des.h"
#include "mbedtls/aes.h"
#include "common.h"
int CmdHFMFDesfire(const char *Cmd);
+5 -5
View File
@@ -21,18 +21,18 @@
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <time.h>
#include <pthread.h>
#include <locale.h>
#include <math.h>
#include <time.h> // MingW
#include "commonutil.h" // ARRAYLEN
#include "comms.h"
#include "proxmark3.h"
#include "cmdmain.h"
#include "ui.h"
#include "util.h"
#include "util_posix.h"
#include "crapto1/crapto1.h"
#include "parity.h"
#include "hardnested/hardnested_bruteforce.h"
#include "hardnested/hardnested_bf_core.h"
#include "hardnested/hardnested_bitarray_core.h"
#include "zlib.h"
+1 -2
View File
@@ -11,8 +11,7 @@
#ifndef CMDHFMFHARD_H__
#define CMDHFMFHARD_H__
#include <stdint.h>
#include <stdbool.h>
#include "common.h"
#define NUM_SUMS 19 // number of possible sum property values
+5 -8
View File
@@ -11,23 +11,20 @@
#include "cmdhfmfp.h"
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "commonutil.h" // ARRAYLEN
#include "comms.h"
#include "cmdmain.h"
#include "util.h"
#include "ui.h"
#include "cmdhf14a.h"
#include "mifare.h"
#include "mifare/mifare4.h"
#include "mifare/mad.h"
#include "mifare/ndef.h"
#include "cliparser/cliparser.h"
#include "crypto/libpcrypto.h"
#include "emv/dump.h"
#include "mifare/mifaredefault.h"
static const uint8_t DefaultKey[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+1 -1
View File
@@ -10,7 +10,7 @@
#ifndef CMDHFMFP_H__
#define CMDHFMFP_H__
#include "mifare/mifaredefault.h"
#include "common.h"
int CmdHFMFP(const char *Cmd);
+12
View File
@@ -9,6 +9,18 @@
//-----------------------------------------------------------------------------
#include "cmdhfmfu.h"
#include <ctype.h>
#include "cmdparser.h"
#include "commonutil.h"
#include "crypto/libpcrypto.h"
#include "mbedtls/des.h"
#include "cmdhfmf.h"
#include "cmdhf14a.h"
#include "comms.h"
#include "loclass/fileutils.h"
#include "protocols.h"
#define MAX_UL_BLOCKS 0x0F
#define MAX_ULC_BLOCKS 0x2B
#define MAX_ULEV1a_BLOCKS 0x13
+2 -10
View File
@@ -1,17 +1,9 @@
#ifndef CMDHFMFU_H__
#define CMDHFMFU_H__
#include <stdint.h>
#include <stdio.h>
#include "mbedtls/des.h"
#include "cmdhfmf.h"
#include "cmdhf14a.h"
#include "mifare.h"
#include "util.h"
#include "protocols.h"
#include "comms.h"
#include "loclass/fileutils.h"
#include "common.h"
#include "mifare.h" // structs
// Old Ultralight/NTAG dump file format
// It is used only for converting
+11
View File
@@ -9,6 +9,17 @@
//-----------------------------------------------------------------------------
#include "cmdhfthinfilm.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "cmdtrace.h"
#include "crc16.h"
#include "ui.h"
#include "cmdhf14a.h" // manufacture
static int CmdHelp(const char *Cmd);
static int usage_thinfilm_info(void) {
-9
View File
@@ -11,16 +11,7 @@
#ifndef CMDHFTHINFILM_H__
#define CMDHFTHINFILM_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "util.h"
#include "cmdhf.h" // list cmd
#include "cmdhf14a.h" // manufacture
int infoThinFilm(bool verbose);
+14
View File
@@ -9,6 +9,20 @@
//-----------------------------------------------------------------------------
#include "cmdhftopaz.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "cmdtrace.h"
#include "cmdhf14a.h"
#include "ui.h"
#include "crc16.h"
#include "protocols.h"
#define TOPAZ_STATIC_MEMORY (0x0f * 8) // 15 blocks with 8 Bytes each
// a struct to describe a memory area which contains lock bits and the corresponding lockable memory area
+1 -13
View File
@@ -11,19 +11,7 @@
#ifndef CMDHFTOPAZ_H__
#define CMDHFTOPAZ_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "cmdmain.h"
#include "cmdparser.h"
#include "cmdhf14a.h"
#include "ui.h"
#include "mifare.h"
#include "proxmark3.h"
#include "crc16.h"
#include "protocols.h"
#include "cmdhf.h"
#include "common.h"
int CmdHFTopaz(const char *Cmd);
+5 -4
View File
@@ -12,12 +12,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "usart_defs.h"
#include "ui.h"
#include "proxmark3.h"
#include "cmdparser.h"
#include "cmdhw.h"
#include "cmdmain.h"
#include "cmddata.h"
static int CmdHelp(const char *Cmd);
+2
View File
@@ -11,6 +11,8 @@
#ifndef CMDHW_H__
#define CMDHW_H__
#include "common.h"
int CmdHW(const char *Cmd);
void pm3_version(bool verbose);
+39
View File
@@ -9,6 +9,45 @@
//-----------------------------------------------------------------------------
#include "cmdlf.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h" // ARRAYLEN
#include "lfdemod.h" // device/client demods of LF signals
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "cmddata.h" // for `lf search`
#include "cmdlfawid.h" // for awid menu
#include "cmdlfem4x.h" // for em4x menu
#include "cmdlfhid.h" // for hid menu
#include "cmdlfhitag.h" // for hitag menu
#include "cmdlfio.h" // for ioprox menu
#include "cmdlft55xx.h" // for t55xx menu
#include "cmdlfti.h" // for ti menu
#include "cmdlfpresco.h" // for presco menu
#include "cmdlfpcf7931.h" // for pcf7931 menu
#include "cmdlfpyramid.h" // for pyramid menu
#include "cmdlfviking.h" // for viking menu
#include "cmdlfnedap.h" // for NEDAP menu
#include "cmdlfjablotron.h" // for JABLOTRON menu
#include "cmdlfvisa2000.h" // for VISA2000 menu
#include "cmdlfnoralsy.h" // for NORALSY meny
#include "cmdlfcotag.h" // for COTAG meny
#include "cmdlfindala.h" // for indala menu
#include "cmdlfguard.h" // for gproxii menu
#include "cmdlffdx.h" // for fdx-b menu
#include "cmdlfparadox.h" // for paradox menu
#include "cmdlfnexwatch.h" // for nexwatch menu
#include "cmdlfsecurakey.h" // for securakey menu
#include "cmdlfpac.h" // for pac menu
#include "cmdlfkeri.h" // for keri menu
bool g_lf_threshold_set = false;
static int CmdHelp(const char *Cmd);
+2 -40
View File
@@ -10,46 +10,8 @@
#ifndef CMDLF_H__
#define CMDLF_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include "proxmark3.h"
#include "lfdemod.h" // device/client demods of LF signals
#include "util.h" // for parsing cli command utils
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "cmdparser.h" // for getting cli commands included in cmdmain.h
#include "cmdmain.h" // for sending cmds to device. GetFromBigBuf
#include "cmddata.h" // for `lf search`
#include "cmdlfawid.h" // for awid menu
#include "cmdlfem4x.h" // for em4x menu
#include "cmdlfhid.h" // for hid menu
#include "cmdlfhitag.h" // for hitag menu
#include "cmdlfio.h" // for ioprox menu
#include "cmdlft55xx.h" // for t55xx menu
#include "cmdlfti.h" // for ti menu
#include "cmdlfpresco.h" // for presco menu
#include "cmdlfpcf7931.h" // for pcf7931 menu
#include "cmdlfpyramid.h" // for pyramid menu
#include "cmdlfviking.h" // for viking menu
#include "cmdlfguard.h" // for GuardAll menu
#include "cmdlfnedap.h" // for NEDAP menu
#include "cmdlfjablotron.h" // for JABLOTRON menu
#include "cmdlfvisa2000.h" // for VISA2000 menu
#include "cmdlfnoralsy.h" // for NORALSY meny
#include "cmdlffdx.h" // for FDX-B meny
#include "cmdlfcotag.h" // for COTAG meny
#include "cmdlfindala.h" // for indala menu
#include "cmdlfguard.h" // for gproxii menu
#include "cmdlffdx.h" // for fdx-b menu
#include "cmdlfparadox.h" // for paradox menu
#include "cmdlfnexwatch.h" // for nexwatch menu
#include "cmdlfsecurakey.h" // for securakey menu
#include "cmdlfpac.h" // for pac menu
#include "cmdlfkeri.h" // for keri menu
#include "common.h"
#define T55XX_WRITE_TIMEOUT 1500
+15
View File
@@ -12,6 +12,21 @@
//-----------------------------------------------------------------------------
#include "cmdlfawid.h" // AWID function declarations
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "graph.h"
#include "cmddata.h"
#include "ui.h" // PrintAndLog
#include "lfdemod.h" // parityTest
#include "cmdlf.h" // lf read
#include "protocols.h" // for T55xx config register definitions
#include "util_posix.h"
static int CmdHelp(const char *Cmd);
/*
static int usage_lf_awid_read(void) {
+1 -12
View File
@@ -11,18 +11,7 @@
#ifndef CMDLFAWID_H__
#define CMDLFAWID_H__
#include <stdio.h> // sscanf
#include <stdbool.h> // bool
#include "proxmark3.h" // Definitions, USB controls, etc
#include "ui.h" // PrintAndLog
#include "cmdparser.h" // CmdsParse, CmdsHelp
#include "lfdemod.h" // parityTest
#include "util.h" // weigandparity
#include "cmdlf.h" // lf read
#include "protocols.h" // for T55xx config register definitions
#include "cmdmain.h"
#include "util_posix.h"
#include "common.h"
int CmdLFAWID(const char *Cmd);
+9
View File
@@ -9,6 +9,15 @@
//-----------------------------------------------------------------------------
#include "cmdlfcotag.h" // COTAG function declarations
#include <string.h>
#include <stdio.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "lfdemod.h"
#include "cmddata.h" // getSamples
#include "ui.h" // PrintAndLog
static int CmdHelp(const char *Cmd);
static int usage_lf_cotag_read(void) {
+1 -7
View File
@@ -11,13 +11,7 @@
#ifndef CMDLFCOTAG_H__
#define CMDLFCOTAG_H__
#include "proxmark3.h" // Definitions, USB controls, COTAG_BITS
#include "util.h" // FALSE / TRUE
#include "cmddata.h" // getSamples
#include "cmdparser.h" // CmdsParse, CmdsHelp
#include "comms.h"
#include "ui.h" // PrintAndLog
#include "cmdlf.h" // Setconfig
#include "common.h"
#ifndef COTAG_BITS
#define COTAG_BITS 264
+17
View File
@@ -10,6 +10,23 @@
#include "cmdlfem4x.h"
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h"
#include "util_posix.h"
#include "protocols.h"
#include "ui.h"
#include "graph.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h"
uint64_t g_em410xid = 0;
static int CmdHelp(const char *Cmd);
+1 -13
View File
@@ -11,19 +11,7 @@
#ifndef CMDLFEM4X_H__
#define CMDLFEM4X_H__
#include <stdio.h>
#include <stdbool.h> // for bool
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "comms.h"
#include "cmdlf.h"
#include "lfdemod.h"
#include "common.h"
int CmdLFEM4X(const char *Cmd);
+15
View File
@@ -10,6 +10,21 @@
#include "cmdlffdx.h"
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h"
#include "ui.h" // PrintAndLog
#include "cmddata.h"
#include "cmdlf.h" // lf read
#include "crc16.h" // for checksum crc-16_ccitt
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
/*
FDX-B ISO11784/85 demod (aka animal tag) BIPHASE, inverted, rf/32, with preamble of 00000000001 (128bits)
8 databits + 1 parity (1)
+2 -10
View File
@@ -8,16 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFFDX_H__
#define CMDLFFDX_H__
#include "proxmark3.h" // Definitions, USB controls, etc
#include "ui.h" // PrintAndLog
#include "util.h" // weigandparity
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h" // lf read
#include "crc16.h" // for checksum crc-16_ccitt
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "common.h"
int CmdLFFdx(const char *Cmd);
int detectFDXB(uint8_t *dest, size_t *size);
+13
View File
@@ -9,6 +9,19 @@
//-----------------------------------------------------------------------------
#include "cmdlfguard.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
static int CmdHelp(const char *Cmd);
static int usage_lf_guard_clone(void) {
+2 -13
View File
@@ -8,19 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFGUARD_H__
#define CMDLFGUARD_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "crc.h"
#include "common.h"
int CmdLFGuard(const char *Cmd);
int detectGProxII(uint8_t *bits, size_t *size);
+16
View File
@@ -10,6 +10,22 @@
#include "cmdlfhid.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h" // ARRAYLEN
#include "ui.h"
#include "graph.h"
#include "cmddata.h" //for g_debugMode, demodbuff cmds
#include "cmdlf.h" // lf_read
#include "util_posix.h"
#include "lfdemod.h"
#ifndef BITS
# define BITS 96
#endif
+1 -12
View File
@@ -11,18 +11,7 @@
#ifndef CMDLFHID_H__
#define CMDLFHID_H__
#include <stdio.h>
#include <string.h>
#include "proxmark3.h"
#include "ui.h"
#include "graph.h"
#include "cmdparser.h"
#include "util.h" // wiegand_add_parity etc
#include "cmddata.h" //for g_debugMode, demodbuff cmds
#include "cmdlf.h" // lf_read
#include "cmdmain.h"
#include "util_posix.h"
#include "lfdemod.h"
#include "common.h"
int CmdLFHID(const char *Cmd);
+7 -13
View File
@@ -8,19 +8,13 @@
// Low frequency Hitag support
//-----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "proxmark3.h"
#include "ui.h"
#include "cmdparser.h"
#include "common.h"
#include "util.h"
#include "parity.h"
#include "hitag.h"
#include "util_posix.h"
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "cmddata.h"
#include "cmdtrace.h"
#include "commonutil.h"
#include "hitag.h"
#include "loclass/fileutils.h" // savefile
static int CmdHelp(const char *Cmd);
@@ -299,7 +293,7 @@ static int CmdLFHitagSim(const char *Cmd) {
param_getstr(Cmd, cmdp + 1, filename, sizeof(filename));
res = loadFileEML(filename, data, &datalen);
if (res > 0 || datalen != maxdatalen) {
PrintAndLogDevice(FAILED, "error, bytes read mismatch file size");
PrintAndLogEx(FAILED, "error, bytes read mismatch file size");
errors = true;
break;
}
+2
View File
@@ -11,6 +11,8 @@
#ifndef CMDLFHITAG_H__
#define CMDLFHITAG_H__
#include "common.h"
int CmdLFHitag(const char *Cmd);
int readHitagUid(void);
+16
View File
@@ -10,6 +10,22 @@
#include "cmdlfindala.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "graph.h"
#include "cliparser/cliparser.h"
#include "commonutil.h"
#include "ui.h" // PrintAndLog
#include "lfdemod.h" // parityTest, bitbytes_to_byte
#include "cmddata.h"
#include "cmdlf.h" // lf_read
static int CmdHelp(const char *Cmd);
//large 224 bit indala formats (different preamble too...)
+1 -12
View File
@@ -10,18 +10,7 @@
#ifndef CMDLFINDALA_H__
#define CMDLFINDALA_H__
#include <stdio.h> // sscanf
#include <stdlib.h>
#include <string.h>
#include "proxmark3.h" // Definitions, USB controls, etc
#include "ui.h" // PrintAndLog
#include "cmdparser.h" // CmdsParse, CmdsHelp
#include "lfdemod.h" // parityTest, bitbytes_to_byte
#include "util.h" // weigandparity
#include "protocols.h" // for T55xx config register definitions
#include "cmdmain.h"
#include "cmddata.h"
#include "cmdlf.h" // lf_read
#include "common.h"
int CmdLFINDALA(const char *Cmd);
+15
View File
@@ -10,6 +10,21 @@
#include "cmdlfio.h"
#include <stdio.h> // sscanf
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "graph.h"
#include "cmdlf.h"
#include "ui.h" // PrintAndLog
#include "lfdemod.h" // parityTest, bitbytes_to_byte
#include "protocols.h" // for T55xx config register definitions
#include "cmddata.h"
static int CmdHelp(const char *Cmd);
/*
static int usage_lf_io_read(void) {
+1 -11
View File
@@ -4,17 +4,7 @@
#ifndef CMDLFIO_H__
#define CMDLFIO_H__
#include <stdio.h> // sscanf
#include <stdlib.h>
#include <string.h>
#include "proxmark3.h" // Definitions, USB controls, etc
#include "ui.h" // PrintAndLog
#include "cmdparser.h" // CmdsParse, CmdsHelp
#include "lfdemod.h" // parityTest, bitbytes_to_byte
#include "util.h" // weigandparity
#include "protocols.h" // for T55xx config register definitions
#include "cmdmain.h"
#include "cmddata.h"
#include "common.h"
int CmdLFIO(const char *Cmd);
+15
View File
@@ -10,6 +10,21 @@
#include "cmdlfjablotron.h"
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
static int CmdHelp(const char *Cmd);
static int usage_lf_jablotron_clone(void) {
+2 -13
View File
@@ -8,19 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFJABLOTRON_H__
#define CMDLFJABLOTRON_H__
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "common.h"
int CmdLFJablotron(const char *Cmd);
+14
View File
@@ -9,6 +9,20 @@
//-----------------------------------------------------------------------------
#include "cmdlfkeri.h"
#include <string.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // preamble test
static int CmdHelp(const char *Cmd);
static int usage_lf_keri_clone(void) {
+1 -12
View File
@@ -9,18 +9,7 @@
#ifndef CMDLFKERI_H__
#define CMDLFKERI_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // preamble test
#include "common.h"
int CmdLFKeri(const char *Cmd);
+14
View File
@@ -9,6 +9,20 @@
#include "cmdlfnedap.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "crc16.h"
#include "cmdlft55xx.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h"
#define FIXED_71 0x71
#define FIXED_40 0x40
#define UNKNOWN_A 0x00
+2 -13
View File
@@ -8,19 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFNEDAP_H__
#define CMDLFNEDAP_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "crc.h"
#include "common.h"
int CmdLFNedap(const char *Cmd);
+7
View File
@@ -10,6 +10,13 @@
#include "cmdlfnexwatch.h"
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h" // preamblesearch
#include "cmdlf.h"
#include "lfdemod.h"
static int CmdHelp(const char *Cmd);
static int CmdNexWatchDemod(const char *Cmd) {
+1 -12
View File
@@ -9,18 +9,7 @@
#ifndef CMDLFNEXWATCH_H__
#define CMDLFNEXWATCH_H__
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <stdbool.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h" // preamblesearch
#include "cmdlf.h"
#include "lfdemod.h"
#include "common.h"
int CmdLFNEXWATCH(const char *Cmd);
+12
View File
@@ -9,6 +9,18 @@
//-----------------------------------------------------------------------------
#include "cmdlfnoralsy.h"
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
static int CmdHelp(const char *Cmd);
static int usage_lf_noralsy_clone(void) {
+2 -13
View File
@@ -8,19 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFNORALSY_H__
#define CMDLFNORALSY_H__
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "common.h"
int CmdLFNoralsy(const char *Cmd);
+7
View File
@@ -9,6 +9,13 @@
//-----------------------------------------------------------------------------
#include "cmdlfpac.h"
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h" // preamble test
static int CmdHelp(const char *Cmd);
//see NRZDemod for what args are accepted
+1 -11
View File
@@ -9,17 +9,7 @@
#ifndef CMDLFPAC_H__
#define CMDLFPAC_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "lfdemod.h" // preamble test
#include "common.h"
int CmdLFPac(const char *Cmd);
+7 -5
View File
@@ -7,15 +7,17 @@
// Low frequency Paradox tag commands
// FSK2a, rf/50, 96 bits (completely known)
//-----------------------------------------------------------------------------
#include "cmdlfparadox.h"
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "cmdlfparadox.h"
#include "proxmark3.h"
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h"
+3
View File
@@ -8,6 +8,9 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFPARADOX_H__
#define CMDLFPARADOX_H__
#include "common.h"
int CmdLFParadox(const char *Cmd);
int demodParadox(void);
+6 -10
View File
@@ -8,18 +8,14 @@
//-----------------------------------------------------------------------------
// Low frequency PCF7931 commands
//-----------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "cmdlfpcf7931.h"
#include <string.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
static int CmdHelp(const char *Cmd);
#define PCF7931_DEFAULT_INITDELAY 17500
+2
View File
@@ -12,6 +12,8 @@
#ifndef CMDLFPCF7931_H__
#define CMDLFPCF7931_H__
#include "common.h"
struct pcf7931_config {
uint8_t Pwd[7];
uint16_t InitDelay;
+14
View File
@@ -8,6 +8,20 @@
//-----------------------------------------------------------------------------
#include "cmdlfpresco.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
static int CmdHelp(const char *Cmd);
static int usage_lf_presco_clone(void) {
+2 -12
View File
@@ -8,18 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFPRESCO_H__
#define CMDLFPRESCO_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "common.h"
int CmdLFPresco(const char *Cmd);
+15
View File
@@ -9,6 +9,21 @@
//-----------------------------------------------------------------------------
#include "cmdlfpyramid.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "graph.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "crc.h"
static int CmdHelp(const char *Cmd);
static int usage_lf_pyramid_clone(void) {
+2 -13
View File
@@ -8,19 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFPYRAMID_H__
#define CMDLFPYRAMID_H__
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#include "crc.h"
#include "common.h"
int CmdLFPyramid(const char *Cmd);
+10
View File
@@ -9,6 +9,16 @@
//-----------------------------------------------------------------------------
#include "cmdlfsecurakey.h"
#include <string.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h" // preamble test
#include "parity.h" // for wiegand parity test
static int CmdHelp(const char *Cmd);
//see ASKDemod for what args are accepted
+1 -14
View File
@@ -9,20 +9,7 @@
#ifndef CMDLFSECURAKEY_H__
#define CMDLFSECURAKEY_H__
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // preamble test
#include "parity.h" // for wiegand parity test
#include "common.h"
int CmdLFSecurakey(const char *Cmd);
+16 -1
View File
@@ -14,6 +14,21 @@
#include "cmdlft55xx.h"
#include <ctype.h>
#include <time.h> // MingW
#include "cmdparser.h" // command_t
#include "comms.h"
#include "commonutil.h"
#include "protocols.h"
#include "graph.h"
#include "cmddata.h"
#include "lfdemod.h"
#include "cmdhf14a.h" // for getTagInfo
#include "loclass/fileutils.h" // loadDictionary
#include "util_posix.h"
// Some defines for readability
#define T55XX_DLMODE_FIXED 0 // Default Mode
#define T55XX_DLMODE_LLR 1 // Long Leading Reference
@@ -2117,7 +2132,7 @@ static int CmdT55xxChkPwds(const char *Cmd) {
// TODO, a way of reallocating memory if file was larger
keyBlock = calloc(4 * 200, sizeof(uint8_t));
if (keyBlock == NULL) {
PrintAndLogDevice(ERR, "error, cannot allocate memory ");
PrintAndLogEx(ERR, "error, cannot allocate memory ");
return PM3_ESOFT;
}
+1 -17
View File
@@ -10,23 +10,7 @@
#ifndef CMDLFT55XX_H__
#define CMDLFT55XX_H__
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <time.h>
#include <ctype.h>
#include "proxmark3.h"
#include "ui.h"
#include "graph.h"
#include "comms.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "util.h"
#include "lfdemod.h"
#include "cmdhf14a.h" // for getTagInfo
#include "loclass/fileutils.h" // loadDictionary
#include "common.h"
#define T55x7_CONFIGURATION_BLOCK 0x00
#define T55x7_TRACE_BLOCK1 0x01
+4 -3
View File
@@ -11,13 +11,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "cmdparser.h" // command_t
#include "commonutil.h"
#include "comms.h"
#include "crc16.h"
#include "proxmark3.h"
#include "ui.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmdlfti.h"
#include "cmdmain.h"
static int CmdHelp(const char *Cmd);
+2
View File
@@ -11,6 +11,8 @@
#ifndef CMDLFTI_H__
#define CMDLFTI_H__
#include "common.h"
int CmdLFTI(const char *Cmd);
int demodTI(void);
+11
View File
@@ -9,6 +9,17 @@
//-----------------------------------------------------------------------------
#include "cmdlfviking.h"
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "lfdemod.h"
static int CmdHelp(const char *Cmd);
static int usage_lf_viking_clone(void) {
+2 -12
View File
@@ -8,18 +8,8 @@
//-----------------------------------------------------------------------------
#ifndef CMDLFVIKING_H__
#define CMDLFVIKING_H__
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "cmdparser.h"
#include "cmddata.h"
#include "cmdmain.h"
#include "cmdlf.h"
#include "lfdemod.h"
#include "common.h"
int CmdLFViking(const char *Cmd);
+13
View File
@@ -11,6 +11,19 @@
#include "cmdlfvisa2000.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "cmdparser.h" // command_t
#include "comms.h"
#include "ui.h"
#include "graph.h"
#include "cmddata.h"
#include "cmdlf.h"
#include "protocols.h" // for T55xx config register definitions
#include "lfdemod.h" // parityTest
#define BL0CK1 0x56495332
static int CmdHelp(const char *Cmd);
Loaded 100 of 447 files, more files were not shown because too many files have changed in this diff. Show more