mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 12:59:44 -07:00
move mifare stuff to separate folder
This commit is contained in:
parent
5866c187ef
commit
bda1a01c86
16 changed files with 1169 additions and 1168 deletions
|
@ -134,15 +134,15 @@ CMDSRCS = $(SRC_SMARTCARD) \
|
|||
fido/cose.c \
|
||||
fido/cbortools.c \
|
||||
fido/fidocore.c \
|
||||
mfkey.c \
|
||||
mifare/mfkey.c \
|
||||
loclass/cipher.c \
|
||||
loclass/cipherutils.c \
|
||||
loclass/ikeys.c \
|
||||
loclass/elite_crack.c\
|
||||
loclass/fileutils.c\
|
||||
whereami.c\
|
||||
mifarehost.c\
|
||||
mifare4.c\
|
||||
mifare/mifarehost.c\
|
||||
mifare/mifare4.c\
|
||||
parity.c\
|
||||
crc.c \
|
||||
crc16.c \
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "cmdmain.h"
|
||||
#include "mifare.h"
|
||||
#include "cmdhfmfu.h"
|
||||
#include "mifarehost.h"
|
||||
#include "mifare/mifarehost.h"
|
||||
#include "cliparser/cliparser.h"
|
||||
#include "emv/apduinfo.h"
|
||||
#include "emv/emvcore.h"
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include "parity.h"
|
||||
#include "protocols.h"
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "mifarehost.h"
|
||||
#include "mifaredefault.h"
|
||||
#include "mifare/mifarehost.h"
|
||||
#include "mifare/mifaredefault.h"
|
||||
#include "usb_cmd.h"
|
||||
#include "pcsc.h"
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include "util_posix.h"
|
||||
#include "usb_cmd.h"
|
||||
#include "ui.h"
|
||||
#include "mifarehost.h"
|
||||
#include "mifare/mifarehost.h"
|
||||
#include "mifare.h"
|
||||
#include "mfkey.h"
|
||||
#include "mifare/mfkey.h"
|
||||
#include "hardnested/hardnested_bf_core.h"
|
||||
#include "cliparser/cliparser.h"
|
||||
#include "cmdhf14a.h"
|
||||
#include "mifare4.h"
|
||||
#include "mifare/mifare4.h"
|
||||
|
||||
#define NESTED_SECTOR_RETRY 10 // how often we try mfested() until we give up
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#ifndef CMDHFMF_H__
|
||||
#define CMDHFMF_H__
|
||||
|
||||
#include "mifaredefault.h"
|
||||
#include "mifare/mifaredefault.h"
|
||||
|
||||
extern int CmdHFMF(const char *Cmd);
|
||||
extern int CmdHFMF(const char *Cmd);
|
||||
|
||||
extern int CmdHF14AMfDbg(const char* cmd);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "ui.h"
|
||||
#include "cmdhf14a.h"
|
||||
#include "mifare.h"
|
||||
#include "mifare4.h"
|
||||
#include "mifare/mifare4.h"
|
||||
#include "cliparser/cliparser.h"
|
||||
#include "crypto/libpcrypto.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef CMDHFMFP_H__
|
||||
#define CMDHFMFP_H__
|
||||
|
||||
#include "mifaredefault.h"
|
||||
#include "mifare/mifaredefault.h"
|
||||
|
||||
extern int CmdHFMFP(const char *Cmd);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,68 +1,68 @@
|
|||
// Merlok, 2011, 2017
|
||||
// people from mifare@nethemba.com, 2010
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// High frequency ISO14443A commands
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MIFAREHOST_H
|
||||
#define MIFAREHOST_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "util.h"
|
||||
|
||||
// defaults
|
||||
// timeout in units. (ms * 106)/10 or us*0.0106
|
||||
// 5 == 500us
|
||||
#define MF_CHKKEYS_DEFTIMEOUT 5
|
||||
|
||||
// mfCSetBlock work flags
|
||||
#define CSETBLOCK_UID 0x01
|
||||
#define CSETBLOCK_WUPC 0x02
|
||||
#define CSETBLOCK_HALT 0x04
|
||||
#define CSETBLOCK_INIT_FIELD 0x08
|
||||
#define CSETBLOCK_RESET_FIELD 0x10
|
||||
#define CSETBLOCK_SINGLE_OPER 0x1F
|
||||
#define CSETBLOCK_MAGIC_1B 0x40
|
||||
|
||||
typedef struct {
|
||||
uint64_t Key[2];
|
||||
int foundKey[2];
|
||||
} sector_t;
|
||||
|
||||
extern char logHexFileName[FILE_PATH_SIZE];
|
||||
|
||||
extern int mfDarkside(uint64_t *key);
|
||||
extern int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *ResultKeys, bool calibrate);
|
||||
extern int mfCheckKeys (uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keycnt, uint8_t *keyBlock, uint64_t *key);
|
||||
extern int mfCheckKeysSec(uint8_t sectorCnt, uint8_t keyType, uint8_t timeout14a, bool clear_trace, uint8_t keycnt, uint8_t * keyBlock, sector_t * e_sector);
|
||||
|
||||
extern int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount);
|
||||
extern int mfEmlSetMem(uint8_t *data, int blockNum, int blocksCount);
|
||||
|
||||
extern int mfCWipe(uint32_t numSectors, bool gen1b, bool wantWipe, bool wantFill);
|
||||
extern int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID);
|
||||
extern int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, bool wantWipe, uint8_t params);
|
||||
extern int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params);
|
||||
|
||||
extern int mfTraceInit(uint8_t *tuid, uint8_t *atqa, uint8_t sak, bool wantSaveToEmlFile);
|
||||
extern int mfTraceDecode(uint8_t *data_src, int len, uint8_t parity, bool wantSaveToEmlFile);
|
||||
|
||||
extern int isTraceCardEmpty(void);
|
||||
extern int isBlockEmpty(int blockN);
|
||||
extern int isBlockTrailer(int blockN);
|
||||
extern int loadTraceCard(uint8_t *tuid);
|
||||
extern int saveTraceCard(void);
|
||||
extern int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len);
|
||||
|
||||
extern int mfCIdentify();
|
||||
extern int DetectClassicPrng(void);
|
||||
extern bool validate_prng_nonce(uint32_t nonce);
|
||||
extern void mf_crypto1_decrypt(struct Crypto1State *pcs, uint8_t *data, int len, bool isEncrypted);
|
||||
|
||||
#endif
|
||||
// Merlok, 2011, 2017
|
||||
// people from mifare@nethemba.com, 2010
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// High frequency ISO14443A commands
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MIFAREHOST_H
|
||||
#define MIFAREHOST_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "util.h"
|
||||
|
||||
// defaults
|
||||
// timeout in units. (ms * 106)/10 or us*0.0106
|
||||
// 5 == 500us
|
||||
#define MF_CHKKEYS_DEFTIMEOUT 5
|
||||
|
||||
// mfCSetBlock work flags
|
||||
#define CSETBLOCK_UID 0x01
|
||||
#define CSETBLOCK_WUPC 0x02
|
||||
#define CSETBLOCK_HALT 0x04
|
||||
#define CSETBLOCK_INIT_FIELD 0x08
|
||||
#define CSETBLOCK_RESET_FIELD 0x10
|
||||
#define CSETBLOCK_SINGLE_OPER 0x1F
|
||||
#define CSETBLOCK_MAGIC_1B 0x40
|
||||
|
||||
typedef struct {
|
||||
uint64_t Key[2];
|
||||
int foundKey[2];
|
||||
} sector_t;
|
||||
|
||||
extern char logHexFileName[FILE_PATH_SIZE];
|
||||
|
||||
extern int mfDarkside(uint64_t *key);
|
||||
extern int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *ResultKeys, bool calibrate);
|
||||
extern int mfCheckKeys (uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keycnt, uint8_t *keyBlock, uint64_t *key);
|
||||
extern int mfCheckKeysSec(uint8_t sectorCnt, uint8_t keyType, uint8_t timeout14a, bool clear_trace, uint8_t keycnt, uint8_t * keyBlock, sector_t * e_sector);
|
||||
|
||||
extern int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount);
|
||||
extern int mfEmlSetMem(uint8_t *data, int blockNum, int blocksCount);
|
||||
|
||||
extern int mfCWipe(uint32_t numSectors, bool gen1b, bool wantWipe, bool wantFill);
|
||||
extern int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID);
|
||||
extern int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, bool wantWipe, uint8_t params);
|
||||
extern int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params);
|
||||
|
||||
extern int mfTraceInit(uint8_t *tuid, uint8_t *atqa, uint8_t sak, bool wantSaveToEmlFile);
|
||||
extern int mfTraceDecode(uint8_t *data_src, int len, uint8_t parity, bool wantSaveToEmlFile);
|
||||
|
||||
extern int isTraceCardEmpty(void);
|
||||
extern int isBlockEmpty(int blockN);
|
||||
extern int isBlockTrailer(int blockN);
|
||||
extern int loadTraceCard(uint8_t *tuid);
|
||||
extern int saveTraceCard(void);
|
||||
extern int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len);
|
||||
|
||||
extern int mfCIdentify();
|
||||
extern int DetectClassicPrng(void);
|
||||
extern bool validate_prng_nonce(uint32_t nonce);
|
||||
extern void mf_crypto1_decrypt(struct Crypto1State *pcs, uint8_t *data, int len, bool isEncrypted);
|
||||
|
||||
#endif
|
0
client/obj/mifare/.dummy
Normal file
0
client/obj/mifare/.dummy
Normal file
|
@ -19,7 +19,7 @@
|
|||
#include "usb_cmd.h"
|
||||
#include "cmdmain.h"
|
||||
#include "util.h"
|
||||
#include "mifarehost.h"
|
||||
#include "mifare/mifarehost.h"
|
||||
#include "../common/iso15693tools.h"
|
||||
#include "iso14443crc.h"
|
||||
#include "../common/crc16.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue