mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
style
This commit is contained in:
parent
682f23440d
commit
59d40068e2
51 changed files with 528 additions and 528 deletions
|
@ -28,9 +28,9 @@
|
|||
#include "ui.h"
|
||||
#include "util.h"
|
||||
|
||||
extern int CmdCrc(const char *Cmd);
|
||||
int CmdCrc(const char *Cmd);
|
||||
|
||||
extern int CmdrevengSearch(const char *Cmd);
|
||||
extern int GetModels(char *Models[], int *count, uint8_t *width);
|
||||
extern int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *result);
|
||||
int CmdrevengSearch(const char *Cmd);
|
||||
int GetModels(char *Models[], int *count, uint8_t *width);
|
||||
int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *result);
|
||||
#endif
|
||||
|
|
|
@ -84,7 +84,7 @@ int NRZrawDemod(const char *Cmd, bool verbose);
|
|||
int getSamples(int n, bool silent);
|
||||
void setClockGrid(int clk, int offset);
|
||||
int directionalThreshold(const int *in, int *out, size_t len, int8_t up, int8_t down);
|
||||
extern int AskEdgeDetect(const int *in, int *out, int len, int threshold);
|
||||
int AskEdgeDetect(const int *in, int *out, int len, int threshold);
|
||||
|
||||
int CmdDataIIR(const char *Cmd);
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ typedef enum {
|
|||
DICTIONARY_ICLASS
|
||||
} Dictionary_t;
|
||||
|
||||
extern int CmdFlashMem(const char *Cmd);
|
||||
int CmdFlashMem(const char *Cmd);
|
||||
|
||||
extern int CmdFlashMemRead(const char *Cmd);
|
||||
extern int CmdFlashMemLoad(const char *Cmd);
|
||||
extern int CmdFlashMemSave(const char *Cmd);
|
||||
extern int CmdFlashMemWipe(const char *Cmd);
|
||||
extern int CmdFlashMemInfo(const char *Cmd);
|
||||
int CmdFlashMemRead(const char *Cmd);
|
||||
int CmdFlashMemLoad(const char *Cmd);
|
||||
int CmdFlashMemSave(const char *Cmd);
|
||||
int CmdFlashMemWipe(const char *Cmd);
|
||||
int CmdFlashMemInfo(const char *Cmd);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
#include "cmdhffido.h" // FIDO authenticators
|
||||
#include "cmdtrace.h" // trace list
|
||||
|
||||
extern int CmdHF(const char *Cmd);
|
||||
extern int CmdHFTune(const char *Cmd);
|
||||
extern int CmdHFSearch(const char *Cmd);
|
||||
extern int CmdHFSniff(const char *Cmd);
|
||||
int CmdHF(const char *Cmd);
|
||||
int CmdHFTune(const char *Cmd);
|
||||
int CmdHFSearch(const char *Cmd);
|
||||
int CmdHFSniff(const char *Cmd);
|
||||
|
||||
extern int usage_hf_search();
|
||||
extern int usage_hf_sniff();
|
||||
int usage_hf_search();
|
||||
int usage_hf_sniff();
|
||||
#endif
|
||||
|
|
|
@ -39,23 +39,23 @@ typedef struct {
|
|||
char *desc;
|
||||
} manufactureName;
|
||||
|
||||
extern int CmdHF14A(const char *Cmd);
|
||||
extern int CmdHF14AList(const char *Cmd);
|
||||
extern int CmdHF14AReader(const char *Cmd);
|
||||
extern int CmdHF14AInfo(const char *Cmd);
|
||||
extern int CmdHF14ASim(const char *Cmd);
|
||||
extern int CmdHF14ASniff(const char *Cmd);
|
||||
extern int CmdHF14ACmdRaw(const char *Cmd);
|
||||
extern int CmdHF14ACUIDs(const char *Cmd);
|
||||
extern int CmdHF14AAntiFuzz(const char *Cmd);
|
||||
int CmdHF14A(const char *Cmd);
|
||||
int CmdHF14AList(const char *Cmd);
|
||||
int CmdHF14AReader(const char *Cmd);
|
||||
int CmdHF14AInfo(const char *Cmd);
|
||||
int CmdHF14ASim(const char *Cmd);
|
||||
int CmdHF14ASniff(const char *Cmd);
|
||||
int CmdHF14ACmdRaw(const char *Cmd);
|
||||
int CmdHF14ACUIDs(const char *Cmd);
|
||||
int CmdHF14AAntiFuzz(const char *Cmd);
|
||||
|
||||
extern char *getTagInfo(uint8_t uid);
|
||||
extern int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
||||
extern int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
extern int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
char *getTagInfo(uint8_t uid);
|
||||
int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
||||
int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
|
||||
extern int usage_hf_14a_sim(void);
|
||||
extern int usage_hf_14a_sniff(void);
|
||||
extern int usage_hf_14a_raw(void);
|
||||
extern int usage_hf_14a_antifuzz(void);
|
||||
int usage_hf_14a_sim(void);
|
||||
int usage_hf_14a_sniff(void);
|
||||
int usage_hf_14a_raw(void);
|
||||
int usage_hf_14a_antifuzz(void);
|
||||
#endif
|
||||
|
|
|
@ -37,23 +37,23 @@ int usage_hf_14b_sim(void);
|
|||
int usage_hf_14b_read_srx(void);
|
||||
int usage_hf_14b_write_srx(void);
|
||||
|
||||
extern int CmdHF14B(const char *Cmd);
|
||||
extern int CmdHF14BList(const char *Cmd);
|
||||
extern int CmdHF14BInfo(const char *Cmd);
|
||||
extern int CmdHF14BSim(const char *Cmd);
|
||||
extern int CmdHF14BSniff(const char *Cmd);
|
||||
extern int CmdHF14BWrite(const char *cmd);
|
||||
extern int CmdHF14BReader(const char *Cmd);
|
||||
int CmdHF14B(const char *Cmd);
|
||||
int CmdHF14BList(const char *Cmd);
|
||||
int CmdHF14BInfo(const char *Cmd);
|
||||
int CmdHF14BSim(const char *Cmd);
|
||||
int CmdHF14BSniff(const char *Cmd);
|
||||
int CmdHF14BWrite(const char *cmd);
|
||||
int CmdHF14BReader(const char *Cmd);
|
||||
|
||||
extern int CmdHF14BDump(const char *Cmd);
|
||||
int CmdHF14BDump(const char *Cmd);
|
||||
|
||||
extern bool HF14BInfo(bool verbose);
|
||||
extern bool HF14BReader(bool verbose);
|
||||
extern int CmdHF14BCmdRaw(const char *Cmd);
|
||||
bool HF14BInfo(bool verbose);
|
||||
bool HF14BReader(bool verbose);
|
||||
int CmdHF14BCmdRaw(const char *Cmd);
|
||||
|
||||
// SRi ST Microelectronics read/write
|
||||
extern int CmdHF14BReadSri(const char *Cmd);
|
||||
extern int CmdHF14BWriteSri(const char *Cmd);
|
||||
int CmdHF14BReadSri(const char *Cmd);
|
||||
int CmdHF14BWriteSri(const char *Cmd);
|
||||
|
||||
bool waitCmd14b(bool verbose);
|
||||
#endif
|
||||
|
|
|
@ -28,38 +28,38 @@
|
|||
|
||||
int CmdHF15(const char *Cmd);
|
||||
|
||||
extern int HF15Reader(const char *Cmd, bool verbose);
|
||||
int HF15Reader(const char *Cmd, bool verbose);
|
||||
|
||||
extern int CmdHF15Demod(const char *Cmd);
|
||||
extern int CmdHF15Samples(const char *Cmd);
|
||||
extern int CmdHF15Info(const char *Cmd);
|
||||
extern int CmdHF15Record(const char *Cmd);
|
||||
extern int CmdHF15Reader(const char *Cmd);
|
||||
extern int CmdHF15Sim(const char *Cmd);
|
||||
extern int CmdHF15Afi(const char *Cmd);
|
||||
extern int CmdHF15Dump(const char *Cmd);
|
||||
extern int CmdHF15Raw(const char *cmd);
|
||||
extern int CmdHF15Readmulti(const char *Cmd);
|
||||
extern int CmdHF15Read(const char *Cmd);
|
||||
extern int CmdHF15Write(const char *Cmd);
|
||||
int CmdHF15Demod(const char *Cmd);
|
||||
int CmdHF15Samples(const char *Cmd);
|
||||
int CmdHF15Info(const char *Cmd);
|
||||
int CmdHF15Record(const char *Cmd);
|
||||
int CmdHF15Reader(const char *Cmd);
|
||||
int CmdHF15Sim(const char *Cmd);
|
||||
int CmdHF15Afi(const char *Cmd);
|
||||
int CmdHF15Dump(const char *Cmd);
|
||||
int CmdHF15Raw(const char *cmd);
|
||||
int CmdHF15Readmulti(const char *Cmd);
|
||||
int CmdHF15Read(const char *Cmd);
|
||||
int CmdHF15Write(const char *Cmd);
|
||||
|
||||
extern int CmdHF15Help(const char *Cmd);
|
||||
int CmdHF15Help(const char *Cmd);
|
||||
|
||||
// usages
|
||||
extern int usage_15_demod(void);
|
||||
extern int usage_15_samples(void);
|
||||
extern int usage_15_info(void);
|
||||
extern int usage_15_record(void);
|
||||
extern int usage_15_reader(void);
|
||||
extern int usage_15_sim(void);
|
||||
extern int usage_15_findafi(void);
|
||||
extern int usage_15_dump(void);
|
||||
extern int usage_15_restore(void);
|
||||
extern int usage_15_raw(void);
|
||||
int usage_15_demod(void);
|
||||
int usage_15_samples(void);
|
||||
int usage_15_info(void);
|
||||
int usage_15_record(void);
|
||||
int usage_15_reader(void);
|
||||
int usage_15_sim(void);
|
||||
int usage_15_findafi(void);
|
||||
int usage_15_dump(void);
|
||||
int usage_15_restore(void);
|
||||
int usage_15_raw(void);
|
||||
|
||||
extern int usage_15_read(void);
|
||||
extern int usage_15_write(void);
|
||||
extern int usage_15_readmulti(void);
|
||||
int usage_15_read(void);
|
||||
int usage_15_write(void);
|
||||
int usage_15_readmulti(void);
|
||||
|
||||
extern int prepareHF15Cmd(char **cmd, UsbCommand *c, uint8_t iso15cmd);
|
||||
int prepareHF15Cmd(char **cmd, UsbCommand *c, uint8_t iso15cmd);
|
||||
#endif
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include "util_posix.h"
|
||||
|
||||
|
||||
extern int CmdHFEPA(const char *Cmd);
|
||||
extern int CmdHFEPACollectPACENonces(const char *Cmd);
|
||||
extern int CmdHFEPAPACEReplay(const char *Cmd);
|
||||
int CmdHFEPA(const char *Cmd);
|
||||
int CmdHFEPACollectPACENonces(const char *Cmd);
|
||||
int CmdHFEPAPACEReplay(const char *Cmd);
|
||||
|
||||
#endif // CMDHFEPA_H__
|
||||
|
|
|
@ -26,21 +26,21 @@
|
|||
#include "cmdhf.h" // list cmd
|
||||
#include "mifare.h" // felica_card_select_t struct
|
||||
|
||||
extern int CmdHFFelica(const char *Cmd);
|
||||
extern int CmdHFFelicaList(const char *Cmd);
|
||||
extern int CmdHFFelicaReader(const char *Cmd);
|
||||
extern int CmdHFFelicaSim(const char *Cmd);
|
||||
extern int CmdHFFelicaSniff(const char *Cmd);
|
||||
extern int CmdHFFelicaCmdRaw(const char *Cmd);
|
||||
int CmdHFFelica(const char *Cmd);
|
||||
int CmdHFFelicaList(const char *Cmd);
|
||||
int CmdHFFelicaReader(const char *Cmd);
|
||||
int CmdHFFelicaSim(const char *Cmd);
|
||||
int CmdHFFelicaSniff(const char *Cmd);
|
||||
int CmdHFFelicaCmdRaw(const char *Cmd);
|
||||
|
||||
extern int usage_hf_felica_sim(void);
|
||||
extern int usage_hf_felica_sniff(void);
|
||||
extern int usage_hf_fFelica_raw(void);
|
||||
int usage_hf_felica_sim(void);
|
||||
int usage_hf_felica_sniff(void);
|
||||
int usage_hf_fFelica_raw(void);
|
||||
|
||||
void waitCmdFelica(uint8_t iSelect);
|
||||
|
||||
//temp
|
||||
extern int CmdHFFelicaSimLite(const char *Cmd);
|
||||
extern int CmdHFFelicaDumpLite(const char *Cmd);
|
||||
int CmdHFFelicaSimLite(const char *Cmd);
|
||||
int CmdHFFelicaDumpLite(const char *Cmd);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef CMDHFFIDO_H__
|
||||
#define CMDHFFIDO_H__
|
||||
|
||||
extern int CmdHFFido(const char *Cmd);
|
||||
int CmdHFFido(const char *Cmd);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -52,29 +52,29 @@ typedef struct iclass_prekey {
|
|||
|
||||
int CmdHFiClass(const char *Cmd);
|
||||
|
||||
extern int CmdHFiClassCalcNewKey(const char *Cmd);
|
||||
extern int CmdHFiClassCloneTag(const char *Cmd);
|
||||
extern int CmdHFiClassDecrypt(const char *Cmd);
|
||||
extern int CmdHFiClassEncryptBlk(const char *Cmd);
|
||||
extern int CmdHFiClassELoad(const char *Cmd);
|
||||
extern int CmdHFiClassList(const char *Cmd);
|
||||
extern int HFiClassReader(const char *Cmd, bool loop, bool verbose);
|
||||
extern int CmdHFiClassReader(const char *Cmd);
|
||||
extern int CmdHFiClassReader_Dump(const char *Cmd);
|
||||
extern int CmdHFiClassReader_Replay(const char *Cmd);
|
||||
extern int CmdHFiClassReadKeyFile(const char *filename);
|
||||
extern int CmdHFiClassReadTagFile(const char *Cmd);
|
||||
extern int CmdHFiClass_ReadBlock(const char *Cmd);
|
||||
extern int CmdHFiClass_TestMac(const char *Cmd);
|
||||
extern int CmdHFiClassManageKeys(const char *Cmd);
|
||||
extern int CmdHFiClass_loclass(const char *Cmd);
|
||||
extern int CmdHFiClassSniff(const char *Cmd);
|
||||
extern int CmdHFiClassSim(const char *Cmd);
|
||||
extern int CmdHFiClassWriteKeyFile(const char *Cmd);
|
||||
extern int CmdHFiClass_WriteBlock(const char *Cmd);
|
||||
extern int CmdHFiClassCheckKeys(const char *Cmd);
|
||||
extern int CmdHFiClassLookUp(const char *Cmd);
|
||||
extern int CmdHFiClassPermuteKey(const char *Cmd);
|
||||
int CmdHFiClassCalcNewKey(const char *Cmd);
|
||||
int CmdHFiClassCloneTag(const char *Cmd);
|
||||
int CmdHFiClassDecrypt(const char *Cmd);
|
||||
int CmdHFiClassEncryptBlk(const char *Cmd);
|
||||
int CmdHFiClassELoad(const char *Cmd);
|
||||
int CmdHFiClassList(const char *Cmd);
|
||||
int HFiClassReader(const char *Cmd, bool loop, bool verbose);
|
||||
int CmdHFiClassReader(const char *Cmd);
|
||||
int CmdHFiClassReader_Dump(const char *Cmd);
|
||||
int CmdHFiClassReader_Replay(const char *Cmd);
|
||||
int CmdHFiClassReadKeyFile(const char *filename);
|
||||
int CmdHFiClassReadTagFile(const char *Cmd);
|
||||
int CmdHFiClass_ReadBlock(const char *Cmd);
|
||||
int CmdHFiClass_TestMac(const char *Cmd);
|
||||
int CmdHFiClassManageKeys(const char *Cmd);
|
||||
int CmdHFiClass_loclass(const char *Cmd);
|
||||
int CmdHFiClassSniff(const char *Cmd);
|
||||
int CmdHFiClassSim(const char *Cmd);
|
||||
int CmdHFiClassWriteKeyFile(const char *Cmd);
|
||||
int CmdHFiClass_WriteBlock(const char *Cmd);
|
||||
int CmdHFiClassCheckKeys(const char *Cmd);
|
||||
int CmdHFiClassLookUp(const char *Cmd);
|
||||
int CmdHFiClassPermuteKey(const char *Cmd);
|
||||
|
||||
void printIclassDumpContents(uint8_t *iclass_dump, uint8_t startblock, uint8_t endblock, size_t filesize);
|
||||
void HFiClassCalcDivKey(uint8_t *CSN, uint8_t *KEY, uint8_t *div_key, bool elite);
|
||||
|
|
|
@ -26,19 +26,19 @@
|
|||
|
||||
int CmdHFLegic(const char *Cmd);
|
||||
|
||||
extern int CmdLegicInfo(const char *Cmd);
|
||||
extern int CmdLegicRdmem(const char *Cmd);
|
||||
extern int CmdLegicLoad(const char *Cmd);
|
||||
extern int CmdLegicRfSim(const char *Cmd);
|
||||
extern int CmdLegicRfWrite(const char *Cmd);
|
||||
extern int CmdLegicCalcCrc(const char *Cmd);
|
||||
extern int CmdLegicDump(const char *Cmd);
|
||||
extern int CmdLegicRestore(const char *Cmd);
|
||||
extern int CmdLegicReader(const char *Cmd);
|
||||
extern int CmdLegicELoad(const char *Cmd);
|
||||
extern int CmdLegicESave(const char *Cmd);
|
||||
extern int CmdLegicList(const char *Cmd);
|
||||
extern int CmdLegicWipe(const char *Cmd);
|
||||
int CmdLegicInfo(const char *Cmd);
|
||||
int CmdLegicRdmem(const char *Cmd);
|
||||
int CmdLegicLoad(const char *Cmd);
|
||||
int CmdLegicRfSim(const char *Cmd);
|
||||
int CmdLegicRfWrite(const char *Cmd);
|
||||
int CmdLegicCalcCrc(const char *Cmd);
|
||||
int CmdLegicDump(const char *Cmd);
|
||||
int CmdLegicRestore(const char *Cmd);
|
||||
int CmdLegicReader(const char *Cmd);
|
||||
int CmdLegicELoad(const char *Cmd);
|
||||
int CmdLegicESave(const char *Cmd);
|
||||
int CmdLegicList(const char *Cmd);
|
||||
int CmdLegicWipe(const char *Cmd);
|
||||
|
||||
int HFLegicReader(const char *Cmd, bool verbose);
|
||||
int legic_print_type(uint32_t tagtype, uint8_t spaces);
|
||||
|
|
|
@ -51,31 +51,32 @@ typedef struct {
|
|||
uint32_t ks2; // ar ^ ar_enc
|
||||
uint32_t ks3; // at ^ at_enc
|
||||
} TAuthData;
|
||||
extern void ClearAuthData();
|
||||
|
||||
extern uint8_t iso14443A_CRC_check(bool isResponse, uint8_t *d, uint8_t n);
|
||||
extern uint8_t iso14443B_CRC_check(uint8_t *d, uint8_t n);
|
||||
extern uint8_t mifare_CRC_check(bool isResponse, uint8_t *data, uint8_t len);
|
||||
extern uint8_t iso15693_CRC_check(uint8_t *d, uint8_t n);
|
||||
extern uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n);
|
||||
void ClearAuthData();
|
||||
|
||||
uint8_t iso14443A_CRC_check(bool isResponse, uint8_t *d, uint8_t n);
|
||||
uint8_t iso14443B_CRC_check(uint8_t *d, uint8_t n);
|
||||
uint8_t mifare_CRC_check(bool isResponse, uint8_t *data, uint8_t len);
|
||||
uint8_t iso15693_CRC_check(uint8_t *d, uint8_t n);
|
||||
uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n);
|
||||
|
||||
int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
|
||||
extern void annotateIclass(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateTopaz(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateLegic(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateFelica(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateIso7816(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateIso14443b(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
extern void annotateMifare(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, uint8_t *parity, uint8_t paritysize, bool isResponse);
|
||||
void annotateIclass(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateTopaz(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateLegic(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateFelica(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateIso7816(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateIso14443b(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize);
|
||||
void annotateMifare(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, uint8_t *parity, uint8_t paritysize, bool isResponse);
|
||||
|
||||
extern bool DecodeMifareData(uint8_t *cmd, uint8_t cmdsize, uint8_t *parity, bool isResponse, uint8_t *mfData, size_t *mfDataLen);
|
||||
extern bool NTParityChk(TAuthData *ad, uint32_t ntx);
|
||||
extern bool NestedCheckKey(uint64_t key, TAuthData *ad, uint8_t *cmd, uint8_t cmdsize, uint8_t *parity);
|
||||
extern bool CheckCrypto1Parity(uint8_t *cmd_enc, uint8_t cmdsize, uint8_t *cmd, uint8_t *parity_enc);
|
||||
extern uint64_t GetCrypto1ProbableKey(TAuthData *ad);
|
||||
bool DecodeMifareData(uint8_t *cmd, uint8_t cmdsize, uint8_t *parity, bool isResponse, uint8_t *mfData, size_t *mfDataLen);
|
||||
bool NTParityChk(TAuthData *ad, uint32_t ntx);
|
||||
bool NestedCheckKey(uint64_t key, TAuthData *ad, uint8_t *cmd, uint8_t cmdsize, uint8_t *parity);
|
||||
bool CheckCrypto1Parity(uint8_t *cmd_enc, uint8_t cmdsize, uint8_t *cmd, uint8_t *parity_enc);
|
||||
uint64_t GetCrypto1ProbableKey(TAuthData *ad);
|
||||
|
||||
#endif // CMDHFLIST
|
||||
|
|
|
@ -33,41 +33,41 @@
|
|||
#include "cliparser/cliparser.h" // argtable
|
||||
#include "hardnested/hardnested_bf_core.h" // SetSIMDInstr
|
||||
|
||||
extern int CmdHFMF(const char *Cmd);
|
||||
int CmdHFMF(const char *Cmd);
|
||||
|
||||
extern int CmdHF14AMfList(const char *Cmd);
|
||||
extern int CmdHF14AMfDbg(const char *Cmd);
|
||||
extern int CmdHF14AMfRdBl(const char *Cmd);
|
||||
extern int CmdHF14AMfURdBl(const char *Cmd);
|
||||
extern int CmdHF14AMfRdSc(const char *Cmd);
|
||||
extern int CmdHF14SMfURdCard(const char *Cmd);
|
||||
extern int CmdHF14AMfDump(const char *Cmd);
|
||||
extern int CmdHF14AMfRestore(const char *Cmd);
|
||||
extern int CmdHF14AMfWrBl(const char *Cmd);
|
||||
extern int CmdHF14AMfUWrBl(const char *Cmd);
|
||||
extern int CmdHF14AMfChk(const char *Cmd);
|
||||
extern int CmdHF14AMfDarkside(const char *Cmd);
|
||||
extern int CmdHF14AMfNested(const char *Cmd);
|
||||
extern int CmdHF14AMfNestedHard(const char *Cmd);
|
||||
//extern int CmdHF14AMfSniff(const char* Cmd);
|
||||
extern int CmdHF14AMf1kSim(const char *Cmd);
|
||||
extern int CmdHF14AMfKeyBrute(const char *Cmd);
|
||||
extern int CmdHF14AMfEClear(const char *Cmd);
|
||||
extern int CmdHF14AMfEGet(const char *Cmd);
|
||||
extern int CmdHF14AMfESet(const char *Cmd);
|
||||
extern int CmdHF14AMfELoad(const char *Cmd);
|
||||
extern int CmdHF14AMfESave(const char *Cmd);
|
||||
extern int CmdHF14AMfECFill(const char *Cmd);
|
||||
extern int CmdHF14AMfEKeyPrn(const char *Cmd);
|
||||
extern int CmdHF14AMfCSetUID(const char *Cmd);
|
||||
extern int CmdHF14AMfCSetBlk(const char *Cmd);
|
||||
extern int CmdHF14AMfCGetBlk(const char *Cmd);
|
||||
extern int CmdHF14AMfCGetSc(const char *Cmd);
|
||||
extern int CmdHF14AMfCLoad(const char *Cmd);
|
||||
extern int CmdHF14AMfCSave(const char *Cmd);
|
||||
extern int CmdHf14MfDecryptBytes(const char *Cmd);
|
||||
extern int CmdHf14AMfSetMod(const char *Cmd);
|
||||
extern int CmdHf14AMfNack(const char *Cmd);
|
||||
int CmdHF14AMfList(const char *Cmd);
|
||||
int CmdHF14AMfDbg(const char *Cmd);
|
||||
int CmdHF14AMfRdBl(const char *Cmd);
|
||||
int CmdHF14AMfURdBl(const char *Cmd);
|
||||
int CmdHF14AMfRdSc(const char *Cmd);
|
||||
int CmdHF14SMfURdCard(const char *Cmd);
|
||||
int CmdHF14AMfDump(const char *Cmd);
|
||||
int CmdHF14AMfRestore(const char *Cmd);
|
||||
int CmdHF14AMfWrBl(const char *Cmd);
|
||||
int CmdHF14AMfUWrBl(const char *Cmd);
|
||||
int CmdHF14AMfChk(const char *Cmd);
|
||||
int CmdHF14AMfDarkside(const char *Cmd);
|
||||
int CmdHF14AMfNested(const char *Cmd);
|
||||
int CmdHF14AMfNestedHard(const char *Cmd);
|
||||
//int CmdHF14AMfSniff(const char* Cmd);
|
||||
int CmdHF14AMf1kSim(const char *Cmd);
|
||||
int CmdHF14AMfKeyBrute(const char *Cmd);
|
||||
int CmdHF14AMfEClear(const char *Cmd);
|
||||
int CmdHF14AMfEGet(const char *Cmd);
|
||||
int CmdHF14AMfESet(const char *Cmd);
|
||||
int CmdHF14AMfELoad(const char *Cmd);
|
||||
int CmdHF14AMfESave(const char *Cmd);
|
||||
int CmdHF14AMfECFill(const char *Cmd);
|
||||
int CmdHF14AMfEKeyPrn(const char *Cmd);
|
||||
int CmdHF14AMfCSetUID(const char *Cmd);
|
||||
int CmdHF14AMfCSetBlk(const char *Cmd);
|
||||
int CmdHF14AMfCGetBlk(const char *Cmd);
|
||||
int CmdHF14AMfCGetSc(const char *Cmd);
|
||||
int CmdHF14AMfCLoad(const char *Cmd);
|
||||
int CmdHF14AMfCSave(const char *Cmd);
|
||||
int CmdHf14MfDecryptBytes(const char *Cmd);
|
||||
int CmdHf14AMfSetMod(const char *Cmd);
|
||||
int CmdHf14AMfNack(const char *Cmd);
|
||||
|
||||
void showSectorTable(void);
|
||||
void readerAttack(nonces_t data, bool setEmulatorMem, bool verbose);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
int CmdHF14AMfDESAuth(const char *Cmd);
|
||||
int CmdHFMFDesfire(const char *Cmd);
|
||||
int CmdHelp(const char *Cmd);
|
||||
|
|
|
@ -41,8 +41,8 @@ typedef struct noncelist {
|
|||
noncelistentry_t *first;
|
||||
} noncelist_t;
|
||||
|
||||
extern int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *trgkey, bool nonce_file_read, bool nonce_file_write, bool slow, int tests, uint64_t *foundkey, char *filename);
|
||||
extern void hardnested_print_progress(uint32_t nonces, char *activity, float brute_force, uint64_t min_diff_print_time);
|
||||
int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *trgkey, bool nonce_file_read, bool nonce_file_write, bool slow, int tests, uint64_t *foundkey, char *filename);
|
||||
void hardnested_print_progress(uint32_t nonces, char *activity, float brute_force, uint64_t min_diff_print_time);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "mifare/mifaredefault.h"
|
||||
|
||||
extern int CmdHFMFP(const char *Cmd);
|
||||
int CmdHFMFP(const char *Cmd);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,40 +25,40 @@ typedef struct {
|
|||
uint8_t data[1024];
|
||||
} mfu_dump_t;
|
||||
|
||||
extern int CmdHF14AMfUWrBl(const char *Cmd);
|
||||
extern int CmdHF14AMfURdBl(const char *Cmd);
|
||||
int CmdHF14AMfUWrBl(const char *Cmd);
|
||||
int CmdHF14AMfURdBl(const char *Cmd);
|
||||
|
||||
//Crypto Cards
|
||||
extern int CmdHF14AMfucAuth(const char *Cmd);
|
||||
extern int CmdHF14AMfucSetPwd(const char *Cmd);
|
||||
extern int CmdHF14AMfucSetUid(const char *Cmd);
|
||||
extern int CmdHF14AMfuGenDiverseKeys(const char *Cmd);
|
||||
extern int CmdHF14AMfuPwdGen(const char *Cmd);
|
||||
int CmdHF14AMfucAuth(const char *Cmd);
|
||||
int CmdHF14AMfucSetPwd(const char *Cmd);
|
||||
int CmdHF14AMfucSetUid(const char *Cmd);
|
||||
int CmdHF14AMfuGenDiverseKeys(const char *Cmd);
|
||||
int CmdHF14AMfuPwdGen(const char *Cmd);
|
||||
|
||||
//general stuff
|
||||
extern int CmdHF14AMfUDump(const char *Cmd);
|
||||
extern int CmdHF14AMfURestore(const char *Cmd);
|
||||
extern int CmdHF14AMfUInfo(const char *Cmd);
|
||||
extern int CmdHF14AMfUeLoad(const char *Cmd);
|
||||
extern int CmdHF14AMfUSim(const char *Cmd);
|
||||
int CmdHF14AMfUDump(const char *Cmd);
|
||||
int CmdHF14AMfURestore(const char *Cmd);
|
||||
int CmdHF14AMfUInfo(const char *Cmd);
|
||||
int CmdHF14AMfUeLoad(const char *Cmd);
|
||||
int CmdHF14AMfUSim(const char *Cmd);
|
||||
|
||||
extern uint32_t GetHF14AMfU_Type(void);
|
||||
extern int ul_print_type(uint32_t tagtype, uint8_t spacer);
|
||||
uint32_t GetHF14AMfU_Type(void);
|
||||
int ul_print_type(uint32_t tagtype, uint8_t spacer);
|
||||
|
||||
void printMFUdump(mfu_dump_t *card);
|
||||
void printMFUdumpEx(mfu_dump_t *card, uint16_t pages, uint8_t startpage);
|
||||
|
||||
extern int usage_hf_mfu_info(void);
|
||||
extern int usage_hf_mfu_dump(void);
|
||||
extern int usage_hf_mfu_rdbl(void);
|
||||
extern int usage_hf_mfu_wrbl(void);
|
||||
extern int usage_hf_mfu_eload(void);
|
||||
extern int usage_hf_mfu_sim(void);
|
||||
extern int usage_hf_mfu_ucauth(void);
|
||||
extern int usage_hf_mfu_ucsetpwd(void);
|
||||
extern int usage_hf_mfu_ucsetuid(void);
|
||||
extern int usage_hf_mfu_gendiverse(void);
|
||||
extern int usage_hf_mfu_pwdgen(void);
|
||||
int usage_hf_mfu_info(void);
|
||||
int usage_hf_mfu_dump(void);
|
||||
int usage_hf_mfu_rdbl(void);
|
||||
int usage_hf_mfu_wrbl(void);
|
||||
int usage_hf_mfu_eload(void);
|
||||
int usage_hf_mfu_sim(void);
|
||||
int usage_hf_mfu_ucauth(void);
|
||||
int usage_hf_mfu_ucsetpwd(void);
|
||||
int usage_hf_mfu_ucsetuid(void);
|
||||
int usage_hf_mfu_gendiverse(void);
|
||||
int usage_hf_mfu_pwdgen(void);
|
||||
|
||||
int CmdHFMFUltra(const char *Cmd);
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
#include "protocols.h"
|
||||
#include "cmdhf.h"
|
||||
|
||||
extern int CmdHFTopaz(const char *Cmd);
|
||||
extern int CmdHFTopazReader(const char *Cmd);
|
||||
extern int CmdHFTopazSim(const char *Cmd);
|
||||
extern int CmdHFTopazCmdRaw(const char *Cmd);
|
||||
extern int CmdHFTopazList(const char *Cmd);
|
||||
int CmdHFTopaz(const char *Cmd);
|
||||
int CmdHFTopazReader(const char *Cmd);
|
||||
int CmdHFTopazSim(const char *Cmd);
|
||||
int CmdHFTopazCmdRaw(const char *Cmd);
|
||||
int CmdHFTopazList(const char *Cmd);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -55,28 +55,28 @@
|
|||
|
||||
int CmdLF(const char *Cmd);
|
||||
|
||||
extern int CmdLFSetConfig(const char *Cmd);
|
||||
int CmdLFSetConfig(const char *Cmd);
|
||||
|
||||
extern int CmdLFCommandRead(const char *Cmd);
|
||||
extern int CmdFlexdemod(const char *Cmd);
|
||||
extern int CmdLFRead(const char *Cmd);
|
||||
extern int CmdLFSim(const char *Cmd);
|
||||
extern int CmdLFaskSim(const char *Cmd);
|
||||
extern int CmdLFfskSim(const char *Cmd);
|
||||
extern int CmdLFpskSim(const char *Cmd);
|
||||
extern int CmdLFSimBidir(const char *Cmd);
|
||||
extern int CmdLFSniff(const char *Cmd);
|
||||
extern int CmdVchDemod(const char *Cmd);
|
||||
extern int CmdLFfind(const char *Cmd);
|
||||
int CmdLFCommandRead(const char *Cmd);
|
||||
int CmdFlexdemod(const char *Cmd);
|
||||
int CmdLFRead(const char *Cmd);
|
||||
int CmdLFSim(const char *Cmd);
|
||||
int CmdLFaskSim(const char *Cmd);
|
||||
int CmdLFfskSim(const char *Cmd);
|
||||
int CmdLFpskSim(const char *Cmd);
|
||||
int CmdLFSimBidir(const char *Cmd);
|
||||
int CmdLFSniff(const char *Cmd);
|
||||
int CmdVchDemod(const char *Cmd);
|
||||
int CmdLFfind(const char *Cmd);
|
||||
|
||||
extern bool lf_read(bool silent, uint32_t samples);
|
||||
bool lf_read(bool silent, uint32_t samples);
|
||||
|
||||
// usages helptext
|
||||
extern int usage_lf_cmdread(void);
|
||||
extern int usage_lf_read(void);
|
||||
extern int usage_lf_sniff(void);
|
||||
extern int usage_lf_config(void);
|
||||
extern int usage_lf_simfsk(void);
|
||||
extern int usage_lf_simask(void);
|
||||
extern int usage_lf_simpsk(void);
|
||||
int usage_lf_cmdread(void);
|
||||
int usage_lf_read(void);
|
||||
int usage_lf_sniff(void);
|
||||
int usage_lf_config(void);
|
||||
int usage_lf_simfsk(void);
|
||||
int usage_lf_simask(void);
|
||||
int usage_lf_simpsk(void);
|
||||
#endif
|
||||
|
|
|
@ -24,17 +24,17 @@
|
|||
#include "util_posix.h"
|
||||
|
||||
|
||||
extern int CmdLFAWID(const char *Cmd);
|
||||
extern int CmdAWIDDemod(const char *Cmd);
|
||||
extern int CmdAWIDRead(const char *Cmd);
|
||||
extern int CmdAWIDSim(const char *Cmd);
|
||||
extern int CmdAWIDClone(const char *Cmd);
|
||||
extern int CmdAWIDBrute(const char *Cmd);
|
||||
extern int getAWIDBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *bits);
|
||||
int CmdLFAWID(const char *Cmd);
|
||||
int CmdAWIDDemod(const char *Cmd);
|
||||
int CmdAWIDRead(const char *Cmd);
|
||||
int CmdAWIDSim(const char *Cmd);
|
||||
int CmdAWIDClone(const char *Cmd);
|
||||
int CmdAWIDBrute(const char *Cmd);
|
||||
int getAWIDBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *bits);
|
||||
|
||||
extern int usage_lf_awid_read(void);
|
||||
extern int usage_lf_awid_sim(void);
|
||||
extern int usage_lf_awid_clone(void);
|
||||
extern int usage_lf_awid_brute(void);
|
||||
int usage_lf_awid_read(void);
|
||||
int usage_lf_awid_sim(void);
|
||||
int usage_lf_awid_clone(void);
|
||||
int usage_lf_awid_brute(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#define COTAG_BITS 264
|
||||
#endif
|
||||
|
||||
extern int CmdLFCOTAG(const char *Cmd);
|
||||
extern int CmdCOTAGRead(const char *Cmd);
|
||||
extern int CmdCOTAGDemod(const char *Cmd);
|
||||
int CmdLFCOTAG(const char *Cmd);
|
||||
int CmdCOTAGRead(const char *Cmd);
|
||||
int CmdCOTAGDemod(const char *Cmd);
|
||||
|
||||
extern int usage_lf_cotag_read(void);
|
||||
int usage_lf_cotag_read(void);
|
||||
#endif
|
||||
|
|
|
@ -25,44 +25,44 @@
|
|||
#include "cmdlf.h"
|
||||
#include "lfdemod.h"
|
||||
|
||||
extern int CmdLFEM4X(const char *Cmd);
|
||||
int CmdLFEM4X(const char *Cmd);
|
||||
|
||||
|
||||
extern int CmdEM410xDemod(const char *Cmd);
|
||||
extern int CmdEM410xRead(const char *Cmd);
|
||||
extern int CmdEM410xSim(const char *Cmd);
|
||||
extern int CmdEM410xBrute(const char *Cmd);
|
||||
extern int CmdEM410xWatch(const char *Cmd);
|
||||
extern int CmdEM410xWatchnSpoof(const char *Cmd);
|
||||
extern int CmdEM410xWrite(const char *Cmd);
|
||||
extern int CmdEM4x05Dump(const char *Cmd);
|
||||
extern int CmdEM4x05Info(const char *Cmd);
|
||||
extern int CmdEM4x05Read(const char *Cmd);
|
||||
extern int CmdEM4x05Write(const char *Cmd);
|
||||
extern int CmdEM4x50Read(const char *Cmd);
|
||||
extern int CmdEM4x50Write(const char *Cmd);
|
||||
extern int CmdEM4x50Dump(const char *Cmd);
|
||||
int CmdEM410xDemod(const char *Cmd);
|
||||
int CmdEM410xRead(const char *Cmd);
|
||||
int CmdEM410xSim(const char *Cmd);
|
||||
int CmdEM410xBrute(const char *Cmd);
|
||||
int CmdEM410xWatch(const char *Cmd);
|
||||
int CmdEM410xWatchnSpoof(const char *Cmd);
|
||||
int CmdEM410xWrite(const char *Cmd);
|
||||
int CmdEM4x05Dump(const char *Cmd);
|
||||
int CmdEM4x05Info(const char *Cmd);
|
||||
int CmdEM4x05Read(const char *Cmd);
|
||||
int CmdEM4x05Write(const char *Cmd);
|
||||
int CmdEM4x50Read(const char *Cmd);
|
||||
int CmdEM4x50Write(const char *Cmd);
|
||||
int CmdEM4x50Dump(const char *Cmd);
|
||||
|
||||
extern int EM4x50Read(const char *Cmd, bool verbose);
|
||||
int EM4x50Read(const char *Cmd, bool verbose);
|
||||
bool EM4x05IsBlock0(uint32_t *word);
|
||||
|
||||
extern void printEM410x(uint32_t hi, uint64_t id);
|
||||
extern int AskEm410xDecode(bool verbose, uint32_t *hi, uint64_t *lo);
|
||||
extern int AskEm410xDemod(const char *Cmd, uint32_t *hi, uint64_t *lo, bool verbose);
|
||||
void printEM410x(uint32_t hi, uint64_t id);
|
||||
int AskEm410xDecode(bool verbose, uint32_t *hi, uint64_t *lo);
|
||||
int AskEm410xDemod(const char *Cmd, uint32_t *hi, uint64_t *lo, bool verbose);
|
||||
|
||||
extern int usage_lf_em410x_sim(void);
|
||||
extern int usage_lf_em410x_ws(void);
|
||||
extern int usage_lf_em410x_clone(void);
|
||||
extern int usage_lf_em410x_sim(void);
|
||||
extern int usage_lf_em410x_brute(void);
|
||||
int usage_lf_em410x_sim(void);
|
||||
int usage_lf_em410x_ws(void);
|
||||
int usage_lf_em410x_clone(void);
|
||||
int usage_lf_em410x_sim(void);
|
||||
int usage_lf_em410x_brute(void);
|
||||
|
||||
extern int usage_lf_em4x50_dump(void);
|
||||
extern int usage_lf_em4x50_read(void);
|
||||
extern int usage_lf_em4x50_write(void);
|
||||
int usage_lf_em4x50_dump(void);
|
||||
int usage_lf_em4x50_read(void);
|
||||
int usage_lf_em4x50_write(void);
|
||||
|
||||
extern int usage_lf_em4x05_dump(void);
|
||||
extern int usage_lf_em4x05_read(void);
|
||||
extern int usage_lf_em4x05_write(void);
|
||||
extern int usage_lf_em4x05_info(void);
|
||||
int usage_lf_em4x05_dump(void);
|
||||
int usage_lf_em4x05_read(void);
|
||||
int usage_lf_em4x05_write(void);
|
||||
int usage_lf_em4x05_info(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,17 +19,17 @@
|
|||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
|
||||
extern int CmdLFFdx(const char *Cmd);
|
||||
extern int CmdFdxClone(const char *Cmd);
|
||||
extern int CmdFdxSim(const char *Cmd);
|
||||
extern int CmdFdxRead(const char *Cmd);
|
||||
extern int CmdFdxDemod(const char *Cmd);
|
||||
int CmdLFFdx(const char *Cmd);
|
||||
int CmdFdxClone(const char *Cmd);
|
||||
int CmdFdxSim(const char *Cmd);
|
||||
int CmdFdxRead(const char *Cmd);
|
||||
int CmdFdxDemod(const char *Cmd);
|
||||
|
||||
int getFDXBits(uint64_t national_id, uint16_t country, uint8_t isanimal, uint8_t isextended, uint32_t extended, uint8_t *bits);
|
||||
|
||||
extern int usage_lf_fdx_clone(void);
|
||||
extern int usage_lf_fdx_sim(void);
|
||||
extern int usage_lf_fdx_read(void);
|
||||
extern int usage_lf_fdx_demod(void);
|
||||
int usage_lf_fdx_clone(void);
|
||||
int usage_lf_fdx_sim(void);
|
||||
int usage_lf_fdx_read(void);
|
||||
int usage_lf_fdx_demod(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include "lfdemod.h" // parityTest
|
||||
#include "crc.h"
|
||||
|
||||
extern int CmdLFGuard(const char *Cmd);
|
||||
extern int CmdGuardDemod(const char *Cmd);
|
||||
extern int CmdGuardRead(const char *Cmd);
|
||||
extern int CmdGuardClone(const char *Cmd);
|
||||
extern int CmdGuardSim(const char *Cmd);
|
||||
int CmdLFGuard(const char *Cmd);
|
||||
int CmdGuardDemod(const char *Cmd);
|
||||
int CmdGuardRead(const char *Cmd);
|
||||
int CmdGuardClone(const char *Cmd);
|
||||
int CmdGuardSim(const char *Cmd);
|
||||
|
||||
extern int usage_lf_guard_clone(void);
|
||||
extern int usage_lf_quard_sim(void);
|
||||
int usage_lf_guard_clone(void);
|
||||
int usage_lf_quard_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -24,20 +24,20 @@
|
|||
#include "util_posix.h"
|
||||
#include "lfdemod.h"
|
||||
|
||||
extern int CmdLFHID(const char *Cmd);
|
||||
extern int CmdHIDDemod(const char *Cmd);
|
||||
extern int CmdHIDRead(const char *Cmd);
|
||||
extern int CmdHIDSim(const char *Cmd);
|
||||
extern int CmdHIDClone(const char *Cmd);
|
||||
extern int CmdHIDWiegand(const char *Cmd);
|
||||
extern int CmdHIDBrute(const char *Cmd);
|
||||
int CmdLFHID(const char *Cmd);
|
||||
int CmdHIDDemod(const char *Cmd);
|
||||
int CmdHIDRead(const char *Cmd);
|
||||
int CmdHIDSim(const char *Cmd);
|
||||
int CmdHIDClone(const char *Cmd);
|
||||
int CmdHIDWiegand(const char *Cmd);
|
||||
int CmdHIDBrute(const char *Cmd);
|
||||
|
||||
extern int usage_lf_hid_read(void);
|
||||
extern int usage_lf_hid_wiegand(void);
|
||||
extern int usage_lf_hid_sim(void);
|
||||
extern int usage_lf_hid_clone(void);
|
||||
extern int usage_lf_hid_brute(void);
|
||||
int usage_lf_hid_read(void);
|
||||
int usage_lf_hid_wiegand(void);
|
||||
int usage_lf_hid_sim(void);
|
||||
int usage_lf_hid_clone(void);
|
||||
int usage_lf_hid_brute(void);
|
||||
|
||||
//void calc26(uint16_t fc, uint32_t cardno, uint8_t *out);
|
||||
extern void calcWiegand(uint8_t fmtlen, uint16_t fc, uint64_t cardno, uint8_t *bits);
|
||||
void calcWiegand(uint8_t fmtlen, uint16_t fc, uint64_t cardno, uint8_t *bits);
|
||||
#endif
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
#ifndef CMDLFHITAG_H__
|
||||
#define CMDLFHITAG_H__
|
||||
|
||||
extern int CmdLFHitag(const char *Cmd);
|
||||
int CmdLFHitag(const char *Cmd);
|
||||
|
||||
extern int CmdLFHitagList(const char *Cmd);
|
||||
extern int CmdLFHitagSniff(const char *Cmd);
|
||||
extern int CmdLFHitagSim(const char *Cmd);
|
||||
extern int CmdLFHitagInfo(const char *Cmd);
|
||||
extern int CmdLFHitagReader(const char *Cmd);
|
||||
extern int CmdLFHitagCheckChallenges(const char *Cmd);
|
||||
extern int CmdLFHitagWriter(const char *Cmd);
|
||||
extern int CmdLFHitagDump(const char *cmd);
|
||||
int CmdLFHitagList(const char *Cmd);
|
||||
int CmdLFHitagSniff(const char *Cmd);
|
||||
int CmdLFHitagSim(const char *Cmd);
|
||||
int CmdLFHitagInfo(const char *Cmd);
|
||||
int CmdLFHitagReader(const char *Cmd);
|
||||
int CmdLFHitagCheckChallenges(const char *Cmd);
|
||||
int CmdLFHitagWriter(const char *Cmd);
|
||||
int CmdLFHitagDump(const char *cmd);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,19 @@
|
|||
#include "cmddata.h"
|
||||
#include "cmdlf.h" // lf_read
|
||||
|
||||
extern int CmdLFINDALA(const char *Cmd);
|
||||
int CmdLFINDALA(const char *Cmd);
|
||||
|
||||
extern int CmdIndalaDemod(const char *Cmd);
|
||||
extern int CmdIndalaDemodAlt(const char *Cmd);
|
||||
extern int CmdIndalaRead(const char *Cmd);
|
||||
extern int CmdIndalaClone(const char *Cmd);
|
||||
extern int CmdIndalaSim(const char *Cmd);
|
||||
int CmdIndalaDemod(const char *Cmd);
|
||||
int CmdIndalaDemodAlt(const char *Cmd);
|
||||
int CmdIndalaRead(const char *Cmd);
|
||||
int CmdIndalaClone(const char *Cmd);
|
||||
int CmdIndalaSim(const char *Cmd);
|
||||
|
||||
extern int detectIndala26(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
extern int detectIndala64(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
extern int detectIndala224(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
int detectIndala26(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
int detectIndala64(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
int detectIndala224(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
|
||||
extern int usage_lf_indala_demod(void);
|
||||
extern int usage_lf_indala_clone(void);
|
||||
extern int usage_lf_indala_sim(void);
|
||||
int usage_lf_indala_demod(void);
|
||||
int usage_lf_indala_clone(void);
|
||||
int usage_lf_indala_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
#include "cmdmain.h"
|
||||
#include "cmddata.h"
|
||||
|
||||
extern int CmdLFIO(const char *Cmd);
|
||||
extern int CmdIOProxDemod(const char *Cmd);
|
||||
extern int CmdIOProxRead(const char *Cmd);
|
||||
extern int CmdIOProxSim(const char *Cmd);
|
||||
extern int CmdIOProxClone(const char *Cmd);
|
||||
int CmdLFIO(const char *Cmd);
|
||||
int CmdIOProxDemod(const char *Cmd);
|
||||
int CmdIOProxRead(const char *Cmd);
|
||||
int CmdIOProxSim(const char *Cmd);
|
||||
int CmdIOProxClone(const char *Cmd);
|
||||
|
||||
int getIOProxBits(uint8_t version, uint8_t fc, uint16_t cn, uint8_t *bits);
|
||||
|
||||
extern int usage_lf_io_read(void);
|
||||
extern int usage_lf_io_clone(void);
|
||||
extern int usage_lf_io_sim(void);
|
||||
int usage_lf_io_read(void);
|
||||
int usage_lf_io_clone(void);
|
||||
int usage_lf_io_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -22,20 +22,20 @@
|
|||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
|
||||
extern int CmdLFJablotron(const char *Cmd);
|
||||
int CmdLFJablotron(const char *Cmd);
|
||||
|
||||
extern int CmdJablotronDemod(const char *Cmd);
|
||||
extern int CmdJablotronRead(const char *Cmd);
|
||||
extern int CmdJablotronClone(const char *Cmd);
|
||||
extern int CmdJablotronSim(const char *Cmd);
|
||||
int CmdJablotronDemod(const char *Cmd);
|
||||
int CmdJablotronRead(const char *Cmd);
|
||||
int CmdJablotronClone(const char *Cmd);
|
||||
int CmdJablotronSim(const char *Cmd);
|
||||
|
||||
extern int detectJablotron(uint8_t *bits, size_t *size);
|
||||
extern int getJablotronBits(uint64_t fullcode, uint8_t *bits);
|
||||
int detectJablotron(uint8_t *bits, size_t *size);
|
||||
int getJablotronBits(uint64_t fullcode, uint8_t *bits);
|
||||
|
||||
//extern int usage_lf_jablotron_demod(void);
|
||||
//extern int usage_lf_jablotron_read(void);
|
||||
extern int usage_lf_jablotron_clone(void);
|
||||
extern int usage_lf_jablotron_sim(void);
|
||||
//int usage_lf_jablotron_demod(void);
|
||||
//int usage_lf_jablotron_read(void);
|
||||
int usage_lf_jablotron_clone(void);
|
||||
int usage_lf_jablotron_sim(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,15 +22,15 @@
|
|||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // preamble test
|
||||
|
||||
extern int CmdLFKeri(const char *Cmd);
|
||||
extern int CmdKeriRead(const char *Cmd);
|
||||
extern int CmdKeriDemod(const char *Cmd);
|
||||
extern int CmdKeriClone(const char *Cmd);
|
||||
extern int CmdKeriSim(const char *Cmd);
|
||||
int CmdLFKeri(const char *Cmd);
|
||||
int CmdKeriRead(const char *Cmd);
|
||||
int CmdKeriDemod(const char *Cmd);
|
||||
int CmdKeriClone(const char *Cmd);
|
||||
int CmdKeriSim(const char *Cmd);
|
||||
|
||||
extern int detectKeri(uint8_t *dest, size_t *size, bool *invert);
|
||||
int detectKeri(uint8_t *dest, size_t *size, bool *invert);
|
||||
|
||||
extern int usage_lf_keri_clone(void);
|
||||
extern int usage_lf_keri_sim(void);
|
||||
int usage_lf_keri_clone(void);
|
||||
int usage_lf_keri_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@
|
|||
#include "lfdemod.h" // parityTest
|
||||
#include "crc.h"
|
||||
|
||||
extern int CmdLFNedap(const char *Cmd);
|
||||
extern int CmdLFNedapDemod(const char *Cmd);
|
||||
extern int CmdLFNedapRead(const char *Cmd);
|
||||
//extern int CmdLFNedapClone(const char *Cmd);
|
||||
extern int CmdLFNedapSim(const char *Cmd);
|
||||
extern int CmdLFNedapChk(const char *Cmd);
|
||||
int CmdLFNedap(const char *Cmd);
|
||||
int CmdLFNedapDemod(const char *Cmd);
|
||||
int CmdLFNedapRead(const char *Cmd);
|
||||
//int CmdLFNedapClone(const char *Cmd);
|
||||
int CmdLFNedapSim(const char *Cmd);
|
||||
int CmdLFNedapChk(const char *Cmd);
|
||||
|
||||
extern int detectNedap(uint8_t *dest, size_t *size);
|
||||
int detectNedap(uint8_t *dest, size_t *size);
|
||||
|
||||
extern int usage_lf_nedap_read(void);
|
||||
//extern int usage_lf_nedap_clone(void);
|
||||
extern int usage_lf_nedap_sim(void);
|
||||
int usage_lf_nedap_read(void);
|
||||
//int usage_lf_nedap_clone(void);
|
||||
int usage_lf_nedap_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include "cmdlf.h"
|
||||
#include "lfdemod.h"
|
||||
|
||||
extern int CmdLFNEXWATCH(const char *Cmd);
|
||||
extern int CmdNexWatchDemod(const char *Cmd);
|
||||
extern int CmdNexWatchRead(const char *Cmd);
|
||||
int CmdLFNEXWATCH(const char *Cmd);
|
||||
int CmdNexWatchDemod(const char *Cmd);
|
||||
int CmdNexWatchRead(const char *Cmd);
|
||||
|
||||
extern int detectNexWatch(uint8_t *dest, size_t *size, bool *invert);
|
||||
int detectNexWatch(uint8_t *dest, size_t *size, bool *invert);
|
||||
#endif
|
||||
|
|
|
@ -22,17 +22,17 @@
|
|||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
|
||||
extern int CmdLFNoralsy(const char *Cmd);
|
||||
extern int CmdNoralsyDemod(const char *Cmd);
|
||||
extern int CmdNoralsyRead(const char *Cmd);
|
||||
extern int CmdNoralsyClone(const char *Cmd);
|
||||
extern int CmdNoralsySim(const char *Cmd);
|
||||
int CmdLFNoralsy(const char *Cmd);
|
||||
int CmdNoralsyDemod(const char *Cmd);
|
||||
int CmdNoralsyRead(const char *Cmd);
|
||||
int CmdNoralsyClone(const char *Cmd);
|
||||
int CmdNoralsySim(const char *Cmd);
|
||||
|
||||
int getnoralsyBits(uint32_t id, uint16_t year, uint8_t *bits);
|
||||
|
||||
extern int usage_lf_noralsy_clone(void);
|
||||
extern int usage_lf_noralsy_sim(void);
|
||||
//extern int usage_lf_noralsy_read(void);
|
||||
//extern int usage_lf_noralsy_demod(void);
|
||||
int usage_lf_noralsy_clone(void);
|
||||
int usage_lf_noralsy_sim(void);
|
||||
//int usage_lf_noralsy_read(void);
|
||||
//int usage_lf_noralsy_demod(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
#include "cmdlf.h"
|
||||
#include "lfdemod.h" // preamble test
|
||||
|
||||
extern int CmdLFPac(const char *Cmd);
|
||||
extern int CmdPacRead(const char *Cmd);
|
||||
extern int CmdPacDemod(const char *Cmd);
|
||||
int CmdLFPac(const char *Cmd);
|
||||
int CmdPacRead(const char *Cmd);
|
||||
int CmdPacDemod(const char *Cmd);
|
||||
|
||||
extern int detectPac(uint8_t *dest, size_t *size);
|
||||
int detectPac(uint8_t *dest, size_t *size);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
#ifndef CMDLFPARADOX_H__
|
||||
#define CMDLFPARADOX_H__
|
||||
extern int CmdLFParadox(const char *Cmd);
|
||||
extern int CmdParadoxDemod(const char *Cmd);
|
||||
extern int CmdParadoxRead(const char *Cmd);
|
||||
int CmdLFParadox(const char *Cmd);
|
||||
int CmdParadoxDemod(const char *Cmd);
|
||||
int CmdParadoxRead(const char *Cmd);
|
||||
|
||||
//extern int CmdParadoxClone(const char *Cmd);
|
||||
extern int CmdParadoxSim(const char *Cmd);
|
||||
//int CmdParadoxClone(const char *Cmd);
|
||||
int CmdParadoxSim(const char *Cmd);
|
||||
|
||||
extern int detectParadox(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo, int *waveStartIdx);
|
||||
int detectParadox(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo, int *waveStartIdx);
|
||||
#endif
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
|
||||
extern int CmdLFPresco(const char *Cmd);
|
||||
extern int CmdPrescoRead(const char *Cmd);
|
||||
extern int CmdPrescoDemod(const char *Cmd);
|
||||
extern int CmdPrescoClone(const char *Cmd);
|
||||
extern int CmdPrescoSim(const char *Cmd);
|
||||
int CmdLFPresco(const char *Cmd);
|
||||
int CmdPrescoRead(const char *Cmd);
|
||||
int CmdPrescoDemod(const char *Cmd);
|
||||
int CmdPrescoClone(const char *Cmd);
|
||||
int CmdPrescoSim(const char *Cmd);
|
||||
|
||||
extern int detectPresco(uint8_t *dest, size_t *size);
|
||||
int detectPresco(uint8_t *dest, size_t *size);
|
||||
int GetWiegandFromPresco(const char *id, uint32_t *sitecode, uint32_t *usercode, uint32_t *fullcode, bool *Q5);
|
||||
|
||||
extern int usage_lf_presco_clone(void);
|
||||
extern int usage_lf_presco_sim(void);
|
||||
int usage_lf_presco_clone(void);
|
||||
int usage_lf_presco_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,15 +22,15 @@
|
|||
#include "lfdemod.h" // parityTest
|
||||
#include "crc.h"
|
||||
|
||||
extern int CmdLFPyramid(const char *Cmd);
|
||||
extern int CmdPyramidDemod(const char *Cmd);
|
||||
extern int CmdPyramidRead(const char *Cmd);
|
||||
extern int CmdPyramidClone(const char *Cmd);
|
||||
extern int CmdPyramidSim(const char *Cmd);
|
||||
int CmdLFPyramid(const char *Cmd);
|
||||
int CmdPyramidDemod(const char *Cmd);
|
||||
int CmdPyramidRead(const char *Cmd);
|
||||
int CmdPyramidClone(const char *Cmd);
|
||||
int CmdPyramidSim(const char *Cmd);
|
||||
|
||||
extern int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx);
|
||||
int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx);
|
||||
|
||||
extern int usage_lf_pyramid_clone(void);
|
||||
extern int usage_lf_pyramid_sim(void);
|
||||
int usage_lf_pyramid_clone(void);
|
||||
int usage_lf_pyramid_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
#include "lfdemod.h" // preamble test
|
||||
#include "parity.h" // for wiegand parity test
|
||||
|
||||
extern int CmdLFSecurakey(const char *Cmd);
|
||||
//extern int CmdSecurakeyClone(const char *Cmd);
|
||||
//extern int CmdSecurakeySim(const char *Cmd);
|
||||
extern int CmdSecurakeyRead(const char *Cmd);
|
||||
extern int CmdSecurakeyDemod(const char *Cmd);
|
||||
int CmdLFSecurakey(const char *Cmd);
|
||||
//int CmdSecurakeyClone(const char *Cmd);
|
||||
//int CmdSecurakeySim(const char *Cmd);
|
||||
int CmdSecurakeyRead(const char *Cmd);
|
||||
int CmdSecurakeyDemod(const char *Cmd);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
#include "cmdlf.h"
|
||||
#include "lfdemod.h"
|
||||
|
||||
extern int CmdLFViking(const char *Cmd);
|
||||
int CmdLFViking(const char *Cmd);
|
||||
|
||||
extern int CmdVikingDemod(const char *Cmd);
|
||||
extern int CmdVikingRead(const char *Cmd);
|
||||
extern int CmdVikingClone(const char *Cmd);
|
||||
extern int CmdVikingSim(const char *Cmd);
|
||||
int CmdVikingDemod(const char *Cmd);
|
||||
int CmdVikingRead(const char *Cmd);
|
||||
int CmdVikingClone(const char *Cmd);
|
||||
int CmdVikingSim(const char *Cmd);
|
||||
|
||||
extern int detectViking(uint8_t *dest, size_t *size);
|
||||
int detectViking(uint8_t *dest, size_t *size);
|
||||
|
||||
extern int usage_lf_viking_clone(void);
|
||||
extern int usage_lf_viking_sim(void);
|
||||
int usage_lf_viking_clone(void);
|
||||
int usage_lf_viking_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,19 +21,19 @@
|
|||
#include "cmdlf.h"
|
||||
#include "protocols.h" // for T55xx config register definitions
|
||||
#include "lfdemod.h" // parityTest
|
||||
extern int CmdLFVisa2k(const char *Cmd);
|
||||
int CmdLFVisa2k(const char *Cmd);
|
||||
|
||||
extern int CmdVisa2kDemod(const char *Cmd);
|
||||
extern int CmdVisa2kRead(const char *Cmd);
|
||||
extern int CmdVisa2kClone(const char *Cmd);
|
||||
extern int CmdVisa2kSim(const char *Cmd);
|
||||
int CmdVisa2kDemod(const char *Cmd);
|
||||
int CmdVisa2kRead(const char *Cmd);
|
||||
int CmdVisa2kClone(const char *Cmd);
|
||||
int CmdVisa2kSim(const char *Cmd);
|
||||
|
||||
int getvisa2kBits(uint64_t fullcode, uint8_t *bits);
|
||||
extern int detectVisa2k(uint8_t *dest, size_t *size);
|
||||
int detectVisa2k(uint8_t *dest, size_t *size);
|
||||
|
||||
extern int usage_lf_visa2k_clone(void);
|
||||
extern int usage_lf_visa2k_sim(void);
|
||||
//extern int usage_lf_visa2k_read(void);
|
||||
//extern int usage_lf_visa2k_demod(void);
|
||||
int usage_lf_visa2k_clone(void);
|
||||
int usage_lf_visa2k_sim(void);
|
||||
//int usage_lf_visa2k_read(void);
|
||||
//int usage_lf_visa2k_demod(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "cmdsmartcard.h" // rdv40 smart card ISO7816 commands
|
||||
#endif
|
||||
|
||||
extern int CommandReceived(char *Cmd);
|
||||
extern command_t *getTopLevelCommandTable();
|
||||
int CommandReceived(char *Cmd);
|
||||
command_t *getTopLevelCommandTable();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#ifndef CMDSCRIPT_H__
|
||||
#define CMDSCRIPT_H__
|
||||
|
||||
extern int CmdScript(const char *Cmd);
|
||||
int CmdScript(const char *Cmd);
|
||||
|
||||
extern int CmdScriptList(const char *Cmd);
|
||||
extern int CmdScriptRun(const char *Cmd);
|
||||
int CmdScriptList(const char *Cmd);
|
||||
int CmdScriptRun(const char *Cmd);
|
||||
#endif
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
#include "emv/dump.h" // dump_buffer
|
||||
#include "crypto/libpcrypto.h" // sha512hash
|
||||
|
||||
extern int CmdSmartcard(const char *Cmd);
|
||||
int CmdSmartcard(const char *Cmd);
|
||||
|
||||
extern int CmdSmartRaw(const char *cmd);
|
||||
extern int CmdSmartUpgrade(const char *cmd);
|
||||
extern int CmdSmartInfo(const char *cmd);
|
||||
extern int CmdSmartReader(const char *Cmd);
|
||||
int CmdSmartRaw(const char *cmd);
|
||||
int CmdSmartUpgrade(const char *cmd);
|
||||
int CmdSmartInfo(const char *cmd);
|
||||
int CmdSmartReader(const char *Cmd);
|
||||
|
||||
extern bool smart_select(bool silent, smart_card_atr_t *atr);
|
||||
extern int ExchangeAPDUSC(uint8_t *datain, int datainlen, bool activateCard, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
bool smart_select(bool silent, smart_card_atr_t *atr);
|
||||
int ExchangeAPDUSC(uint8_t *datain, int datainlen, bool activateCard, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
|
||||
extern int usage_sm_raw(void);
|
||||
extern int usage_sm_reader(void);
|
||||
extern int usage_sm_info(void);
|
||||
extern int usage_sm_upgrade(void);
|
||||
int usage_sm_raw(void);
|
||||
int usage_sm_reader(void);
|
||||
int usage_sm_info(void);
|
||||
int usage_sm_upgrade(void);
|
||||
#endif
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
#include "comms.h" // for sending cmds to device. GetFromBigBuf
|
||||
#include "loclass/fileutils.h" // for saveFile
|
||||
|
||||
extern int CmdTrace(const char *Cmd);
|
||||
int CmdTrace(const char *Cmd);
|
||||
|
||||
extern int CmdTraceList(const char *Cmd);
|
||||
extern int CmdTraceLoad(const char *Cmd);
|
||||
extern int CmdTraceSave(const char *Cmd);
|
||||
int CmdTraceList(const char *Cmd);
|
||||
int CmdTraceLoad(const char *Cmd);
|
||||
int CmdTraceSave(const char *Cmd);
|
||||
|
||||
// usages helptext
|
||||
extern int usage_trace_list(void);
|
||||
extern int usage_trace_load(void);
|
||||
extern int usage_trace_save(void);
|
||||
int usage_trace_list(void);
|
||||
int usage_trace_load(void);
|
||||
int usage_trace_save(void);
|
||||
#endif
|
||||
|
|
|
@ -62,7 +62,7 @@ bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand *response, size_t ms_timeo
|
|||
bool WaitForResponseTimeout(uint32_t cmd, UsbCommand *response, size_t ms_timeout);
|
||||
bool WaitForResponse(uint32_t cmd, UsbCommand *response);
|
||||
|
||||
extern bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, UsbCommand *response, size_t ms_timeout, bool show_warning);
|
||||
bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, UsbCommand *response, size_t ms_timeout, bool show_warning);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
extern int asn1_print(uint8_t *asn1buf, size_t asn1buflen, char *indent);
|
||||
extern int ecdsa_asn1_get_signature(uint8_t *signature, size_t signaturelen, uint8_t *rval, uint8_t *sval);
|
||||
int asn1_print(uint8_t *asn1buf, size_t asn1buflen, char *indent);
|
||||
int ecdsa_asn1_get_signature(uint8_t *signature, size_t signaturelen, uint8_t *rval, uint8_t *sval);
|
||||
|
||||
#endif /* asn1utils.h */
|
||||
|
|
|
@ -36,10 +36,10 @@ extern bool GridLocked;
|
|||
|
||||
//Operations defined in data_operations
|
||||
//extern int autoCorr(const int* in, int *out, size_t len, int window);
|
||||
extern int AskEdgeDetect(const int *in, int *out, int len, int threshold);
|
||||
extern int AutoCorrelate(const int *in, int *out, size_t len, int window, bool SaveGrph, bool verbose);
|
||||
extern int directionalThreshold(const int *in, int *out, size_t len, int8_t up, int8_t down);
|
||||
extern void save_restoreGB(uint8_t saveOpt);
|
||||
int AskEdgeDetect(const int *in, int *out, int len, int threshold);
|
||||
int AutoCorrelate(const int *in, int *out, size_t len, int window, bool SaveGrph, bool verbose);
|
||||
int directionalThreshold(const int *in, int *out, size_t len, int8_t up, int8_t down);
|
||||
void save_restoreGB(uint8_t saveOpt);
|
||||
|
||||
#define GRAPH_SAVE 1
|
||||
#define GRAPH_RESTORE 0
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
extern int scandir(const char *dir, struct dirent ***namelist, int (*select)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **));
|
||||
extern int alphasort(const struct dirent **a, const struct dirent **b);
|
||||
int scandir(const char *dir, struct dirent ***namelist, int (*select)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **));
|
||||
int alphasort(const struct dirent **a, const struct dirent **b);
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // SCANDIR_H__
|
||||
|
|
|
@ -33,10 +33,10 @@ void ShowGui(void);
|
|||
void HideGraphWindow(void);
|
||||
void ShowGraphWindow(void);
|
||||
void RepaintGraphWindow(void);
|
||||
extern void PrintAndLog(char *fmt, ...);
|
||||
void PrintAndLog(char *fmt, ...);
|
||||
void PrintAndLogOptions(char *str[][2], size_t size, size_t space);
|
||||
void PrintAndLogEx(logLevel_t level, char *fmt, ...);
|
||||
extern void SetLogFilename(char *fn);
|
||||
void SetLogFilename(char *fn);
|
||||
void SetFlushAfterWrite(bool value);
|
||||
|
||||
extern double CursorScaleFactor;
|
||||
|
@ -48,6 +48,6 @@ extern bool showDemod;
|
|||
|
||||
extern pthread_mutex_t print_lock;
|
||||
|
||||
extern void iceIIR_Butterworth(int *data, const size_t len);
|
||||
extern void iceSimple_Filter(int *data, const size_t len, uint8_t k);
|
||||
void iceIIR_Butterworth(int *data, const size_t len);
|
||||
void iceSimple_Filter(int *data, const size_t len, uint8_t k);
|
||||
#endif
|
||||
|
|
124
client/util.h
124
client/util.h
|
@ -186,81 +186,81 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
extern uint8_t g_debugMode;
|
||||
uint8_t g_debugMode;
|
||||
|
||||
extern int ukbhit(void);
|
||||
extern void AddLogLine(char *fn, char *data, char *c);
|
||||
extern void AddLogHex(char *fn, char *extData, const uint8_t *data, const size_t len);
|
||||
extern void AddLogUint64(char *fn, char *data, const uint64_t value);
|
||||
extern void AddLogCurrentDT(char *fn);
|
||||
extern void FillFileNameByUID(char *filenamePrefix, uint8_t *uid, const char *ext, int uidlen);
|
||||
int ukbhit(void);
|
||||
void AddLogLine(char *fn, char *data, char *c);
|
||||
void AddLogHex(char *fn, char *extData, const uint8_t *data, const size_t len);
|
||||
void AddLogUint64(char *fn, char *data, const uint64_t value);
|
||||
void AddLogCurrentDT(char *fn);
|
||||
void FillFileNameByUID(char *filenamePrefix, uint8_t *uid, const char *ext, int uidlen);
|
||||
|
||||
// fill buffer from structure [{uint8_t data, size_t length},...]
|
||||
extern int FillBuffer(uint8_t *data, size_t maxDataLength, size_t *dataLength, ...);
|
||||
int FillBuffer(uint8_t *data, size_t maxDataLength, size_t *dataLength, ...);
|
||||
|
||||
extern bool CheckStringIsHEXValue(const char *value);
|
||||
extern void hex_to_buffer(const uint8_t *buf, const uint8_t *hex_data, const size_t hex_len,
|
||||
bool CheckStringIsHEXValue(const char *value);
|
||||
void hex_to_buffer(const uint8_t *buf, const uint8_t *hex_data, const size_t hex_len,
|
||||
const size_t hex_max_len, const size_t min_str_len, const size_t spaces_between,
|
||||
bool uppercase);
|
||||
|
||||
extern void print_hex(const uint8_t *data, const size_t len);
|
||||
extern void print_hex_break(const uint8_t *data, const size_t len, const uint8_t breaks);
|
||||
extern char *sprint_hex(const uint8_t *data, const size_t len);
|
||||
extern char *sprint_hex_inrow(const uint8_t *data, const size_t len);
|
||||
extern char *sprint_hex_inrow_ex(const uint8_t *data, const size_t len, const size_t min_str_len);
|
||||
extern char *sprint_hex_inrow_spaces(const uint8_t *data, const size_t len, size_t spaces_between);
|
||||
extern char *sprint_bin(const uint8_t *data, const size_t len);
|
||||
extern char *sprint_bin_break(const uint8_t *data, const size_t len, const uint8_t breaks);
|
||||
extern char *sprint_hex_ascii(const uint8_t *data, const size_t len);
|
||||
extern char *sprint_ascii(const uint8_t *data, const size_t len);
|
||||
extern char *sprint_ascii_ex(const uint8_t *data, const size_t len, const size_t min_str_len);
|
||||
void print_hex(const uint8_t *data, const size_t len);
|
||||
void print_hex_break(const uint8_t *data, const size_t len, const uint8_t breaks);
|
||||
char *sprint_hex(const uint8_t *data, const size_t len);
|
||||
char *sprint_hex_inrow(const uint8_t *data, const size_t len);
|
||||
char *sprint_hex_inrow_ex(const uint8_t *data, const size_t len, const size_t min_str_len);
|
||||
char *sprint_hex_inrow_spaces(const uint8_t *data, const size_t len, size_t spaces_between);
|
||||
char *sprint_bin(const uint8_t *data, const size_t len);
|
||||
char *sprint_bin_break(const uint8_t *data, const size_t len, const uint8_t breaks);
|
||||
char *sprint_hex_ascii(const uint8_t *data, const size_t len);
|
||||
char *sprint_ascii(const uint8_t *data, const size_t len);
|
||||
char *sprint_ascii_ex(const uint8_t *data, const size_t len, const size_t min_str_len);
|
||||
|
||||
extern void print_blocks(uint32_t *data, size_t len);
|
||||
void print_blocks(uint32_t *data, size_t len);
|
||||
|
||||
extern void num_to_bytes(uint64_t n, size_t len, uint8_t *dest);
|
||||
extern uint64_t bytes_to_num(uint8_t *src, size_t len);
|
||||
extern void num_to_bytebits(uint64_t n, size_t len, uint8_t *dest);
|
||||
extern void num_to_bytebitsLSBF(uint64_t n, size_t len, uint8_t *dest);
|
||||
extern uint8_t *SwapEndian64(const uint8_t *src, const size_t len, const uint8_t blockSize);
|
||||
extern void SwapEndian64ex(const uint8_t *src, const size_t len, const uint8_t blockSize, uint8_t *dest);
|
||||
void num_to_bytes(uint64_t n, size_t len, uint8_t *dest);
|
||||
uint64_t bytes_to_num(uint8_t *src, size_t len);
|
||||
void num_to_bytebits(uint64_t n, size_t len, uint8_t *dest);
|
||||
void num_to_bytebitsLSBF(uint64_t n, size_t len, uint8_t *dest);
|
||||
uint8_t *SwapEndian64(const uint8_t *src, const size_t len, const uint8_t blockSize);
|
||||
void SwapEndian64ex(const uint8_t *src, const size_t len, const uint8_t blockSize, uint8_t *dest);
|
||||
|
||||
extern int param_getlength(const char *line, int paramnum);
|
||||
extern char param_getchar(const char *line, int paramnum);
|
||||
extern char param_getchar_indx(const char *line, int indx, int paramnum);
|
||||
extern int param_getptr(const char *line, int *bg, int *en, int paramnum);
|
||||
extern uint8_t param_get8(const char *line, int paramnum);
|
||||
extern uint8_t param_get8ex(const char *line, int paramnum, int deflt, int base);
|
||||
extern uint32_t param_get32ex(const char *line, int paramnum, int deflt, int base);
|
||||
extern uint64_t param_get64ex(const char *line, int paramnum, int deflt, int base);
|
||||
extern uint8_t param_getdec(const char *line, int paramnum, uint8_t *destination);
|
||||
extern uint8_t param_isdec(const char *line, int paramnum);
|
||||
extern int param_gethex(const char *line, int paramnum, uint8_t *data, int hexcnt);
|
||||
extern int param_gethex_ex(const char *line, int paramnum, uint8_t *data, int *hexcnt);
|
||||
extern int param_gethex_to_eol(const char *line, int paramnum, uint8_t *data, int maxdatalen, int *datalen);
|
||||
extern int param_getstr(const char *line, int paramnum, char *str, size_t buffersize);
|
||||
int param_getlength(const char *line, int paramnum);
|
||||
char param_getchar(const char *line, int paramnum);
|
||||
char param_getchar_indx(const char *line, int indx, int paramnum);
|
||||
int param_getptr(const char *line, int *bg, int *en, int paramnum);
|
||||
uint8_t param_get8(const char *line, int paramnum);
|
||||
uint8_t param_get8ex(const char *line, int paramnum, int deflt, int base);
|
||||
uint32_t param_get32ex(const char *line, int paramnum, int deflt, int base);
|
||||
uint64_t param_get64ex(const char *line, int paramnum, int deflt, int base);
|
||||
uint8_t param_getdec(const char *line, int paramnum, uint8_t *destination);
|
||||
uint8_t param_isdec(const char *line, int paramnum);
|
||||
int param_gethex(const char *line, int paramnum, uint8_t *data, int hexcnt);
|
||||
int param_gethex_ex(const char *line, int paramnum, uint8_t *data, int *hexcnt);
|
||||
int param_gethex_to_eol(const char *line, int paramnum, uint8_t *data, int maxdatalen, int *datalen);
|
||||
int param_getstr(const char *line, int paramnum, char *str, size_t buffersize);
|
||||
|
||||
extern int hextobinarray(char *target, char *source);
|
||||
extern int hextobinstring(char *target, char *source);
|
||||
extern int binarraytohex(char *target, const size_t targetlen, char *source, size_t srclen);
|
||||
extern void binarraytobinstring(char *target, char *source, int length);
|
||||
extern uint8_t GetParity(uint8_t *bits, uint8_t type, int length);
|
||||
extern void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length);
|
||||
int hextobinarray(char *target, char *source);
|
||||
int hextobinstring(char *target, char *source);
|
||||
int binarraytohex(char *target, const size_t targetlen, char *source, size_t srclen);
|
||||
void binarraytobinstring(char *target, char *source, int length);
|
||||
uint8_t GetParity(uint8_t *bits, uint8_t type, int length);
|
||||
void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length);
|
||||
|
||||
extern void xor(unsigned char *dst, unsigned char *src, size_t len);
|
||||
extern int32_t le24toh(uint8_t data[3]);
|
||||
void xor(unsigned char *dst, unsigned char *src, size_t len);
|
||||
int32_t le24toh(uint8_t data[3]);
|
||||
|
||||
extern uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bits);
|
||||
extern void rol(uint8_t *data, const size_t len);
|
||||
extern uint32_t reflect(uint32_t v, int b);
|
||||
extern uint8_t reflect8(uint8_t b); // dedicated 8bit reversal
|
||||
extern uint16_t reflect16(uint16_t b); // dedicated 16bit reversal
|
||||
extern uint64_t HornerScheme(uint64_t num, uint64_t divider, uint64_t factor);
|
||||
uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bits);
|
||||
void rol(uint8_t *data, const size_t len);
|
||||
uint32_t reflect(uint32_t v, int b);
|
||||
uint8_t reflect8(uint8_t b); // dedicated 8bit reversal
|
||||
uint16_t reflect16(uint16_t b); // dedicated 16bit reversal
|
||||
uint64_t HornerScheme(uint64_t num, uint64_t divider, uint64_t factor);
|
||||
|
||||
extern int num_CPUs(void); // number of logical CPUs
|
||||
int num_CPUs(void); // number of logical CPUs
|
||||
|
||||
extern void str_lower(char *s); // converts string to lower case
|
||||
extern bool str_startswith(const char *s, const char *pre); // check for prefix in string
|
||||
extern void strcleanrn(char *buf, size_t len);
|
||||
extern void strcreplace(char *buf, size_t len, char from, char to);
|
||||
extern char *strmcopy(char *buf);
|
||||
void str_lower(char *s); // converts string to lower case
|
||||
bool str_startswith(const char *s, const char *pre); // check for prefix in string
|
||||
void strcleanrn(char *buf, size_t len);
|
||||
void strcreplace(char *buf, size_t len, char from, char to);
|
||||
char *strmcopy(char *buf);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue