mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
internal help fcts -> static
This commit is contained in:
parent
cc0454d5d2
commit
3d6d58aae5
63 changed files with 392 additions and 539 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_analyse_lcr(void) {
|
||||
static int usage_analyse_lcr(void) {
|
||||
PrintAndLogEx(NORMAL, "Specifying the bytes of a UID with a known LRC will find the last byte value");
|
||||
PrintAndLogEx(NORMAL, "needed to generate that LRC with a rolling XOR. All bytes should be specified in HEX.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -25,7 +25,7 @@ int usage_analyse_lcr(void) {
|
|||
PrintAndLogEx(NORMAL, "expected output: Target (BA) requires final LRC XOR byte value: 5A");
|
||||
return 0;
|
||||
}
|
||||
int usage_analyse_checksum(void) {
|
||||
static int usage_analyse_checksum(void) {
|
||||
PrintAndLogEx(NORMAL, "The bytes will be added with eachother and than limited with the applied mask");
|
||||
PrintAndLogEx(NORMAL, "Finally compute ones' complement of the least significant bytes");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -41,7 +41,7 @@ int usage_analyse_checksum(void) {
|
|||
PrintAndLogEx(NORMAL, "expected output: 0x61");
|
||||
return 0;
|
||||
}
|
||||
int usage_analyse_crc(void) {
|
||||
static int usage_analyse_crc(void) {
|
||||
PrintAndLogEx(NORMAL, "A stub method to test different crc implementations inside the PM3 sourcecode. Just because you figured out the poly, doesn't mean you get the desired output");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: analyse crc [h] <bytes>");
|
||||
|
@ -53,7 +53,7 @@ int usage_analyse_crc(void) {
|
|||
PrintAndLogEx(NORMAL, " analyse crc 137AF00A0A0D");
|
||||
return 0;
|
||||
}
|
||||
int usage_analyse_nuid(void) {
|
||||
static int usage_analyse_nuid(void) {
|
||||
PrintAndLogEx(NORMAL, "Generate 4byte NUID from 7byte UID");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: analyse hid [h] <bytes>");
|
||||
|
@ -65,7 +65,7 @@ int usage_analyse_nuid(void) {
|
|||
PrintAndLogEx(NORMAL, " analyse nuid 11223344556677");
|
||||
return 0;
|
||||
}
|
||||
int usage_analyse_a(void) {
|
||||
static int usage_analyse_a(void) {
|
||||
PrintAndLogEx(NORMAL, "Iceman's personal garbage test command");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: analyse a [h] d <bytes>");
|
||||
|
|
|
@ -26,13 +26,6 @@
|
|||
#include "mifare/mfkey.h" // nonce2key
|
||||
#include "util_posix.h" // msclock
|
||||
|
||||
|
||||
int usage_analyse_lcr(void);
|
||||
int usage_analyse_checksum(void);
|
||||
int usage_analyse_crc(void);
|
||||
int usage_analyse_hid(void);
|
||||
int usage_analyse_nuid(void);
|
||||
|
||||
int CmdAnalyse(const char *Cmd);
|
||||
int CmdAnalyseLCR(const char *Cmd);
|
||||
int CmdAnalyseCHKSUM(const char *Cmd);
|
||||
|
|
|
@ -17,7 +17,7 @@ int g_DemodClock = 0;
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_data_printdemodbuf(void) {
|
||||
static int usage_data_printdemodbuf(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data printdemodbuffer x o <offset> l <length>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -26,7 +26,7 @@ int usage_data_printdemodbuf(void) {
|
|||
PrintAndLogEx(NORMAL, " l <length> enter length to print in # of bits or hex characters respectively");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_manrawdecode(void) {
|
||||
static int usage_data_manrawdecode(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data manrawdecode [invert] [maxErr]");
|
||||
PrintAndLogEx(NORMAL, " Takes 10 and 01 and converts to 0 and 1 respectively");
|
||||
PrintAndLogEx(NORMAL, " --must have binary sequence in demodbuffer (run data askrawdemod first)");
|
||||
|
@ -36,7 +36,7 @@ int usage_data_manrawdecode(void) {
|
|||
PrintAndLogEx(NORMAL, " Example: data manrawdecode = decode manchester bitstream from the demodbuffer");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_biphaserawdecode(void) {
|
||||
static int usage_data_biphaserawdecode(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data biphaserawdecode [offset] [invert] [maxErr]");
|
||||
PrintAndLogEx(NORMAL, " Converts 10 or 01 to 1 and 11 or 00 to 0");
|
||||
PrintAndLogEx(NORMAL, " --must have binary sequence in demodbuffer (run data askrawdemod first)");
|
||||
|
@ -50,7 +50,7 @@ int usage_data_biphaserawdecode(void) {
|
|||
PrintAndLogEx(NORMAL, " Example: data biphaserawdecode 1 1 = decode biphase bitstream from the demodbuffer, set offset, and invert output");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod(void) {
|
||||
static int usage_data_rawdemod(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod [modulation] <help>|<options>");
|
||||
PrintAndLogEx(NORMAL, " [modulation] as 2 char, 'ab' for ask/biphase, 'am' for ask/manchester, 'ar' for ask/raw, 'fs' for fsk, ...");
|
||||
PrintAndLogEx(NORMAL, " 'nr' for nrz/direct, 'p1' for psk1, 'p2' for psk2");
|
||||
|
@ -67,7 +67,7 @@ int usage_data_rawdemod(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod p2 = demod GraphBuffer using: psk2 - autodetect");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_am(void) {
|
||||
static int usage_data_rawdemod_am(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod am <s> [clock] <invert> [maxError] [maxLen] [amplify]");
|
||||
PrintAndLogEx(NORMAL, " ['s'] optional, check for Sequence Terminator");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect");
|
||||
|
@ -83,7 +83,7 @@ int usage_data_rawdemod_am(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod am 64 1 0 = demod an ask/manchester tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_ab(void) {
|
||||
static int usage_data_rawdemod_ab(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod ab [offset] [clock] <invert> [maxError] [maxLen] <amplify>");
|
||||
PrintAndLogEx(NORMAL, " [offset], offset to begin biphase, default=0");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect");
|
||||
|
@ -106,7 +106,7 @@ int usage_data_rawdemod_ab(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod ab 0 64 1 0 0 a = demod an ask/biph tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors, and amp");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_ar(void) {
|
||||
static int usage_data_rawdemod_ar(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod ar [clock] <invert> [maxError] [maxLen] [amplify]");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect");
|
||||
PrintAndLogEx(NORMAL, " <invert>, 1 to invert output");
|
||||
|
@ -123,7 +123,7 @@ int usage_data_rawdemod_ar(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod ar 64 1 0 0 a = demod an ask tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors, and amp");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_fs(void) {
|
||||
static int usage_data_rawdemod_fs(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod fs [clock] <invert> [fchigh] [fclow]");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, omit for autodetect.");
|
||||
PrintAndLogEx(NORMAL, " <invert>, 1 for invert output, can be used even if the clock is omitted");
|
||||
|
@ -139,7 +139,7 @@ int usage_data_rawdemod_fs(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod fs 50 1 10 8 = demod an fsk2a RF/50 tag from GraphBuffer");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_nr(void) {
|
||||
static int usage_data_rawdemod_nr(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod nr [clock] <0|1> [maxError]");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect.");
|
||||
PrintAndLogEx(NORMAL, " <invert>, 1 for invert output");
|
||||
|
@ -152,7 +152,7 @@ int usage_data_rawdemod_nr(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod nr 64 1 0 = demod a nrz/direct tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_p1(void) {
|
||||
static int usage_data_rawdemod_p1(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod p1 [clock] <0|1> [maxError]");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect.");
|
||||
PrintAndLogEx(NORMAL, " <invert>, 1 for invert output");
|
||||
|
@ -165,7 +165,7 @@ int usage_data_rawdemod_p1(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod p1 64 1 0 = demod a psk1 tag from GraphBuffer using a clock of RF/64, inverting data and allowing 0 demod errors");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_rawdemod_p2(void) {
|
||||
static int usage_data_rawdemod_p2(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data rawdemod p2 [clock] <0|1> [maxError]");
|
||||
PrintAndLogEx(NORMAL, " [set clock as integer] optional, if not set, autodetect.");
|
||||
PrintAndLogEx(NORMAL, " <invert>, 1 for invert output");
|
||||
|
@ -178,7 +178,7 @@ int usage_data_rawdemod_p2(void) {
|
|||
PrintAndLogEx(NORMAL, " : data rawdemod p2 64 1 0 = demod a psk2 tag from GraphBuffer using a clock of RF/64, inverting output and allowing 0 demod errors");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_autocorr(void) {
|
||||
static int usage_data_autocorr(void) {
|
||||
PrintAndLogEx(NORMAL, "Autocorrelate is used to detect repeating sequences. We use it as detection of length in bits a message inside the signal is");
|
||||
PrintAndLogEx(NORMAL, "Usage: data autocorr w <window> [g]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -187,7 +187,7 @@ int usage_data_autocorr(void) {
|
|||
PrintAndLogEx(NORMAL, " g save back to GraphBuffer (overwrite)");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_undecimate(void) {
|
||||
static int usage_data_undecimate(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data undec [factor]");
|
||||
PrintAndLogEx(NORMAL, "This function performs un-decimation, by repeating each sample N times");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -196,7 +196,7 @@ int usage_data_undecimate(void) {
|
|||
PrintAndLogEx(NORMAL, "Example: 'data undec 3'");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_detectclock(void) {
|
||||
static int usage_data_detectclock(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data detectclock [modulation] <clock>");
|
||||
PrintAndLogEx(NORMAL, " [modulation as char], specify the modulation type you want to detect the clock of");
|
||||
PrintAndLogEx(NORMAL, " <clock> , specify the clock (optional - to get best start position only)");
|
||||
|
@ -208,24 +208,24 @@ int usage_data_detectclock(void) {
|
|||
PrintAndLogEx(NORMAL, " data detectclock n = detect the clock of an nrz/direct modulated wave in the GraphBuffer");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_hex2bin(void) {
|
||||
static int usage_data_hex2bin(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data hex2bin <hex_digits>");
|
||||
PrintAndLogEx(NORMAL, " This function will ignore all non-hexadecimal characters (but stop reading on whitespace)");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_bin2hex(void) {
|
||||
static int usage_data_bin2hex(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: data bin2hex <binary_digits>");
|
||||
PrintAndLogEx(NORMAL, " This function will ignore all characters not 1 or 0 (but stop reading on whitespace)");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_buffclear(void) {
|
||||
static int usage_data_buffclear(void) {
|
||||
PrintAndLogEx(NORMAL, "This function clears the bigbuff on deviceside");
|
||||
PrintAndLogEx(NORMAL, "Usage: data buffclear [h]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
return 0;
|
||||
}
|
||||
int usage_data_fsktonrz() {
|
||||
static int usage_data_fsktonrz() {
|
||||
PrintAndLogEx(NORMAL, "Usage: data fsktonrz c <clock> l <fc_low> f <fc_high>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_flashmem_spibaud(void) {
|
||||
static int usage_flashmem_spibaud(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: mem spibaud [h] <baudrate>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -40,7 +40,7 @@ int usage_flashmem_spibaud(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_flashmem_read(void) {
|
||||
static int usage_flashmem_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Read flash memory on device");
|
||||
PrintAndLogEx(NORMAL, "Usage: mem read o <offset> l <len>");
|
||||
PrintAndLogEx(NORMAL, " o <offset> : offset in memory");
|
||||
|
@ -51,7 +51,7 @@ int usage_flashmem_read(void) {
|
|||
PrintAndLogEx(NORMAL, " mem read o 1024 l 10"); // read 10 bytes starting at offset 1024
|
||||
return 0;
|
||||
}
|
||||
int usage_flashmem_load(void) {
|
||||
static int usage_flashmem_load(void) {
|
||||
PrintAndLogEx(NORMAL, "Loads binary file into flash memory on device");
|
||||
PrintAndLogEx(NORMAL, "Usage: mem load o <offset> f <file name> m t i");
|
||||
PrintAndLogEx(NORMAL, " o <offset> : offset in memory");
|
||||
|
@ -68,7 +68,7 @@ int usage_flashmem_load(void) {
|
|||
PrintAndLogEx(NORMAL, " mem load f default_iclass_keys i");
|
||||
return 0;
|
||||
}
|
||||
int usage_flashmem_save(void) {
|
||||
static int usage_flashmem_save(void) {
|
||||
PrintAndLogEx(NORMAL, "Saves flash memory on device into the file");
|
||||
PrintAndLogEx(NORMAL, " Usage: mem save o <offset> l <length> f <file name>");
|
||||
PrintAndLogEx(NORMAL, " o <offset> : offset in memory");
|
||||
|
@ -81,7 +81,7 @@ int usage_flashmem_save(void) {
|
|||
PrintAndLogEx(NORMAL, " mem save f myfile o 1024 l 4096"); // downlowd 4096 bytes from offset 1024 to file myfile
|
||||
return 0;
|
||||
}
|
||||
int usage_flashmem_wipe(void) {
|
||||
static int usage_flashmem_wipe(void) {
|
||||
|
||||
PrintAndLogEx(WARNING, "[OBS] use with caution.");
|
||||
PrintAndLogEx(NORMAL, "Wipe flash memory on device, which fills memory with 0xFF\n");
|
||||
|
@ -95,7 +95,7 @@ int usage_flashmem_wipe(void) {
|
|||
PrintAndLogEx(NORMAL, " mem wipe p 0"); // wipes first page.
|
||||
return 0;
|
||||
}
|
||||
int usage_flashmem_info(void) {
|
||||
static int usage_flashmem_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Collect signature and verify it from flash memory\n");
|
||||
PrintAndLogEx(NORMAL, " Usage: mem info [h|s|w]");
|
||||
PrintAndLogEx(NORMAL, " s : create a signature");
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_hf_search() {
|
||||
static int usage_hf_search() {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf search");
|
||||
PrintAndLogEx(NORMAL, "Will try to find a HF read out of the unknown tag. Stops when found.");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -20,7 +20,7 @@ int usage_hf_search() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_sniff() {
|
||||
static int usage_hf_sniff() {
|
||||
PrintAndLogEx(NORMAL, "The high frequence sniffer will assign all available memory on device for sniffed data");
|
||||
PrintAndLogEx(NORMAL, "Use " _YELLOW_("'data samples'")" command to download from device, and " _YELLOW_("'data plot'")" to look at it");
|
||||
PrintAndLogEx(NORMAL, "Press button to quit the sniffing.\n");
|
||||
|
|
|
@ -38,6 +38,4 @@ int CmdHFTune(const char *Cmd);
|
|||
int CmdHFSearch(const char *Cmd);
|
||||
int CmdHFSniff(const char *Cmd);
|
||||
|
||||
int usage_hf_search(void);
|
||||
int usage_hf_sniff(void);
|
||||
#endif
|
||||
|
|
|
@ -153,7 +153,7 @@ const char *getTagInfo(uint8_t uid) {
|
|||
static uint16_t frameLength = 0;
|
||||
uint16_t atsFSC[] = {16, 24, 32, 40, 48, 64, 96, 128, 256};
|
||||
|
||||
int usage_hf_14a_sim(void) {
|
||||
static int usage_hf_14a_sim(void) {
|
||||
// PrintAndLogEx(NORMAL, "\n Emulating ISO/IEC 14443 type A tag with 4,7 or 10 byte UID\n");
|
||||
PrintAndLogEx(NORMAL, "\n Emulating ISO/IEC 14443 type A tag with 4,7 byte UID\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14a sim [h] t <type> u <uid> [x] [e] [v]");
|
||||
|
@ -180,7 +180,7 @@ int usage_hf_14a_sim(void) {
|
|||
// PrintAndLogEx(NORMAL, " hf 14a sim t 1 u 11223445566778899AA\n");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14a_sniff(void) {
|
||||
static int usage_hf_14a_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "It get data from the field and saves it into command buffer.");
|
||||
PrintAndLogEx(NORMAL, "Buffer accessible from command 'hf list 14a'");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14a sniff [c][r]");
|
||||
|
@ -190,7 +190,7 @@ int usage_hf_14a_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14a sniff c r");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14a_raw(void) {
|
||||
static int usage_hf_14a_raw(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14a raw [-h] [-r] [-c] [-p] [-a] [-T] [-t] <milliseconds> [-b] <number of bits> <0A 0B 0C ... hex>");
|
||||
PrintAndLogEx(NORMAL, " -h this help");
|
||||
PrintAndLogEx(NORMAL, " -r do not read response");
|
||||
|
@ -204,7 +204,7 @@ int usage_hf_14a_raw(void) {
|
|||
PrintAndLogEx(NORMAL, " -3 ISO14443-3 select only (skip RATS)");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14a_reader(void) {
|
||||
static int usage_hf_14a_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14a reader [k|s|x] [3]");
|
||||
PrintAndLogEx(NORMAL, " k keep the field active after command executed");
|
||||
PrintAndLogEx(NORMAL, " s silent (no messages)");
|
||||
|
@ -212,7 +212,7 @@ int usage_hf_14a_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " 3 ISO14443-3 select only (skip RATS)");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14a_info(void) {
|
||||
static int usage_hf_14a_info(void) {
|
||||
PrintAndLogEx(NORMAL, "This command makes more extensive tests against a ISO14443a tag in order to collect information");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14a info [h|s]");
|
||||
PrintAndLogEx(NORMAL, " s silent (no messages)");
|
||||
|
|
|
@ -53,8 +53,4 @@ 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);
|
||||
|
||||
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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#define TIMEOUT 2000
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_hf_14b_info(void) {
|
||||
static int usage_hf_14b_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b info [h] [s]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -23,7 +23,7 @@ int usage_hf_14b_info(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b info");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_reader(void) {
|
||||
static int usage_hf_14b_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b reader [h] [s]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -32,7 +32,7 @@ int usage_hf_14b_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b reader");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_raw(void) {
|
||||
static int usage_hf_14b_raw(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b raw [-h] [-r] [-c] [-p] [-s / -ss] [-t] <0A 0B 0C ... hex>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " -h this help");
|
||||
|
@ -46,7 +46,7 @@ int usage_hf_14b_raw(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b raw -s -c -p 0200a40400");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_sniff(void) {
|
||||
static int usage_hf_14b_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "It get data from the field and saves it into command buffer.");
|
||||
PrintAndLogEx(NORMAL, "Buffer accessible from command 'hf list 14b'");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b sniff [h]");
|
||||
|
@ -56,7 +56,7 @@ int usage_hf_14b_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b sniff");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_sim(void) {
|
||||
static int usage_hf_14b_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Emulating ISO/IEC 14443 type B tag with 4 UID / PUPI");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b sim [h] u <uid>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -67,7 +67,7 @@ int usage_hf_14b_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b sim u 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_read_srx(void) {
|
||||
static int usage_hf_14b_read_srx(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b sriread [h] <1|2>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -77,7 +77,7 @@ int usage_hf_14b_read_srx(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b sriread 2");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_write_srx(void) {
|
||||
static int usage_hf_14b_write_srx(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 14b [h] sriwrite <1|2> <BLOCK> <DATA>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -91,7 +91,7 @@ int usage_hf_14b_write_srx(void) {
|
|||
PrintAndLogEx(NORMAL, " hf 14b sriwrite 2 FF 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_14b_dump(void) {
|
||||
static int usage_hf_14b_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "This command dumps the contents of a ISO-14443-B tag and save it to file\n"
|
||||
"\n"
|
||||
"Usage: hf 14b dump [h] [card memory] <f filname> \n"
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
#include "mifare.h" // structs/enum for ISO14B
|
||||
#include "protocols.h" // definitions of ISO14B protocol
|
||||
|
||||
int usage_hf_14b_info(void);
|
||||
int usage_hf_14b_reader(void);
|
||||
int usage_hf_14b_raw(void);
|
||||
int usage_hf_14b_sniff(void);
|
||||
int usage_hf_14b_sim(void);
|
||||
int usage_hf_14b_read_srx(void);
|
||||
int usage_hf_14b_write_srx(void);
|
||||
|
||||
int CmdHF14B(const char *Cmd);
|
||||
int CmdHF14BList(const char *Cmd);
|
||||
int CmdHF14BInfo(const char *Cmd);
|
||||
|
|
|
@ -284,17 +284,17 @@ static const char *TagErrorStr(uint8_t error) {
|
|||
}
|
||||
}
|
||||
|
||||
int usage_15_demod(void) {
|
||||
static int usage_15_demod(void) {
|
||||
PrintAndLogEx(NORMAL, "Tries to demodulate / decode ISO15693, from downloaded samples.\n"
|
||||
"Gather samples with 'hf 15 read' / 'hf 15 record'");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_samples(void) {
|
||||
static int usage_15_samples(void) {
|
||||
PrintAndLogEx(NORMAL, "Acquire samples as Reader (enables carrier, send inquiry\n"
|
||||
"and download it to graphbuffer. Try 'hf 15 demod' to try to demodulate/decode signal");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_info(void) {
|
||||
static int usage_15_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Uses the optional command 'get_systeminfo' 0x2B to try and extract information\n"
|
||||
"command may fail, depending on tag.\n"
|
||||
"defaults to '1 out of 4' mode\n"
|
||||
|
@ -310,11 +310,11 @@ int usage_15_info(void) {
|
|||
"\thf 15 info u");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_record(void) {
|
||||
static int usage_15_record(void) {
|
||||
PrintAndLogEx(NORMAL, "Record activity without enableing carrier");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_reader(void) {
|
||||
static int usage_15_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "This command identifies a ISO 15693 tag\n"
|
||||
"\n"
|
||||
"Usage: hf 15 reader [h]\n"
|
||||
|
@ -325,18 +325,18 @@ int usage_15_reader(void) {
|
|||
"\thf 15 reader");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_sim(void) {
|
||||
static int usage_15_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 15 sim <UID>\n"
|
||||
"\n"
|
||||
"Example:\n"
|
||||
"\thf 15 sim E016240000000000");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_findafi(void) {
|
||||
static int usage_15_findafi(void) {
|
||||
PrintAndLogEx(NORMAL, "'hf 15 finafi' This command needs a helptext. Feel free to add one!");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_dump(void) {
|
||||
static int usage_15_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "This command dumps the contents of a ISO-15693 tag and save it to file\n"
|
||||
"\n"
|
||||
"Usage: hf 15 dump [h] <f filname> \n"
|
||||
|
@ -349,7 +349,7 @@ int usage_15_dump(void) {
|
|||
"\thf 15 dump f mydump");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_restore(void) {
|
||||
static int usage_15_restore(void) {
|
||||
const char *options[][2] = {
|
||||
{"h", "this help"},
|
||||
{"-2", "use slower '1 out of 256' mode"},
|
||||
|
@ -363,7 +363,7 @@ int usage_15_restore(void) {
|
|||
PrintAndLogOptions(options, 7, 3);
|
||||
return 0;
|
||||
}
|
||||
int usage_15_raw(void) {
|
||||
static int usage_15_raw(void) {
|
||||
const char *options[][2] = {
|
||||
{"-r", "do not read response" },
|
||||
{"-2", "use slower '1 out of 256' mode" },
|
||||
|
@ -374,7 +374,7 @@ int usage_15_raw(void) {
|
|||
PrintAndLogOptions(options, 4, 3);
|
||||
return 0;
|
||||
}
|
||||
int usage_15_read(void) {
|
||||
static int usage_15_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 15 read [options] <uid|s|u|*> <page#>\n"
|
||||
"Options:\n"
|
||||
"\t-2 use slower '1 out of 256' mode\n"
|
||||
|
@ -385,7 +385,7 @@ int usage_15_read(void) {
|
|||
"\tpage#: page number 0-255");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_write(void) {
|
||||
static int usage_15_write(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 15 write [options] <uid|s|u|*> <page#> <hexdata>\n"
|
||||
"Options:\n"
|
||||
"\t-2 use slower '1 out of 256' mode\n"
|
||||
|
@ -398,7 +398,7 @@ int usage_15_write(void) {
|
|||
"\thexdata: data to be written eg AA BB CC DD");
|
||||
return 0;
|
||||
}
|
||||
int usage_15_readmulti(void) {
|
||||
static int usage_15_readmulti(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf 15 readmulti [options] <uid|s|u|*> <start#> <count#>\n"
|
||||
"Options:\n"
|
||||
"\t-2 use slower '1 out of 256' mode\n"
|
||||
|
|
|
@ -45,21 +45,5 @@ int CmdHF15Write(const char *Cmd);
|
|||
|
||||
int CmdHF15Help(const char *Cmd);
|
||||
|
||||
// usages
|
||||
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);
|
||||
|
||||
int usage_15_read(void);
|
||||
int usage_15_write(void);
|
||||
int usage_15_readmulti(void);
|
||||
|
||||
int prepareHF15Cmd(char **cmd, UsbCommand *c, uint8_t iso15cmd);
|
||||
#endif
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_hf_felica_sim(void) {
|
||||
static int usage_hf_felica_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "\n Emulating ISO/18092 FeliCa tag \n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf felica sim [h] t <type> [v]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -23,7 +23,7 @@ int usage_hf_felica_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " hf felica sim t 1 ");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_felica_sniff(void) {
|
||||
static int usage_hf_felica_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "It get data from the field and saves it into command buffer.");
|
||||
PrintAndLogEx(NORMAL, "Buffer accessible from command 'hf list felica'");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf felica sniff <s > <t>");
|
||||
|
@ -33,7 +33,7 @@ int usage_hf_felica_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " hf felica sniff s 1000");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_felica_simlite(void) {
|
||||
static int usage_hf_felica_simlite(void) {
|
||||
PrintAndLogEx(NORMAL, "\n Emulating ISO/18092 FeliCa Lite tag \n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf felica litesim [h] u <uid>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -43,7 +43,7 @@ int usage_hf_felica_simlite(void) {
|
|||
PrintAndLogEx(NORMAL, " hf felica litesim 11223344556677");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_felica_dumplite(void) {
|
||||
static int usage_hf_felica_dumplite(void) {
|
||||
PrintAndLogEx(NORMAL, "\n Dump ISO/18092 FeliCa Lite tag \n");
|
||||
PrintAndLogEx(NORMAL, "press button to abort run, otherwise it will loop for 200sec.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf felica litedump [h]");
|
||||
|
@ -53,7 +53,7 @@ int usage_hf_felica_dumplite(void) {
|
|||
PrintAndLogEx(NORMAL, " hf felica litedump");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_felica_raw(void) {
|
||||
static int usage_hf_felica_raw(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf felica raw [-h] [-r] [-c] [-p] [-a] <0A 0B 0C ... hex>");
|
||||
PrintAndLogEx(NORMAL, " -h this help");
|
||||
PrintAndLogEx(NORMAL, " -r do not read response");
|
||||
|
|
|
@ -32,10 +32,6 @@ int CmdHFFelicaSim(const char *Cmd);
|
|||
int CmdHFFelicaSniff(const char *Cmd);
|
||||
int CmdHFFelicaCmdRaw(const char *Cmd);
|
||||
|
||||
int usage_hf_felica_sim(void);
|
||||
int usage_hf_felica_sniff(void);
|
||||
int usage_hf_fFelica_raw(void);
|
||||
|
||||
void waitCmdFelica(uint8_t iSelect);
|
||||
|
||||
//temp
|
||||
|
|
|
@ -29,7 +29,7 @@ static uint8_t iClass_Key_Table[ICLASS_KEYS_MAX][8] = {
|
|||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||
};
|
||||
|
||||
int usage_hf_iclass_sim(void) {
|
||||
static int usage_hf_iclass_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass sim <option> [CSN]");
|
||||
PrintAndLogEx(NORMAL, " options");
|
||||
PrintAndLogEx(NORMAL, " 0 <CSN> simulate the given CSN");
|
||||
|
@ -45,14 +45,14 @@ int usage_hf_iclass_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass sim 4");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_eload(void) {
|
||||
static int usage_hf_iclass_eload(void) {
|
||||
PrintAndLogEx(NORMAL, "Loads iclass tag-dump into emulator memory on device");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass eload f <filename>");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf iclass eload f iclass_tagdump-aa162d30f8ff12f1.bin");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_decrypt(void) {
|
||||
static int usage_hf_iclass_decrypt(void) {
|
||||
PrintAndLogEx(NORMAL, "This is simple implementation, it tries to decrypt every block after block 6.");
|
||||
PrintAndLogEx(NORMAL, "Correct behaviour would be to decrypt only the application areas where the key is valid,");
|
||||
PrintAndLogEx(NORMAL, "which is defined by the configuration block.");
|
||||
|
@ -65,7 +65,7 @@ int usage_hf_iclass_decrypt(void) {
|
|||
PrintAndLogEx(NORMAL, "S hf iclass decrypt f tagdump_12312342343.bin");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_encrypt(void) {
|
||||
static int usage_hf_iclass_encrypt(void) {
|
||||
PrintAndLogEx(NORMAL, "OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside");
|
||||
PrintAndLogEx(NORMAL, "in the working directory. The file should be 16 bytes binary data");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -76,7 +76,7 @@ int usage_hf_iclass_encrypt(void) {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_dump(void) {
|
||||
static int usage_hf_iclass_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass dump f <fileName> k <key> c <creditkey> [e|r|v]\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " f <filename> : specify a filename to save dump to");
|
||||
|
@ -92,7 +92,7 @@ int usage_hf_iclass_dump(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass dump k AAAAAAAAAAAAAAAA e");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_clone(void) {
|
||||
static int usage_hf_iclass_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass clone f <tagfile.bin> b <first block> l <last block> k <KEY> c e|r");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " f <filename>: specify a filename to clone from");
|
||||
|
@ -108,7 +108,7 @@ int usage_hf_iclass_clone(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass clone f iclass_tagdump-121345.bin b 06 l 19 k 0 e");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_writeblock(void) {
|
||||
static int usage_hf_iclass_writeblock(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass writeblk b <block> d <data> k <key> [c|e|r|v]\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <Block> : The block number as 2 hex symbols");
|
||||
|
@ -123,7 +123,7 @@ int usage_hf_iclass_writeblock(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass writeblk b 1B d AAAAAAAAAAAAAAAA k 001122334455667B c");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_readblock(void) {
|
||||
static int usage_hf_iclass_readblock(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass readblk b <block> k <key> [c|e|r|v]\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <block> : The block number as 2 hex symbols");
|
||||
|
@ -138,11 +138,11 @@ int usage_hf_iclass_readblock(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass readblk b 0A k 0");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_readtagfile() {
|
||||
static int usage_hf_iclass_readtagfile() {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass readtagfile <filename> [startblock] [endblock]");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_calc_newkey(void) {
|
||||
static int usage_hf_iclass_calc_newkey(void) {
|
||||
PrintAndLogEx(NORMAL, "Calculate new key for updating\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass calc_newkey o <Old key> n <New key> s [csn] e");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -158,7 +158,7 @@ int usage_hf_iclass_calc_newkey(void) {
|
|||
PrintAndLogEx(NORMAL, "\nNOTE: * = required\n");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_managekeys(void) {
|
||||
static int usage_hf_iclass_managekeys(void) {
|
||||
PrintAndLogEx(NORMAL, "HELP : Manage iClass Keys in client memory:\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass managekeys n [keynbr] k [key] f [filename] s l p\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -175,7 +175,7 @@ int usage_hf_iclass_managekeys(void) {
|
|||
PrintAndLogEx(NORMAL, " print keys : hf iclass managekeys p\n");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_reader(void) {
|
||||
static int usage_hf_iclass_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Act as a Iclass reader. Look for iClass tags until a key or the pm3 button is pressed\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass reader [h] [1]\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -185,7 +185,7 @@ int usage_hf_iclass_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass reader 1");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_replay(void) {
|
||||
static int usage_hf_iclass_replay(void) {
|
||||
PrintAndLogEx(NORMAL, "Replay a collected mac message");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass replay [h] <mac>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -195,14 +195,14 @@ int usage_hf_iclass_replay(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass replay 00112233");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_sniff(void) {
|
||||
static int usage_hf_iclass_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "Sniff the communication between reader and tag");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass sniff [h]");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf iclass sniff");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_loclass(void) {
|
||||
static int usage_hf_iclass_loclass(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass loclass [options]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, "h Show this help");
|
||||
|
@ -217,7 +217,7 @@ int usage_hf_iclass_loclass(void) {
|
|||
PrintAndLogEx(NORMAL, " ... totalling N*24 bytes");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_chk(void) {
|
||||
static int usage_hf_iclass_chk(void) {
|
||||
PrintAndLogEx(NORMAL, "Checkkeys loads a dictionary text file with 8byte hex keys to test authenticating against a iClass tag");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass chk [h|e|r] [f (*.dic)]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -231,7 +231,7 @@ int usage_hf_iclass_chk(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass chk f default_iclass_keys.dic e");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_lookup(void) {
|
||||
static int usage_hf_iclass_lookup(void) {
|
||||
PrintAndLogEx(NORMAL, "Lookup keys takes some sniffed trace data and tries to verify what key was used against a dictionary file");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass lookup [h|e|r] [f (*.dic)] [u <csn>] [p <epurse>] [m <macs>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -247,7 +247,7 @@ int usage_hf_iclass_lookup(void) {
|
|||
PrintAndLogEx(NORMAL, " hf iclass lookup u 9655a400f8ff12e0 p f0ffffffffffffff m 0000000089cb984b f default_iclass_keys.dic e");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf_iclass_permutekey(void) {
|
||||
static int usage_hf_iclass_permutekey(void) {
|
||||
PrintAndLogEx(NORMAL, "Permute function from 'heart of darkness' paper.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf iclass permute [h] <r|f> <bytes>");
|
||||
|
|
|
@ -13,7 +13,7 @@ static int CmdHelp(const char *Cmd);
|
|||
|
||||
#define MAX_LENGTH 1024
|
||||
|
||||
int usage_legic_calccrc(void) {
|
||||
static int usage_legic_calccrc(void) {
|
||||
PrintAndLogEx(NORMAL, "Calculates the legic crc8/crc16 on the given data.");
|
||||
PrintAndLogEx(NORMAL, "There must be an even number of hexsymbols as input.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic crc [h] d <data> u <uidcrc> c <8|16>");
|
||||
|
@ -28,7 +28,7 @@ int usage_legic_calccrc(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic crc d deadbeef1122 u 9A c 16");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_rdmem(void) {
|
||||
static int usage_legic_rdmem(void) {
|
||||
PrintAndLogEx(NORMAL, "Read data from a legic tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic rdmem [h] <offset> <length> <IV>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -43,7 +43,7 @@ int usage_legic_rdmem(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic rdmem 0 100 55 - reads 0x100 bytes with IV 0x55");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_sim(void) {
|
||||
static int usage_legic_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Simulates a LEGIC Prime tag. MIM22, MIM256, MIM1024 types can be emulated");
|
||||
PrintAndLogEx(NORMAL, "Use ELOAD/ESAVE to upload a dump into emulator memory");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic sim [h] <tagtype>");
|
||||
|
@ -57,7 +57,7 @@ int usage_legic_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic sim 2");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_write(void) {
|
||||
static int usage_legic_write(void) {
|
||||
PrintAndLogEx(NORMAL, "Write data to a LEGIC Prime tag. It autodetects tagsize to make sure size");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic write [h] o <offset> d <data (hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -70,7 +70,7 @@ int usage_legic_write(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic write o 10 d 11223344 - Write 0x11223344 starting from offset 0x10");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_reader(void) {
|
||||
static int usage_legic_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Read UID and type information from a legic tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic reader [h]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -80,7 +80,7 @@ int usage_legic_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic reader");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_info(void) {
|
||||
static int usage_legic_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Reads information from a legic prime tag.");
|
||||
PrintAndLogEx(NORMAL, "Shows systemarea, user areas etc");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic info [h]");
|
||||
|
@ -91,7 +91,7 @@ int usage_legic_info(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic info");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_dump(void) {
|
||||
static int usage_legic_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Reads all pages from LEGIC Prime MIM22, MIM256, MIM1024");
|
||||
PrintAndLogEx(NORMAL, "and saves binary dump into the file `filename.bin` or `cardUID.bin`");
|
||||
PrintAndLogEx(NORMAL, "It autodetects card type.\n");
|
||||
|
@ -105,7 +105,7 @@ int usage_legic_dump(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic dump o myfile");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_restore(void) {
|
||||
static int usage_legic_restore(void) {
|
||||
PrintAndLogEx(NORMAL, "Reads binary file and it autodetects card type and verifies that the file has the same size");
|
||||
PrintAndLogEx(NORMAL, "Then write the data back to card. All bytes except the first 7bytes [UID(4) MCC(1) DCF(2)]\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic restore [h] i <filename w/o .bin>");
|
||||
|
@ -117,7 +117,7 @@ int usage_legic_restore(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic restore i myfile");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_eload(void) {
|
||||
static int usage_legic_eload(void) {
|
||||
PrintAndLogEx(NORMAL, "It loads binary dump from the file `filename.bin`");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf legic eload [h] [card memory] <file name w/o `.bin`>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -131,7 +131,7 @@ int usage_legic_eload(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic eload 2 myfile");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_esave(void) {
|
||||
static int usage_legic_esave(void) {
|
||||
PrintAndLogEx(NORMAL, "It saves binary dump into the file `filename.bin` or `cardID.bin`");
|
||||
PrintAndLogEx(NORMAL, " Usage: hf legic esave [h] [card memory] [file name w/o `.bin`]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -145,7 +145,7 @@ int usage_legic_esave(void) {
|
|||
PrintAndLogEx(NORMAL, " hf legic esave 2 myfile");
|
||||
return 0;
|
||||
}
|
||||
int usage_legic_wipe(void) {
|
||||
static int usage_legic_wipe(void) {
|
||||
PrintAndLogEx(NORMAL, "Fills a legic tag memory with zeros. From byte7 and to the end.");
|
||||
PrintAndLogEx(NORMAL, " Usage: hf legic wipe [h]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
|
|
@ -47,14 +47,4 @@ void legic_chk_iv(uint32_t *iv);
|
|||
void legic_seteml(uint8_t *src, uint32_t offset, uint32_t numofbytes);
|
||||
int legic_read_mem(uint32_t offset, uint32_t len, uint32_t iv, uint8_t *out, uint16_t *outlen);
|
||||
|
||||
int usage_legic_calccrc(void);
|
||||
int usage_legic_load(void);
|
||||
int usage_legic_rdmem(void);
|
||||
int usage_legic_sim(void);
|
||||
int usage_legic_write(void);
|
||||
int usage_legic_reader(void);
|
||||
int usage_legic_info(void);
|
||||
int usage_legic_dump(void);
|
||||
int usage_legic_restore(void);
|
||||
int usage_legic_wipe(void);
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_hf14_ice(void) {
|
||||
static int usage_hf14_ice(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf ice [l] <limit> [f] <name>");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
PrintAndLogEx(NORMAL, " l <limit> nonces to be collected");
|
||||
|
@ -40,7 +40,7 @@ int usage_hf14_ice(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf14_dump(void) {
|
||||
static int usage_hf14_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf dump [card memory] k <name> f <name>");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
|
||||
PrintAndLogEx(NORMAL, " k <name> : key filename, if no <name> given, UID will be used as filename");
|
||||
|
@ -52,7 +52,7 @@ int usage_hf14_dump(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf14_mifare(void) {
|
||||
static int usage_hf14_mifare(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf darkside [h] <block number> <A|B>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -64,7 +64,7 @@ int usage_hf14_mifare(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf darkside 16 B");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_mf1ksim(void) {
|
||||
static int usage_hf14_mf1ksim(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf sim [h] u <uid> n <numreads> [i] [x] [e] [v]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -85,7 +85,7 @@ int usage_hf14_mf1ksim(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf sim u 11223344 i x");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_dbg(void) {
|
||||
static int usage_hf14_dbg(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf dbg [h] <debug level>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -100,7 +100,7 @@ int usage_hf14_dbg(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf dbg 3");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_sniff(void) {
|
||||
static int usage_hf14_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "It continuously gets data from the field and saves it to: log, emulator, emulator file.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf sniff [h] [l] [d] [f]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -113,7 +113,7 @@ int usage_hf14_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf sniff l d f");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_nested(void) {
|
||||
static int usage_hf14_nested(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage:");
|
||||
PrintAndLogEx(NORMAL, " all sectors: hf mf nested <card memory> <block number> <key A/B> <key (12 hex symbols)> [t,d]");
|
||||
PrintAndLogEx(NORMAL, " one sector: hf mf nested o <block number> <key A/B> <key (12 hex symbols)>");
|
||||
|
@ -131,7 +131,7 @@ int usage_hf14_nested(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf nested o 0 A FFFFFFFFFFFF 4 A");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_hardnested(void) {
|
||||
static int usage_hf14_hardnested(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage:");
|
||||
PrintAndLogEx(NORMAL, " hf mf hardnested <block number> <key A|B> <key (12 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, " <target block number> <target key A|B> [known target key (12 hex symbols)] [w] [s]");
|
||||
|
@ -164,7 +164,7 @@ int usage_hf14_hardnested(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf hardnested 0 A A0A1A2A3A4A5 4 A FFFFFFFFFFFF");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_chk(void) {
|
||||
static int usage_hf14_chk(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf chk [h] <block number>|<*card memory> <key type (A/B/?)> [t|d] [<key (12 hex symbols)>] [<dic (*.dic)>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h this help");
|
||||
|
@ -182,7 +182,7 @@ int usage_hf14_chk(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf chk *1 ? d -- target all blocks, all keys, 1K, write to file");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_chk_fast(void) {
|
||||
static int usage_hf14_chk_fast(void) {
|
||||
PrintAndLogEx(NORMAL, "This is a improved checkkeys method speedwise. It checks Mifare Classic tags sector keys against a dictionary file with keys");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf fchk [h] <card memory> [t|d|f] [<key (12 hex symbols)>] [<dic (*.dic)>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -205,7 +205,7 @@ int usage_hf14_chk_fast(void) {
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_keybrute(void) {
|
||||
static int usage_hf14_keybrute(void) {
|
||||
PrintAndLogEx(NORMAL, "J_Run's 2nd phase of multiple sector nested authentication key recovery");
|
||||
PrintAndLogEx(NORMAL, "You have a known 4 last bytes of a key recovered with mf_nonce_brute tool.");
|
||||
PrintAndLogEx(NORMAL, "First 2 bytes of key will be bruteforced");
|
||||
|
@ -222,7 +222,7 @@ int usage_hf14_keybrute(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf keybrute 1 A 000011223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_restore(void) {
|
||||
static int usage_hf14_restore(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf restore [card memory] u <UID> k <name> f <name>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
|
||||
|
@ -237,7 +237,7 @@ int usage_hf14_restore(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf restore 4 -- read the UID from tag with 4K memory first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_decryptbytes(void) {
|
||||
static int usage_hf14_decryptbytes(void) {
|
||||
PrintAndLogEx(NORMAL, "Decrypt Crypto-1 encrypted bytes given some known state of crypto. See tracelog to gather needed values\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf decrypt [h] <nt> <ar_enc> <at_enc> <data>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -252,24 +252,24 @@ int usage_hf14_decryptbytes(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf14_eget(void) {
|
||||
static int usage_hf14_eget(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf eget <block number>");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mf eget 0 ");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_eclr(void) {
|
||||
static int usage_hf14_eclr(void) {
|
||||
PrintAndLogEx(NORMAL, "It set card emulator memory to empty data blocks and key A/B FFFFFFFFFFFF \n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf eclr");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_eset(void) {
|
||||
static int usage_hf14_eset(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf eset <block number> <block data (32 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mf eset 1 000102030405060708090a0b0c0d0e0f ");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_eload(void) {
|
||||
static int usage_hf14_eload(void) {
|
||||
PrintAndLogEx(NORMAL, "It loads emul dump from the file `filename.eml`");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf eload [card memory] <file name w/o `.eml`> [numblocks]");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K, u = UL");
|
||||
|
@ -279,7 +279,7 @@ int usage_hf14_eload(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf eload 4 filename");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_esave(void) {
|
||||
static int usage_hf14_esave(void) {
|
||||
PrintAndLogEx(NORMAL, "It saves emul dump into the file `filename.eml` or `cardID.eml`");
|
||||
PrintAndLogEx(NORMAL, " Usage: hf mf esave [card memory] [file name w/o `.eml`]");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
|
||||
|
@ -290,7 +290,7 @@ int usage_hf14_esave(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf esave 4 filename");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_ecfill(void) {
|
||||
static int usage_hf14_ecfill(void) {
|
||||
PrintAndLogEx(NORMAL, "Read card and transfer its data to emulator memory.");
|
||||
PrintAndLogEx(NORMAL, "Keys must be laid in the emulator memory. \n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf ecfill <key A/B> [card memory]");
|
||||
|
@ -301,7 +301,7 @@ int usage_hf14_ecfill(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf ecfill A 4");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_ekeyprn(void) {
|
||||
static int usage_hf14_ekeyprn(void) {
|
||||
PrintAndLogEx(NORMAL, "It prints the keys loaded in the emulator memory");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf ekeyprn [card memory]");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
|
||||
|
@ -311,7 +311,7 @@ int usage_hf14_ekeyprn(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf14_csetuid(void) {
|
||||
static int usage_hf14_csetuid(void) {
|
||||
PrintAndLogEx(NORMAL, "Set UID, ATQA, and SAK for magic Chinese card. Only works with magic cards");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf csetuid [h] <UID 8 hex symbols> [ATQA 4 hex symbols] [SAK 2 hex symbols] [w]");
|
||||
|
@ -326,7 +326,7 @@ int usage_hf14_csetuid(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf csetuid 01020304 0004 08 w");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_csetblk(void) {
|
||||
static int usage_hf14_csetblk(void) {
|
||||
PrintAndLogEx(NORMAL, "Set block data for magic Chinese card. Only works with magic cards");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf csetblk [h] <block number> <block data (32 hex symbols)> [w]");
|
||||
|
@ -340,7 +340,7 @@ int usage_hf14_csetblk(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf csetblk 1 01020304050607080910111213141516 w");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_cload(void) {
|
||||
static int usage_hf14_cload(void) {
|
||||
PrintAndLogEx(NORMAL, "It loads magic Chinese card from the file `filename.eml`");
|
||||
PrintAndLogEx(NORMAL, "or from emulator memory");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -356,7 +356,7 @@ int usage_hf14_cload(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf cload e");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_cgetblk(void) {
|
||||
static int usage_hf14_cgetblk(void) {
|
||||
PrintAndLogEx(NORMAL, "Get block data from magic Chinese card. Only works with magic cards\n");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf cgetblk [h] <block number>");
|
||||
|
@ -367,7 +367,7 @@ int usage_hf14_cgetblk(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf cgetblk 1");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_cgetsc(void) {
|
||||
static int usage_hf14_cgetsc(void) {
|
||||
PrintAndLogEx(NORMAL, "Get sector data from magic Chinese card. Only works with magic cards\n");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf cgetsc [h] <sector number>");
|
||||
|
@ -378,7 +378,7 @@ int usage_hf14_cgetsc(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf cgetsc 0");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_csave(void) {
|
||||
static int usage_hf14_csave(void) {
|
||||
PrintAndLogEx(NORMAL, "It saves `magic Chinese` card dump into the file `filename.eml` or `cardID.eml`");
|
||||
PrintAndLogEx(NORMAL, "or into emulator memory");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -396,7 +396,7 @@ int usage_hf14_csave(void) {
|
|||
PrintAndLogEx(NORMAL, " hf mf csave 4 o filename");
|
||||
return 0;
|
||||
}
|
||||
int usage_hf14_nack(void) {
|
||||
static int usage_hf14_nack(void) {
|
||||
PrintAndLogEx(NORMAL, "Test a mifare classic based card for the NACK bug.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mf nack [h] [v]");
|
||||
|
|
|
@ -26,6 +26,189 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
static int usage_hf_mfu_info(void) {
|
||||
PrintAndLogEx(NORMAL, "It gathers information about the tag and tries to detect what kind it is.");
|
||||
PrintAndLogEx(NORMAL, "Sometimes the tags are locked down, and you may need a key to be able to read the information");
|
||||
PrintAndLogEx(NORMAL, "The following tags can be identified:\n");
|
||||
PrintAndLogEx(NORMAL, "Ultralight, Ultralight-C, Ultralight EV1, NTAG 203, NTAG 210,");
|
||||
PrintAndLogEx(NORMAL, "NTAG 212, NTAG 213, NTAG 215, NTAG 216, NTAG I2C 1K & 2K");
|
||||
PrintAndLogEx(NORMAL, "my-d, my-d NFC, my-d move, my-d move NFC\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu info k <key> l");
|
||||
PrintAndLogEx(NORMAL, " Options : ");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info k AABBCCDD");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Reads all pages from Ultralight, Ultralight-C, Ultralight EV1");
|
||||
PrintAndLogEx(NORMAL, "NTAG 203, NTAG 210, NTAG 212, NTAG 213, NTAG 215, NTAG 216");
|
||||
PrintAndLogEx(NORMAL, "and saves binary dump into the file `filename.bin` or `cardUID.bin`");
|
||||
PrintAndLogEx(NORMAL, "It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu dump k <key> l f <filename w/o .bin> p <page#> q <#pages>");
|
||||
PrintAndLogEx(NORMAL, " Options :");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, " f <FN > : filename w/o .bin to save the dump as");
|
||||
PrintAndLogEx(NORMAL, " p <Pg > : starting Page number to manually set a page to start the dump at");
|
||||
PrintAndLogEx(NORMAL, " q <qty> : number of Pages to manually set how many pages to dump");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump n myfile");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_restore(void) {
|
||||
PrintAndLogEx(NORMAL, "Restore dumpfile onto card.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu restore [h] [l] [s] k <key> n <filename w/o .bin> ");
|
||||
PrintAndLogEx(NORMAL, " Options :");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, " s : (optional) enable special write UID -MAGIC TAG ONLY-");
|
||||
PrintAndLogEx(NORMAL, " e : (optional) enable special write version/signature -MAGIC NTAG 21* ONLY-");
|
||||
PrintAndLogEx(NORMAL, " r : (optional) use the password found in dumpfile to configure tag. requires 'e' parameter to work");
|
||||
PrintAndLogEx(NORMAL, " f <FN> : filename w/o .bin to restore");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore s f myfile");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s f myfile\n");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s e r f myfile\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_rdbl(void) {
|
||||
PrintAndLogEx(NORMAL, "Read a block and print. It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu rdbl b <block number> k <key> l\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <no> : block to read");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_wrbl(void) {
|
||||
PrintAndLogEx(NORMAL, "Write a block. It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu wrbl b <block number> d <data> k <key> l\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <no> : block to write");
|
||||
PrintAndLogEx(NORMAL, " d <data> : block data - (8 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567");
|
||||
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567 k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_eload(void) {
|
||||
PrintAndLogEx(NORMAL, "It loads emul dump from the file `filename.eml`");
|
||||
PrintAndLogEx(NORMAL, "Hint: See script dumptoemul-mfu.lua to convert the .bin to the eml");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu eload u <file name w/o `.eml`> [numblocks]");
|
||||
PrintAndLogEx(NORMAL, " Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " u : UL (required)");
|
||||
PrintAndLogEx(NORMAL, " [filename] : without `.eml` (required)");
|
||||
PrintAndLogEx(NORMAL, " numblocks : number of blocks to load from eml file (optional)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, " sample: hf mfu eload u filename");
|
||||
PrintAndLogEx(NORMAL, " hf mfu eload u filename 57");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "\nEmulating Ultralight tag from emulator memory\n");
|
||||
PrintAndLogEx(NORMAL, "\nBe sure to load the emulator memory first!\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu sim t 7 u <uid>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " t 7 : 7 = NTAG or Ultralight sim (required)");
|
||||
PrintAndLogEx(NORMAL, " u <uid> : 4 or 7 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu sim t 7");
|
||||
PrintAndLogEx(NORMAL, " hf mfu sim t 7 u 1122344556677\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_ucauth(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu cauth k <key number>");
|
||||
PrintAndLogEx(NORMAL, " 0 (default): 3DES standard key");
|
||||
PrintAndLogEx(NORMAL, " 1 : all 0x00 key");
|
||||
PrintAndLogEx(NORMAL, " 2 : 0x00-0x0F key");
|
||||
PrintAndLogEx(NORMAL, " 3 : nfc key");
|
||||
PrintAndLogEx(NORMAL, " 4 : all 0x01 key");
|
||||
PrintAndLogEx(NORMAL, " 5 : all 0xff key");
|
||||
PrintAndLogEx(NORMAL, " 6 : 0x00-0xFF key");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu cauth k");
|
||||
PrintAndLogEx(NORMAL, " hf mfu cauth k 3");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_ucsetpwd(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu setpwd <password (32 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, " [password] - (32 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu setpwd 000102030405060708090a0b0c0d0e0f");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_ucsetuid(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu setuid <uid (14 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, " [uid] - (14 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, "\nThis only works for Magic Ultralight tags.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu setuid 11223344556677");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_gendiverse(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu gen [h] [r] <uid (8 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " r : read uid from tag");
|
||||
PrintAndLogEx(NORMAL, " <uid> : 4 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu gen r");
|
||||
PrintAndLogEx(NORMAL, " hf mfu gen 11223344");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usage_hf_mfu_pwdgen(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu pwdgen [h|t] [r] <uid (14 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " t : selftest");
|
||||
PrintAndLogEx(NORMAL, " r : read uid from tag");
|
||||
PrintAndLogEx(NORMAL, " <uid> : 7 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen r");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen 11223344556677");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen t");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define PUBLIC_ECDA_KEYLEN 33
|
||||
uint8_t public_ecda_key[PUBLIC_ECDA_KEYLEN] = {
|
||||
0x04, 0x49, 0x4e, 0x1a, 0x38, 0x6d, 0x3d, 0x3c,
|
||||
|
@ -1426,189 +1609,6 @@ int CmdHF14AMfURdBl(const char *Cmd) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_info(void) {
|
||||
PrintAndLogEx(NORMAL, "It gathers information about the tag and tries to detect what kind it is.");
|
||||
PrintAndLogEx(NORMAL, "Sometimes the tags are locked down, and you may need a key to be able to read the information");
|
||||
PrintAndLogEx(NORMAL, "The following tags can be identified:\n");
|
||||
PrintAndLogEx(NORMAL, "Ultralight, Ultralight-C, Ultralight EV1, NTAG 203, NTAG 210,");
|
||||
PrintAndLogEx(NORMAL, "NTAG 212, NTAG 213, NTAG 215, NTAG 216, NTAG I2C 1K & 2K");
|
||||
PrintAndLogEx(NORMAL, "my-d, my-d NFC, my-d move, my-d move NFC\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu info k <key> l");
|
||||
PrintAndLogEx(NORMAL, " Options : ");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu info k AABBCCDD");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Reads all pages from Ultralight, Ultralight-C, Ultralight EV1");
|
||||
PrintAndLogEx(NORMAL, "NTAG 203, NTAG 210, NTAG 212, NTAG 213, NTAG 215, NTAG 216");
|
||||
PrintAndLogEx(NORMAL, "and saves binary dump into the file `filename.bin` or `cardUID.bin`");
|
||||
PrintAndLogEx(NORMAL, "It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu dump k <key> l f <filename w/o .bin> p <page#> q <#pages>");
|
||||
PrintAndLogEx(NORMAL, " Options :");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, " f <FN > : filename w/o .bin to save the dump as");
|
||||
PrintAndLogEx(NORMAL, " p <Pg > : starting Page number to manually set a page to start the dump at");
|
||||
PrintAndLogEx(NORMAL, " q <qty> : number of Pages to manually set how many pages to dump");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump n myfile");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu dump k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_restore(void) {
|
||||
PrintAndLogEx(NORMAL, "Restore dumpfile onto card.");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu restore [h] [l] [s] k <key> n <filename w/o .bin> ");
|
||||
PrintAndLogEx(NORMAL, " Options :");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, " s : (optional) enable special write UID -MAGIC TAG ONLY-");
|
||||
PrintAndLogEx(NORMAL, " e : (optional) enable special write version/signature -MAGIC NTAG 21* ONLY-");
|
||||
PrintAndLogEx(NORMAL, " r : (optional) use the password found in dumpfile to configure tag. requires 'e' parameter to work");
|
||||
PrintAndLogEx(NORMAL, " f <FN> : filename w/o .bin to restore");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore s f myfile");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s f myfile\n");
|
||||
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s e r f myfile\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_rdbl(void) {
|
||||
PrintAndLogEx(NORMAL, "Read a block and print. It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu rdbl b <block number> k <key> l\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <no> : block to read");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k 00112233445566778899AABBCCDDEEFF");
|
||||
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_wrbl(void) {
|
||||
PrintAndLogEx(NORMAL, "Write a block. It autodetects card type.\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu wrbl b <block number> d <data> k <key> l\n");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <no> : block to write");
|
||||
PrintAndLogEx(NORMAL, " d <data> : block data - (8 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, " k <key> : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]");
|
||||
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567");
|
||||
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567 k AABBCCDD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_eload(void) {
|
||||
PrintAndLogEx(NORMAL, "It loads emul dump from the file `filename.eml`");
|
||||
PrintAndLogEx(NORMAL, "Hint: See script dumptoemul-mfu.lua to convert the .bin to the eml");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu eload u <file name w/o `.eml`> [numblocks]");
|
||||
PrintAndLogEx(NORMAL, " Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " u : UL (required)");
|
||||
PrintAndLogEx(NORMAL, " [filename] : without `.eml` (required)");
|
||||
PrintAndLogEx(NORMAL, " numblocks : number of blocks to load from eml file (optional)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, " sample: hf mfu eload u filename");
|
||||
PrintAndLogEx(NORMAL, " hf mfu eload u filename 57");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "\nEmulating Ultralight tag from emulator memory\n");
|
||||
PrintAndLogEx(NORMAL, "\nBe sure to load the emulator memory first!\n");
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu sim t 7 u <uid>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " t 7 : 7 = NTAG or Ultralight sim (required)");
|
||||
PrintAndLogEx(NORMAL, " u <uid> : 4 or 7 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu sim t 7");
|
||||
PrintAndLogEx(NORMAL, " hf mfu sim t 7 u 1122344556677\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_ucauth(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu cauth k <key number>");
|
||||
PrintAndLogEx(NORMAL, " 0 (default): 3DES standard key");
|
||||
PrintAndLogEx(NORMAL, " 1 : all 0x00 key");
|
||||
PrintAndLogEx(NORMAL, " 2 : 0x00-0x0F key");
|
||||
PrintAndLogEx(NORMAL, " 3 : nfc key");
|
||||
PrintAndLogEx(NORMAL, " 4 : all 0x01 key");
|
||||
PrintAndLogEx(NORMAL, " 5 : all 0xff key");
|
||||
PrintAndLogEx(NORMAL, " 6 : 0x00-0xFF key");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu cauth k");
|
||||
PrintAndLogEx(NORMAL, " hf mfu cauth k 3");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_ucsetpwd(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu setpwd <password (32 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, " [password] - (32 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu setpwd 000102030405060708090a0b0c0d0e0f");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_ucsetuid(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu setuid <uid (14 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, " [uid] - (14 hex symbols)");
|
||||
PrintAndLogEx(NORMAL, "\nThis only works for Magic Ultralight tags.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu setuid 11223344556677");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_gendiverse(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu gen [h] [r] <uid (8 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " r : read uid from tag");
|
||||
PrintAndLogEx(NORMAL, " <uid> : 4 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu gen r");
|
||||
PrintAndLogEx(NORMAL, " hf mfu gen 11223344");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usage_hf_mfu_pwdgen(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: hf mfu pwdgen [h|t] [r] <uid (14 hex symbols)>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " t : selftest");
|
||||
PrintAndLogEx(NORMAL, " r : read uid from tag");
|
||||
PrintAndLogEx(NORMAL, " <uid> : 7 byte UID (optional)");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen r");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen 11223344556677");
|
||||
PrintAndLogEx(NORMAL, " hf mfu pwdgen t");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void printMFUdump(mfu_dump_t *card) {
|
||||
printMFUdumpEx(card, 255, 0);
|
||||
}
|
||||
|
|
|
@ -48,18 +48,6 @@ int ul_print_type(uint32_t tagtype, uint8_t spaces);
|
|||
void printMFUdump(mfu_dump_t *card);
|
||||
void printMFUdumpEx(mfu_dump_t *card, uint16_t pages, uint8_t startpage);
|
||||
|
||||
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);
|
||||
|
||||
uint32_t ul_ev1_pwdgenA(uint8_t *uid);
|
||||
|
|
|
@ -13,7 +13,7 @@ bool g_lf_threshold_set = false;
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_cmdread(void) {
|
||||
static int usage_lf_cmdread(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf cmdread d <delay period> z <zero period> o <one period> c <cmdbytes>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -28,7 +28,7 @@ int usage_lf_cmdread(void) {
|
|||
PrintAndLogEx(NORMAL, " lf cmdread d 80 z 100 o 200 c 11000");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_read(void) {
|
||||
static int usage_lf_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -41,7 +41,7 @@ int usage_lf_read(void) {
|
|||
PrintAndLogEx(NORMAL, " lf read s");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_sniff(void) {
|
||||
static int usage_lf_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "Sniff low frequence signal.");
|
||||
PrintAndLogEx(NORMAL, "Use " _YELLOW_("'lf config'")" to set parameters.");
|
||||
PrintAndLogEx(NORMAL, "Use " _YELLOW_("'data samples'")" command to download from device, and " _YELLOW_("'data plot'")" to look at it");
|
||||
|
@ -51,7 +51,7 @@ int usage_lf_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " h This help");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_config(void) {
|
||||
static int usage_lf_config(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf config [h] [H|<divisor>] [b <bps>] [d <decim>] [a 0|1]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -74,7 +74,7 @@ int usage_lf_config(void) {
|
|||
PrintAndLogEx(NORMAL, " Performs a sniff (no active field)");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_simfsk(void) {
|
||||
static int usage_lf_simfsk(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf simfsk [h] [c <clock>] [H <fcHigh>] [L <fcLow>] [d <hexdata>]");
|
||||
PrintAndLogEx(NORMAL, "there are about four FSK modulations to know of.");
|
||||
PrintAndLogEx(NORMAL, "FSK1 - where fc/8 = high and fc/5 = low");
|
||||
|
@ -99,7 +99,7 @@ int usage_lf_simfsk(void) {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_simask(void) {
|
||||
static int usage_lf_simask(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf simask [c <clock>] [i] [b|m|r] [s] [d <raw hex to sim>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -112,7 +112,7 @@ int usage_lf_simask(void) {
|
|||
PrintAndLogEx(NORMAL, " d <hexdata> Data to sim as hex - omit to sim from DemodBuffer");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_simpsk(void) {
|
||||
static int usage_lf_simpsk(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf simpsk [1|2|3] [c <clock>] [i] [r <carrier>] [d <raw hex to sim>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -125,7 +125,7 @@ int usage_lf_simpsk(void) {
|
|||
PrintAndLogEx(NORMAL, " d <hexdata> Data to sim as hex - omit to sim from DemodBuffer");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_find(void) {
|
||||
static int usage_lf_find(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf search [h] <0|1> [u]");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
|
|
@ -71,12 +71,4 @@ int CmdLFfind(const char *Cmd);
|
|||
|
||||
bool lf_read(bool silent, uint32_t samples);
|
||||
|
||||
// usages helptext
|
||||
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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_awid_read(void) {
|
||||
static int usage_lf_awid_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables AWID compatible reader mode printing details of scanned AWID26 or AWID50 tags.");
|
||||
PrintAndLogEx(NORMAL, "By default, values are printed and logged until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "If the [1] option is provided, reader mode is exited after reading a single AWID card.");
|
||||
|
@ -30,7 +30,7 @@ int usage_lf_awid_read(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_awid_sim(void) {
|
||||
static int usage_lf_awid_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of AWID card with specified facility-code and card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -47,7 +47,7 @@ int usage_lf_awid_sim(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_awid_clone(void) {
|
||||
static int usage_lf_awid_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables cloning of AWID card with specified facility-code and card number onto T55x7.");
|
||||
PrintAndLogEx(NORMAL, "The T55x7 must be on the antenna when issuing this command. T55x7 blocks are calculated and printed in the process.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -65,7 +65,7 @@ int usage_lf_awid_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_awid_brute(void) {
|
||||
static int usage_lf_awid_brute(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables bruteforce of AWID reader with specified facility-code.");
|
||||
PrintAndLogEx(NORMAL, "This is a attack against reader. if cardnumber is given, it starts with it and goes up / down one step");
|
||||
PrintAndLogEx(NORMAL, "if cardnumber is not given, it starts with 1 and goes up to 65535");
|
||||
|
|
|
@ -32,9 +32,4 @@ int CmdAWIDClone(const char *Cmd);
|
|||
int CmdAWIDBrute(const char *Cmd);
|
||||
int getAWIDBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *bits);
|
||||
|
||||
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
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_cotag_read(void) {
|
||||
static int usage_lf_cotag_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf COTAG read [h] <signaldata>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h : This help");
|
||||
|
|
|
@ -27,5 +27,4 @@ int CmdLFCOTAG(const char *Cmd);
|
|||
int CmdCOTAGRead(const char *Cmd);
|
||||
int CmdCOTAGDemod(const char *Cmd);
|
||||
|
||||
int usage_lf_cotag_read(void);
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@ uint64_t g_em410xid = 0;
|
|||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
//////////////// 410x commands
|
||||
int usage_lf_em410x_demod(void) {
|
||||
static int usage_lf_em410x_demod(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_demod [h] [clock] <0|1> [maxError]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h - this help");
|
||||
|
@ -31,7 +31,7 @@ int usage_lf_em410x_demod(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 410x_demod 64 1 0 = demod an EM410x Tag ID from GraphBuffer using a clock of RF/64 and inverting data and allowing 0 demod errors");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em410x_write(void) {
|
||||
static int usage_lf_em410x_write(void) {
|
||||
PrintAndLogEx(NORMAL, "Writes EM410x ID to a T55x7 / T5555 (Q5) tag");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_write [h] <id> <card> [clock]");
|
||||
|
@ -44,7 +44,7 @@ int usage_lf_em410x_write(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 410x_write 0F0368568B 1 = write ID to t55x7 card");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em410x_ws(void) {
|
||||
static int usage_lf_em410x_ws(void) {
|
||||
PrintAndLogEx(NORMAL, "Watch 'nd Spoof, activates reader, waits until a EM410x tag gets presented then it starts simulating the found UID");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_spoof [h]");
|
||||
|
@ -54,7 +54,7 @@ int usage_lf_em410x_ws(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 410x_spoof");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em410x_clone(void) {
|
||||
static int usage_lf_em410x_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Simulating EM410x tag");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_clone [h] <uid> <clock>");
|
||||
|
@ -67,7 +67,7 @@ int usage_lf_em410x_clone(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 410x_clone 0F0368568B 32");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em410x_sim(void) {
|
||||
static int usage_lf_em410x_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Simulating EM410x tag");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_sim [h] <uid> <clock>");
|
||||
|
@ -80,7 +80,7 @@ int usage_lf_em410x_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 410x_sim 0F0368568B 32");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em410x_brute(void) {
|
||||
static int usage_lf_em410x_brute(void) {
|
||||
PrintAndLogEx(NORMAL, "Bruteforcing by emulating EM410x tag");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 410x_brute [h] ids.txt [d 2000] [c clock]");
|
||||
|
@ -98,7 +98,7 @@ int usage_lf_em410x_brute(void) {
|
|||
}
|
||||
|
||||
//////////////// 4050 / 4450 commands
|
||||
int usage_lf_em4x50_dump(void) {
|
||||
static int usage_lf_em4x50_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Dump EM4x50/EM4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x50_dump [h] <pwd>");
|
||||
|
@ -110,7 +110,7 @@ int usage_lf_em4x50_dump(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 4x50_dump 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em4x50_read(void) {
|
||||
static int usage_lf_em4x50_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Read EM 4x50/EM4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x50_read [h] <address> <pwd>");
|
||||
|
@ -123,7 +123,7 @@ int usage_lf_em4x50_read(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 4x50_read 1 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em4x50_write(void) {
|
||||
static int usage_lf_em4x50_write(void) {
|
||||
PrintAndLogEx(NORMAL, "Write EM 4x50/4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x50_write [h] <address> <data> <pwd>");
|
||||
|
@ -139,7 +139,7 @@ int usage_lf_em4x50_write(void) {
|
|||
}
|
||||
|
||||
//////////////// 4205 / 4305 commands
|
||||
int usage_lf_em4x05_dump(void) {
|
||||
static int usage_lf_em4x05_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Dump EM4x05/EM4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x05_dump [h] <pwd>");
|
||||
|
@ -151,7 +151,7 @@ int usage_lf_em4x05_dump(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 4x05_dump 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em4x05_read(void) {
|
||||
static int usage_lf_em4x05_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Read EM4x05/EM4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x05_read [h] <address> <pwd>");
|
||||
|
@ -164,7 +164,7 @@ int usage_lf_em4x05_read(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 4x05_read 1 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em4x05_write(void) {
|
||||
static int usage_lf_em4x05_write(void) {
|
||||
PrintAndLogEx(NORMAL, "Write EM4x05/4x69. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x05_write [h] <address> <data> <pwd>");
|
||||
|
@ -178,7 +178,7 @@ int usage_lf_em4x05_write(void) {
|
|||
PrintAndLogEx(NORMAL, " lf em 4x05_write 1 deadc0de 11223344");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_em4x05_info(void) {
|
||||
static int usage_lf_em4x05_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Tag information EM4205/4305/4469//4569 tags. Tag must be on antenna.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x05_info [h] <pwd>");
|
||||
|
|
|
@ -49,19 +49,4 @@ 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);
|
||||
|
||||
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);
|
||||
|
||||
int usage_lf_em4x50_dump(void);
|
||||
int usage_lf_em4x50_read(void);
|
||||
int usage_lf_em4x50_write(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
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_fdx_clone(void) {
|
||||
static int usage_lf_fdx_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Clone a FDX-B animal tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf fdx clone [h] <country id> <animal id> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -49,7 +49,7 @@ int usage_lf_fdx_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_fdx_sim(void) {
|
||||
static int usage_lf_fdx_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of FDX-B animal tag");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -27,9 +27,5 @@ 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);
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_guard_clone(void) {
|
||||
static int usage_lf_guard_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Guardall tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated. ");
|
||||
PrintAndLogEx(NORMAL, "Currently work only on 26bit");
|
||||
|
@ -27,7 +27,7 @@ int usage_lf_guard_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_guard_sim(void) {
|
||||
static int usage_lf_guard_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of Guardall card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated.");
|
||||
|
|
|
@ -28,6 +28,4 @@ int CmdGuardRead(const char *Cmd);
|
|||
int CmdGuardClone(const char *Cmd);
|
||||
int CmdGuardSim(const char *Cmd);
|
||||
|
||||
int usage_lf_guard_clone(void);
|
||||
int usage_lf_quard_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_hid_read(void) {
|
||||
static int usage_lf_hid_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables HID compatible reader mode printing details.");
|
||||
PrintAndLogEx(NORMAL, "By default, values are printed and logged until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "If the [1] option is provided, reader mode is exited after reading a single HID card.");
|
||||
|
@ -31,7 +31,7 @@ int usage_lf_hid_read(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hid read 1");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_hid_wiegand(void) {
|
||||
static int usage_lf_hid_wiegand(void) {
|
||||
PrintAndLogEx(NORMAL, "This command converts facility code/card number to Wiegand code");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hid wiegand [h] [OEM] [FC] [CN]");
|
||||
|
@ -44,7 +44,7 @@ int usage_lf_hid_wiegand(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hid wiegand 0 101 2001");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_hid_sim(void) {
|
||||
static int usage_lf_hid_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of HID card with card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -56,7 +56,7 @@ int usage_lf_hid_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hid sim 2006ec0c86");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_hid_clone(void) {
|
||||
static int usage_lf_hid_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Clone HID to T55x7. Tag must be on antenna. ");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hid clone [h] [ID] <L>");
|
||||
|
@ -69,7 +69,7 @@ int usage_lf_hid_clone(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hid clone 2006ec0c86 L");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_hid_brute(void) {
|
||||
static int usage_lf_hid_brute(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables bruteforce of HID readers with specified facility code.");
|
||||
PrintAndLogEx(NORMAL, "This is a attack against reader. if cardnumber is given, it starts with it and goes up / down one step");
|
||||
PrintAndLogEx(NORMAL, "if cardnumber is not given, it starts with 1 and goes up to 65535");
|
||||
|
|
|
@ -32,12 +32,6 @@ int CmdHIDClone(const char *Cmd);
|
|||
int CmdHIDWiegand(const char *Cmd);
|
||||
int CmdHIDBrute(const char *Cmd);
|
||||
|
||||
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);
|
||||
void calcWiegand(uint8_t fmtlen, uint16_t fc, uint64_t cardno, uint8_t *bits);
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@ static int CmdHelp(const char *Cmd);
|
|||
size_t nbytes(size_t nbits) {
|
||||
return (nbits / 8) + ((nbits % 8) > 0);
|
||||
}
|
||||
int usage_hitag_sniff(void) {
|
||||
static int usage_hitag_sniff(void) {
|
||||
PrintAndLogEx(NORMAL, "Sniff traffic between Hitag reader and tag. Use " _YELLOW_("`lf hitag list`")" to view collected data.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag sniff [h] ");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -39,7 +39,7 @@ int usage_hitag_sniff(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hitag sniff");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_sim(void) {
|
||||
static int usage_hitag_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Simulate " _YELLOW_("Hitag2 / HitagS")" transponder");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag sim [h] [2|s] e|j|b <filename w/o extension>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -53,7 +53,7 @@ int usage_hitag_sim(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hitag sim 2 b lf-hitag-dump");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_info(void) {
|
||||
static int usage_hitag_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag info [h] p <pwd>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -62,7 +62,7 @@ int usage_hitag_info(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hitag info");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_dump(void) {
|
||||
static int usage_hitag_dump(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag dump [h] p <pwd> f <name>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h This help");
|
||||
|
@ -74,7 +74,7 @@ int usage_hitag_dump(void) {
|
|||
PrintAndLogEx(NORMAL, " lf hitag dump p 4D494B52 f mydump");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_reader(void) {
|
||||
static int usage_hitag_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Hitag reader functions");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag reader [h] <reader function #>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -91,7 +91,7 @@ int usage_hitag_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " 26 Just read UID");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_writer(void) {
|
||||
static int usage_hitag_writer(void) {
|
||||
PrintAndLogEx(NORMAL, "Hitag writer functions");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf hitag write [h] <reader function #>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -104,7 +104,7 @@ int usage_hitag_writer(void) {
|
|||
PrintAndLogEx(NORMAL, " 24 <key> (set to 0 if no authentication is needed) <page> <byte0...byte3> write page on a Hitag2 tag");
|
||||
return 0;
|
||||
}
|
||||
int usage_hitag_checkchallenges(void) {
|
||||
static int usage_hitag_checkchallenges(void) {
|
||||
PrintAndLogEx(NORMAL, "Check challenges, load a file with save hitag crypto challenges and test them all.");
|
||||
PrintAndLogEx(NORMAL, "The file should be 8 * 60 bytes long, the file extension defaults to " _YELLOW_("`.cc`"));
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -18,7 +18,7 @@ static uint8_t preamble224[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|||
// standard 64 bit indala formats including 26 bit 40134 format
|
||||
static uint8_t preamble64[] = {1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
|
||||
|
||||
int usage_lf_indala_demod(void) {
|
||||
static int usage_lf_indala_demod(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables Indala compatible reader mode printing details of scanned tags.");
|
||||
PrintAndLogEx(NORMAL, "By default, values are printed and logged until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -31,7 +31,7 @@ int usage_lf_indala_demod(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_indala_sim(void) {
|
||||
static int usage_lf_indala_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of Indala card with specified uid.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -45,7 +45,7 @@ int usage_lf_indala_sim(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_indala_clone(void) {
|
||||
static int usage_lf_indala_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf indala clone [h]<l> <uid> [Q5]");
|
||||
|
|
|
@ -35,7 +35,4 @@ 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);
|
||||
|
||||
int usage_lf_indala_demod(void);
|
||||
int usage_lf_indala_clone(void);
|
||||
int usage_lf_indala_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_io_read(void) {
|
||||
static int usage_lf_io_read(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables IOProx compatible reader mode printing details of scanned tags.");
|
||||
PrintAndLogEx(NORMAL, "By default, values are printed and logged until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "If the [1] option is provided, reader mode is exited after reading a single card.");
|
||||
|
@ -28,7 +28,7 @@ int usage_lf_io_read(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_io_sim(void) {
|
||||
static int usage_lf_io_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of IOProx card with specified facility-code and card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
@ -44,7 +44,7 @@ int usage_lf_io_sim(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_io_clone(void) {
|
||||
static int usage_lf_io_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables cloning of IOProx card with specified facility-code and card number onto T55x7.");
|
||||
PrintAndLogEx(NORMAL, "The T55x7 must be on the antenna when issuing this command. T55x7 blocks are calculated and printed in the process.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -24,7 +24,4 @@ int CmdIOProxClone(const char *Cmd);
|
|||
|
||||
int getIOProxBits(uint8_t version, uint8_t fc, uint16_t cn, uint8_t *bits);
|
||||
|
||||
int usage_lf_io_read(void);
|
||||
int usage_lf_io_clone(void);
|
||||
int usage_lf_io_sim(void);
|
||||
#endif
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_jablotron_clone(void) {
|
||||
static int usage_lf_jablotron_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Jablotron tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf jablotron clone [h] <card ID> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -25,7 +25,7 @@ int usage_lf_jablotron_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_jablotron_sim(void) {
|
||||
static int usage_lf_jablotron_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of jablotron card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -32,10 +32,5 @@ int CmdJablotronSim(const char *Cmd);
|
|||
int detectJablotron(uint8_t *bits, size_t *size);
|
||||
int getJablotronBits(uint64_t fullcode, uint8_t *bits);
|
||||
|
||||
//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
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_keri_clone(void) {
|
||||
static int usage_lf_keri_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a KERI tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf keri clone [h] <id> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -24,7 +24,7 @@ int usage_lf_keri_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_keri_sim(void) {
|
||||
static int usage_lf_keri_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of KERI card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -30,7 +30,5 @@ int CmdKeriSim(const char *Cmd);
|
|||
|
||||
int detectKeri(uint8_t *dest, size_t *size, bool *invert);
|
||||
|
||||
int usage_lf_keri_clone(void);
|
||||
int usage_lf_keri_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "cmdlfnedap.h"
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_nedap_clone(void) {
|
||||
static int usage_lf_nedap_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a NEDAP tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf nedap clone [h] <Card-Number>");
|
||||
|
@ -24,7 +24,7 @@ int usage_lf_nedap_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_nedap_sim(void) {
|
||||
static int usage_lf_nedap_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of NEDAP card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -31,8 +31,5 @@ int CmdLFNedapChk(const char *Cmd);
|
|||
|
||||
int detectNedap(uint8_t *dest, size_t *size);
|
||||
|
||||
int usage_lf_nedap_read(void);
|
||||
//int usage_lf_nedap_clone(void);
|
||||
int usage_lf_nedap_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_noralsy_clone(void) {
|
||||
static int usage_lf_noralsy_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Noralsy tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf noralsy clone [h] <card id> <year> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -25,7 +25,7 @@ int usage_lf_noralsy_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_noralsy_sim(void) {
|
||||
static int usage_lf_noralsy_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of Noralsy card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -30,9 +30,5 @@ int CmdNoralsySim(const char *Cmd);
|
|||
|
||||
int getnoralsyBits(uint32_t id, uint16_t year, uint8_t *bits);
|
||||
|
||||
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,7 +21,7 @@
|
|||
#include "lfdemod.h"
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_paradox_sim(void) {
|
||||
static int usage_lf_paradox_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of Paradox card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated.");
|
||||
|
|
|
@ -51,7 +51,7 @@ int pcf7931_printConfig() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_pcf7931_read() {
|
||||
static int usage_pcf7931_read() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf pcf7931 read [h] ");
|
||||
PrintAndLogEx(NORMAL, "This command tries to read a PCF7931 tag.");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -61,7 +61,7 @@ int usage_pcf7931_read() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_pcf7931_write() {
|
||||
static int usage_pcf7931_write() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf pcf7931 write [h] <block address> <byte address> <data>");
|
||||
PrintAndLogEx(NORMAL, "This command tries to write a PCF7931 tag.");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -74,7 +74,7 @@ int usage_pcf7931_write() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_pcf7931_config() {
|
||||
static int usage_pcf7931_config() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf pcf7931 config [h] [r] <pwd> <delay> <offset width> <offset position>");
|
||||
PrintAndLogEx(NORMAL, "This command tries to set the configuration used with PCF7931 commands");
|
||||
PrintAndLogEx(NORMAL, "The time offsets could be useful to correct slew rate generated by the antenna");
|
||||
|
|
|
@ -22,10 +22,6 @@ struct pcf7931_config {
|
|||
int pcf7931_resetConfig(void);
|
||||
int pcf7931_printConfig(void);
|
||||
|
||||
int usage_pcf7931_read(void);
|
||||
int usage_pcf7931_write(void);
|
||||
int usage_pcf7931_config(void);
|
||||
|
||||
int CmdLFPCF7931(const char *Cmd);
|
||||
|
||||
int CmdLFPCF7931Read(const char *Cmd);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "cmdlfpresco.h"
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_presco_clone(void) {
|
||||
static int usage_lf_presco_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Presco tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf presco clone [h] d <Card-ID> c <hex-ID> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -24,7 +24,7 @@ int usage_lf_presco_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_presco_sim(void) {
|
||||
static int usage_lf_presco_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of presco card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "Per presco format, the card number is 9 digit number and can contain *# chars. Larger values are truncated.");
|
||||
|
|
|
@ -30,7 +30,5 @@ int CmdPrescoSim(const char *Cmd);
|
|||
int detectPresco(uint8_t *dest, size_t *size);
|
||||
int GetWiegandFromPresco(const char *Cmd, uint32_t *sitecode, uint32_t *usercode, uint32_t *fullcode, bool *Q5);
|
||||
|
||||
int usage_lf_presco_clone(void);
|
||||
int usage_lf_presco_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_pyramid_clone(void) {
|
||||
static int usage_lf_pyramid_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Farpointe/Pyramid tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated. ");
|
||||
PrintAndLogEx(NORMAL, "Currently only works on 26bit");
|
||||
|
@ -28,7 +28,7 @@ int usage_lf_pyramid_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_pyramid_sim(void) {
|
||||
static int usage_lf_pyramid_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of Farpointe/Pyramid card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated.");
|
||||
|
|
|
@ -29,8 +29,5 @@ int CmdPyramidClone(const char *Cmd);
|
|||
int CmdPyramidSim(const char *Cmd);
|
||||
|
||||
int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx);
|
||||
|
||||
int usage_lf_pyramid_clone(void);
|
||||
int usage_lf_pyramid_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ void Set_t55xx_Config(t55xx_conf_block_t conf) {
|
|||
config = conf;
|
||||
}
|
||||
|
||||
int usage_t55xx_config() {
|
||||
static int usage_t55xx_config() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx config [d <demodulation>] [i [0/1]] [o <offset>] [Q5 [0/1]] [ST [0/1]]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " h - This help");
|
||||
|
@ -36,7 +36,7 @@ int usage_t55xx_config() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_read() {
|
||||
static int usage_t55xx_read() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx read [b <block>] [p <password>] <override_safety> <page1>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <block> - block number to read. Between 0-7");
|
||||
|
@ -54,7 +54,7 @@ int usage_t55xx_read() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_write() {
|
||||
static int usage_t55xx_write() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx write [b <block>] [d <data>] [p <password>] [1] [t]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " b <block> - block number to write. Between 0-7");
|
||||
|
@ -69,7 +69,7 @@ int usage_t55xx_write() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_trace() {
|
||||
static int usage_t55xx_trace() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx trace [1]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " 1 - if set, use Graphbuffer otherwise read data from tag.");
|
||||
|
@ -80,7 +80,7 @@ int usage_t55xx_trace() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_info() {
|
||||
static int usage_t55xx_info() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx info [1] [d <data> [q]]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " (default) - read data from tag.");
|
||||
|
@ -97,7 +97,7 @@ int usage_t55xx_info() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_dump() {
|
||||
static int usage_t55xx_dump() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx dump <password> [o]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " <password> - OPTIONAL password 4bytes (8 hex symbols)");
|
||||
|
@ -109,7 +109,7 @@ int usage_t55xx_dump() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_detect() {
|
||||
static int usage_t55xx_detect() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx detect [1] [p <password>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " 1 - if set, use Graphbuffer otherwise read data from tag.");
|
||||
|
@ -122,7 +122,7 @@ int usage_t55xx_detect() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_detectP1() {
|
||||
static int usage_t55xx_detectP1() {
|
||||
PrintAndLogEx(NORMAL, "Command: Detect Page 1 of a t55xx chip");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx p1detect [1] [p <password>]");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -136,7 +136,7 @@ int usage_t55xx_detectP1() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_wakup() {
|
||||
static int usage_t55xx_wakup() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx wakeup [h] p <password>");
|
||||
PrintAndLogEx(NORMAL, "This commands send the Answer-On-Request command and leaves the readerfield ON afterwards.");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -147,7 +147,7 @@ int usage_t55xx_wakup() {
|
|||
PrintAndLogEx(NORMAL, " lf t55xx wakeup p 11223344 - send wakeup password");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_chk() {
|
||||
static int usage_t55xx_chk() {
|
||||
PrintAndLogEx(NORMAL, "This command uses a dictionary attack");
|
||||
PrintAndLogEx(NORMAL, "press " _YELLOW_("'enter'") " to cancel the command");
|
||||
PrintAndLogEx(NORMAL, "WARNING: this may brick non-password protected chips!");
|
||||
|
@ -164,7 +164,7 @@ int usage_t55xx_chk() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_bruteforce() {
|
||||
static int usage_t55xx_bruteforce() {
|
||||
PrintAndLogEx(NORMAL, "This command uses bruteforce to scan a number range");
|
||||
PrintAndLogEx(NORMAL, "press " _YELLOW_("'enter'") " to cancel the command");
|
||||
PrintAndLogEx(NORMAL, "WARNING: this may brick non-password protected chips!");
|
||||
|
@ -181,7 +181,7 @@ int usage_t55xx_bruteforce() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_recoverpw() {
|
||||
static int usage_t55xx_recoverpw() {
|
||||
PrintAndLogEx(NORMAL, "This command uses a few tricks to try to recover mangled password");
|
||||
PrintAndLogEx(NORMAL, "press " _YELLOW_("'enter'") " to cancel the command");
|
||||
PrintAndLogEx(NORMAL, "WARNING: this may brick non-password protected chips!");
|
||||
|
@ -199,7 +199,7 @@ int usage_t55xx_recoverpw() {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
return 0;
|
||||
}
|
||||
int usage_t55xx_wipe() {
|
||||
static int usage_t55xx_wipe() {
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx wipe [h] [Q5]");
|
||||
PrintAndLogEx(NORMAL, "This commands wipes a tag, fills blocks 1-7 with zeros and a default configuration block");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -211,7 +211,7 @@ int usage_t55xx_wipe() {
|
|||
PrintAndLogEx(NORMAL, " lf t55xx wipe Q5 - wipes a t5555 Q5 tag, config block 0x6001F004");
|
||||
return 0;
|
||||
}
|
||||
int usage_lf_deviceconfig() {
|
||||
static int usage_lf_deviceconfig() {
|
||||
PrintAndLogEx(NORMAL, "Sets t55x7 timings for direkt commands. The timings are set here in Field Clocks (FC), \nwhich is converted to (US) on device");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf t55xx deviceconfig a <gap> b <gap> c <gap> d <gap> e <gap> p");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_viking_clone(void) {
|
||||
static int usage_lf_viking_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Viking AM tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf viking clone <Card ID - 8 hex digits> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -23,7 +23,7 @@ int usage_lf_viking_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_viking_sim(void) {
|
||||
static int usage_lf_viking_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of viking card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "Per viking format, the card number is 8 digit hex number. Larger values are truncated.");
|
||||
|
|
|
@ -30,7 +30,5 @@ int CmdVikingSim(const char *Cmd);
|
|||
|
||||
int detectViking(uint8_t *dest, size_t *size);
|
||||
|
||||
int usage_lf_viking_clone(void);
|
||||
int usage_lf_viking_sim(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_lf_visa2k_clone(void) {
|
||||
static int usage_lf_visa2k_clone(void) {
|
||||
PrintAndLogEx(NORMAL, "clone a Visa2000 tag to a T55x7 tag.");
|
||||
PrintAndLogEx(NORMAL, "Usage: lf visa2000 clone [h] <card ID> <Q5>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
|
@ -28,7 +28,7 @@ int usage_lf_visa2k_clone(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_lf_visa2k_sim(void) {
|
||||
static int usage_lf_visa2k_sim(void) {
|
||||
PrintAndLogEx(NORMAL, "Enables simulation of visa2k card with specified card number.");
|
||||
PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued.");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -31,9 +31,5 @@ int CmdVisa2kSim(const char *Cmd);
|
|||
int getvisa2kBits(uint64_t fullcode, uint8_t *bits);
|
||||
int detectVisa2k(uint8_t *dest, size_t *size);
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
int usage_sm_raw(void) {
|
||||
static int usage_sm_raw(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: sc raw [h|r|c] d <0A 0B 0C ... hex>");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " r : do not read response");
|
||||
|
@ -30,7 +30,7 @@ int usage_sm_raw(void) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
int usage_sm_reader(void) {
|
||||
static int usage_sm_reader(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: sc reader [h|s]");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " s : silent (no messages)");
|
||||
|
@ -39,7 +39,7 @@ int usage_sm_reader(void) {
|
|||
PrintAndLogEx(NORMAL, " sc reader");
|
||||
return 0;
|
||||
}
|
||||
int usage_sm_info(void) {
|
||||
static int usage_sm_info(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: s info [h|s]");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " s : silent (no messages)");
|
||||
|
@ -48,7 +48,7 @@ int usage_sm_info(void) {
|
|||
PrintAndLogEx(NORMAL, " sc info");
|
||||
return 0;
|
||||
}
|
||||
int usage_sm_upgrade(void) {
|
||||
static int usage_sm_upgrade(void) {
|
||||
PrintAndLogEx(NORMAL, "Upgrade RDV4.0 Sim module firmware");
|
||||
PrintAndLogEx(NORMAL, "Usage: sc upgrade f <file name>");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
|
@ -58,7 +58,7 @@ int usage_sm_upgrade(void) {
|
|||
PrintAndLogEx(NORMAL, " sc upgrade f ../tools/simmodule/SIM011.BIN");
|
||||
return 0;
|
||||
}
|
||||
int usage_sm_setclock(void) {
|
||||
static int usage_sm_setclock(void) {
|
||||
PrintAndLogEx(NORMAL, "Usage: sc setclock [h] c <clockspeed>");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
PrintAndLogEx(NORMAL, " c <> : clockspeed (0 = 16mhz, 1=8mhz, 2=4mhz) ");
|
||||
|
@ -67,7 +67,7 @@ int usage_sm_setclock(void) {
|
|||
PrintAndLogEx(NORMAL, " sc setclock c 2");
|
||||
return 0;
|
||||
}
|
||||
int usage_sm_brute(void) {
|
||||
static int usage_sm_brute(void) {
|
||||
PrintAndLogEx(NORMAL, "Tries to bruteforce SFI, using a known list of AID's ");
|
||||
PrintAndLogEx(NORMAL, "Usage: sc brute [h]");
|
||||
PrintAndLogEx(NORMAL, " h : this help");
|
||||
|
|
|
@ -37,8 +37,4 @@ int CmdSmartReader(const char *Cmd);
|
|||
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);
|
||||
|
||||
int usage_sm_raw(void);
|
||||
int usage_sm_reader(void);
|
||||
int usage_sm_info(void);
|
||||
int usage_sm_upgrade(void);
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@ static int CmdHelp(const char *Cmd);
|
|||
static uint8_t *trace;
|
||||
long traceLen = 0;
|
||||
|
||||
int usage_trace_list() {
|
||||
static int usage_trace_list() {
|
||||
PrintAndLogEx(NORMAL, "List protocol data in trace buffer.");
|
||||
PrintAndLogEx(NORMAL, "Usage: trace list <protocol> [f][c| <0|1>");
|
||||
PrintAndLogEx(NORMAL, " f - show frame delay times as well");
|
||||
|
@ -43,14 +43,14 @@ int usage_trace_list() {
|
|||
PrintAndLogEx(NORMAL, " trace list iclass");
|
||||
return 0;
|
||||
}
|
||||
int usage_trace_load() {
|
||||
static int usage_trace_load() {
|
||||
PrintAndLogEx(NORMAL, "Load protocol data from file to trace buffer.");
|
||||
PrintAndLogEx(NORMAL, "Usage: trace load <filename>");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " trace load mytracefile.bin");
|
||||
return 0;
|
||||
}
|
||||
int usage_trace_save() {
|
||||
static int usage_trace_save() {
|
||||
PrintAndLogEx(NORMAL, "Save protocol data from trace buffer to file.");
|
||||
PrintAndLogEx(NORMAL, "Usage: trace save <filename>");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
|
|
|
@ -33,8 +33,4 @@ int CmdTraceList(const char *Cmd);
|
|||
int CmdTraceLoad(const char *Cmd);
|
||||
int CmdTraceSave(const char *Cmd);
|
||||
|
||||
// usages helptext
|
||||
int usage_trace_list(void);
|
||||
int usage_trace_load(void);
|
||||
int usage_trace_save(void);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue