typos
This commit is contained in:
1 parent
0ed66781a7
commit
88308ea727
98 files changed
+271
-271
No files matched your search
@@ -376,20 +376,20 @@ static int CmdFlashMemWipe(const char *Cmd) {
|
||||
"Wipe flash memory on device, which fills it with 0xFF\n"
|
||||
_WHITE_("[ ") _RED_("!!! OBS") _WHITE_(" ] use with caution"),
|
||||
"mem wipe -p 0 -> wipes first page"
|
||||
// "mem wipe -i -> inital total wipe"
|
||||
// "mem wipe -i -> initial total wipe"
|
||||
);
|
||||
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_int0("p", NULL, "<dec>", "0,1,2 page memory"),
|
||||
// arg_lit0("i", NULL, "inital total wipe"),
|
||||
// arg_lit0("i", NULL, "initial total wipe"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||
|
||||
bool initalwipe = false;
|
||||
bool initialwipe = false;
|
||||
int page = arg_get_int_def(ctx, 1, -1);
|
||||
// initalwipe = arg_get_lit(ctx, 2);
|
||||
// initialwipe = arg_get_lit(ctx, 2);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
if (page < 0 || page > 2) {
|
||||
@@ -398,7 +398,7 @@ static int CmdFlashMemWipe(const char *Cmd) {
|
||||
}
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandMIX(CMD_FLASHMEM_WIPE, page, initalwipe, 0, NULL, 0);
|
||||
SendCommandMIX(CMD_FLASHMEM_WIPE, page, initialwipe, 0, NULL, 0);
|
||||
PacketResponseNG resp;
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 8000)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
|
||||
@@ -2202,7 +2202,7 @@ static uint16_t get_sw(uint8_t *d, uint8_t n) {
|
||||
return d[n] * 0x0100 + d[n + 1];
|
||||
}
|
||||
|
||||
static uint64_t inc_sw_error_occurence(uint16_t sw, uint64_t all_sw[256][256]) {
|
||||
static uint64_t inc_sw_error_occurrence(uint16_t sw, uint64_t all_sw[256][256]) {
|
||||
uint8_t sw1 = (uint8_t)(sw >> 8);
|
||||
uint8_t sw2 = (uint8_t)(0xff & sw);
|
||||
if (sw1 == 0x90 && sw2 == 0x00) {
|
||||
@@ -2291,7 +2291,7 @@ static int CmdHf14AFindapdu(const char *Cmd) {
|
||||
bool inc_p1 = true;
|
||||
bool skip_ins = false;
|
||||
uint64_t all_sw[256][256] = { { 0 } };
|
||||
uint64_t sw_occurences = 0;
|
||||
uint64_t sw_occurrences = 0;
|
||||
uint64_t t_start = msclock();
|
||||
uint64_t t_last_reset = msclock();
|
||||
|
||||
@@ -2334,10 +2334,10 @@ retry_ins:
|
||||
goto retry_ins;
|
||||
}
|
||||
uint16_t sw = get_sw(response, response_n);
|
||||
sw_occurences = inc_sw_error_occurence(sw, all_sw);
|
||||
sw_occurrences = inc_sw_error_occurrence(sw, all_sw);
|
||||
|
||||
// Show response.
|
||||
if (sw_occurences < error_limit) {
|
||||
if (sw_occurrences < error_limit) {
|
||||
logLevel_t log_level = INFO;
|
||||
if (sw == 0x9000) {
|
||||
log_level = SUCCESS;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
|
||||
// Modified 2010-2012 by <adrian -at- atrox.at>
|
||||
// Modified 2012 by <vsza at vsza.hu>
|
||||
// Modfified 2018 by <iceman>
|
||||
// Modified 2018 by <iceman>
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
|
||||
@@ -121,7 +121,7 @@ static bool get_14b_UID(iso14b_card_select_t *card) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Print extented information about tag.
|
||||
// Print extended information about tag.
|
||||
static int infoHFCryptoRF(bool verbose) {
|
||||
iso14b_raw_cmd_t packet = {
|
||||
.flags = (ISO14B_CONNECT | ISO14B_SELECT_STD | ISO14B_DISCONNECT),
|
||||
|
||||
@@ -168,7 +168,7 @@ static int CmdHFFidoRegister(const char *cmd) {
|
||||
char filename[FILE_PATH_SIZE] = {0};
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 4), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
|
||||
|
||||
// deafault name
|
||||
// default name
|
||||
if (fnlen == 0) {
|
||||
strcat(filename, DEF_FIDO_PARAM_FILE);
|
||||
fnlen = strlen(filename);
|
||||
@@ -438,7 +438,7 @@ static int CmdHFFidoAuthenticate(const char *cmd) {
|
||||
char filename[FILE_PATH_SIZE] = {0};
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 6), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
|
||||
|
||||
// deafault name
|
||||
// default name
|
||||
if (fnlen == 0) {
|
||||
strcat(filename, DEF_FIDO_PARAM_FILE);
|
||||
fnlen = strlen(filename);
|
||||
@@ -683,7 +683,7 @@ static int CmdHFFido2MakeCredential(const char *cmd) {
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 5), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
// deafault name
|
||||
// default name
|
||||
if (fnlen == 0) {
|
||||
strcat(filename, DEF_FIDO_PARAM_FILE);
|
||||
fnlen = strlen(filename);
|
||||
@@ -802,7 +802,7 @@ static int CmdHFFido2GetAssertion(const char *cmd) {
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 5), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
// deafault name
|
||||
// default name
|
||||
if (fnlen == 0) {
|
||||
strcat(filename, DEF_FIDO_PARAM_FILE);
|
||||
fnlen = strlen(filename);
|
||||
|
||||
@@ -180,7 +180,7 @@ static int CmdLegicInfo(const char *Cmd) {
|
||||
);
|
||||
}
|
||||
|
||||
// Makes no sence to show this on blank media...
|
||||
// Makes no sense to show this on blank media...
|
||||
if (dcf != 0xFFFF) {
|
||||
|
||||
if (bIsSegmented) {
|
||||
|
||||
@@ -2689,7 +2689,7 @@ static int CmdHF14ADesFormatPICC(const char *Cmd) {
|
||||
static int CmdHF14ADesGetFreeMem(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "hf mfdes getfreemem",
|
||||
"Get card's free memory. Can be done with ot without authentication. Master key may be provided.",
|
||||
"Get card's free memory. Can be done with or without authentication. Master key may be provided.",
|
||||
"hf mfdes getfreemem -> execute with default factory setup");
|
||||
|
||||
void *argtable[] = {
|
||||
|
||||
+22
-22
@@ -3208,7 +3208,7 @@ static int CmdHF14AMfuOtpTearoff(const char *Cmd) {
|
||||
PrintAndLogEx(INFO, "Starting Tear-off test");
|
||||
PrintAndLogEx(INFO, "Target block no: %u", blockno);
|
||||
if (use_data) {
|
||||
PrintAndLogEx(INFO, "Target inital block data : %s", sprint_hex_inrow(data, 4));
|
||||
PrintAndLogEx(INFO, "Target initial block data : %s", sprint_hex_inrow(data, 4));
|
||||
}
|
||||
PrintAndLogEx(INFO, "Target write block data : %s", sprint_hex_inrow(teardata, 4));
|
||||
if (use_match) {
|
||||
@@ -3498,28 +3498,28 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
uint8_t inital_cnt[3] = {0, 0, 0};
|
||||
int len = ulev1_readCounter(cnt_no, inital_cnt, sizeof(inital_cnt));
|
||||
if ( len != sizeof(inital_cnt) ) {
|
||||
uint8_t initial_cnt[3] = {0, 0, 0};
|
||||
int len = ulev1_readCounter(cnt_no, initial_cnt, sizeof(initial_cnt));
|
||||
if ( len != sizeof(initial_cnt) ) {
|
||||
PrintAndLogEx(WARNING, "failed to read counter");
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
uint8_t inital_tear[1] = {0};
|
||||
len = ulev1_readTearing(cnt_no, inital_tear, sizeof(inital_tear));
|
||||
uint8_t initial_tear[1] = {0};
|
||||
len = ulev1_readTearing(cnt_no, initial_tear, sizeof(initial_tear));
|
||||
DropField();
|
||||
if ( len != sizeof(inital_tear) ) {
|
||||
if ( len != sizeof(initial_tear) ) {
|
||||
PrintAndLogEx(WARNING, "failed to read ANTITEAR, exiting... %d", len);
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
uint32_t wr_value = ( newvalue[0] | newvalue[1] << 8 | newvalue[2] << 16 );
|
||||
uint32_t inital_value = ( inital_cnt[0] | inital_cnt[1] << 8 | inital_cnt[2] << 16 );;
|
||||
uint32_t initial_value = ( initial_cnt[0] | initial_cnt[1] << 8 | initial_cnt[2] << 16 );;
|
||||
|
||||
PrintAndLogEx(INFO, "----------------- " _CYAN_("MFU Ev1 Counter Tear off") " ---------------------");
|
||||
PrintAndLogEx(INFO, "Target counter no [ " _GREEN_("%u") " ]", counter);
|
||||
PrintAndLogEx(INFO, " counter value [ " _GREEN_("%s") " ]", sprint_hex_inrow(inital_cnt, sizeof(inital_cnt)));
|
||||
PrintAndLogEx(INFO, " anti-tear value [ " _GREEN_("%02X") " ]", inital_tear[0]);
|
||||
PrintAndLogEx(INFO, " counter value [ " _GREEN_("%s") " ]", sprint_hex_inrow(initial_cnt, sizeof(initial_cnt)));
|
||||
PrintAndLogEx(INFO, " anti-tear value [ " _GREEN_("%02X") " ]", initial_tear[0]);
|
||||
PrintAndLogEx(INFO, " increase value [ " _GREEN_("%s") " ]", sprint_hex_inrow(newvalue, newvaluelen));
|
||||
PrintAndLogEx(INFO, "----------------------------------------------------");
|
||||
|
||||
@@ -3630,20 +3630,20 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
||||
if (inital_value != a ) {
|
||||
if (initial_value != a ) {
|
||||
|
||||
if ( inital_value != b )
|
||||
PrintAndLogEx(INFO, "pre %08x, post %08x != inital %08x | tear: 0x%02X == 0x%02X", a, b, inital_value, pre_tear, post_tear);
|
||||
if ( initial_value != b )
|
||||
PrintAndLogEx(INFO, "pre %08x, post %08x != initial %08x | tear: 0x%02X == 0x%02X", a, b, initial_value, pre_tear, post_tear);
|
||||
else
|
||||
PrintAndLogEx(INFO, "pre %08x != inital and post %08x == inital %08x | tear: 0x%02X == 0x%02X", a, b, inital_value, pre_tear, post_tear);
|
||||
PrintAndLogEx(INFO, "pre %08x != initial and post %08x == initial %08x | tear: 0x%02X == 0x%02X", a, b, initial_value, pre_tear, post_tear);
|
||||
} else {
|
||||
|
||||
if ( inital_value != b )
|
||||
PrintAndLogEx(INFO, "pre %08x == inital and post %08x != inital %08x | tear: 0x%02X == 0x%02X", a, b, inital_value, pre_tear, post_tear);
|
||||
if ( initial_value != b )
|
||||
PrintAndLogEx(INFO, "pre %08x == initial and post %08x != initial %08x | tear: 0x%02X == 0x%02X", a, b, initial_value, pre_tear, post_tear);
|
||||
}
|
||||
|
||||
if ( b == 0 ) {
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occured (ZEROS value!) -> ") "%s vs " _GREEN_("%s") " Tear status: 0x%02X == 0x%02X ( %s )"
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occurred (ZEROS value!) -> ") "%s vs " _GREEN_("%s") " Tear status: 0x%02X == 0x%02X ( %s )"
|
||||
, prestr
|
||||
, poststr
|
||||
, pre_tear
|
||||
@@ -3654,7 +3654,7 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
}
|
||||
|
||||
if ( a > b ) {
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occured " _RED_("( LESS )") " -> ") "%s vs " _GREEN_("%s") " Tear status: 0x%02X == 0x%02X ( %s )"
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occurred " _RED_("( LESS )") " -> ") "%s vs " _GREEN_("%s") " Tear status: 0x%02X == 0x%02X ( %s )"
|
||||
, prestr
|
||||
, poststr
|
||||
, pre_tear
|
||||
@@ -3688,7 +3688,7 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
} else {
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occured (+1) (too late) -> ") "%s vs %s Tear: 0x%02X == 0x%02X ( %s )"
|
||||
PrintAndLogEx(INFO, _CYAN_("Tear off occurred (+1) (too late) -> ") "%s vs %s Tear: 0x%02X == 0x%02X ( %s )"
|
||||
, prestr
|
||||
, poststr
|
||||
, pre_tear
|
||||
@@ -3696,7 +3696,7 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
, post_tear_check ? _GREEN_("OK") : _RED_("DETECTED")
|
||||
);
|
||||
|
||||
if ( post_tear_check && b == inital_value) {
|
||||
if ( post_tear_check && b == initial_value) {
|
||||
PrintAndLogEx(INFO, "Reverted to previous value");
|
||||
break;
|
||||
}
|
||||
@@ -3708,7 +3708,7 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
newvalue[1] = 0;
|
||||
newvalue[2] = 0;
|
||||
|
||||
if ( b >= (inital_value + (2 * wr_value))) {
|
||||
if ( b >= (initial_value + (2 * wr_value))) {
|
||||
PrintAndLogEx(INFO, "Large " _YELLOW_("( JUMP )") " detected");
|
||||
|
||||
|
||||
@@ -3750,7 +3750,7 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( b == inital_value ) {
|
||||
if ( b == initial_value ) {
|
||||
PrintAndLogEx(INFO, "Reverted to previous value");
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@
|
||||
#include "cmdlfhitag.h" // for hitag menu
|
||||
#include "cmdlfidteck.h" // for idteck menu
|
||||
#include "cmdlfio.h" // for ioprox menu
|
||||
#include "cmdlfcotag.h" // for COTAG meny
|
||||
#include "cmdlfcotag.h" // for COTAG menu
|
||||
#include "cmdlfdestron.h" // for FDX-A FECAVA Destron menu
|
||||
#include "cmdlffdxb.h" // for FDX-B menu
|
||||
#include "cmdlfgallagher.h" // for GALLAGHER menu
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "cmdlfmotorola.h" // for Motorola menu
|
||||
#include "cmdlfnedap.h" // for NEDAP menu
|
||||
#include "cmdlfnexwatch.h" // for nexwatch menu
|
||||
#include "cmdlfnoralsy.h" // for NORALSY meny
|
||||
#include "cmdlfnoralsy.h" // for NORALSY menu
|
||||
#include "cmdlfpac.h" // for pac menu
|
||||
#include "cmdlfparadox.h" // for paradox menu
|
||||
#include "cmdlfpcf7931.h" // for pcf7931 menu
|
||||
|
||||
@@ -572,7 +572,7 @@ int CmdEM4x05Dump(const char *Cmd) {
|
||||
if (card_type == EM_4205 || card_type == EM_4305 || card_type == EM_UNKNOWN) {
|
||||
bool lockInPW2 = false;
|
||||
// To flag any blocks locked we need to read blocks 14 and 15 first
|
||||
// dont swap endian until we get block lock flags.
|
||||
// don't swap endian until we get block lock flags.
|
||||
int status14 = em4x05_read_word_ext(EM4305_PROT1_BLOCK, pwd, usePwd, &word);
|
||||
if (status14 == PM3_SUCCESS) {
|
||||
if ((word & 0x00008000) != 0x00) {
|
||||
@@ -643,7 +643,7 @@ int CmdEM4x05Dump(const char *Cmd) {
|
||||
} else if (card_type == EM_4369 || card_type == EM_4469) {
|
||||
|
||||
// To flag any blocks locked we need to read block 3 first
|
||||
// dont swap endian until we get block lock flags.
|
||||
// don't swap endian until we get block lock flags.
|
||||
int status14 = em4x05_read_word_ext(EM4469_PROT_BLOCK, pwd, usePwd, &word);
|
||||
if (status14 == PM3_SUCCESS) {
|
||||
lock_bits = word;
|
||||
@@ -1579,7 +1579,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
||||
uint32_t search_value = 0;
|
||||
uint32_t write_value = 0;
|
||||
//
|
||||
// inital phase
|
||||
// initial phase
|
||||
//
|
||||
// read word 14
|
||||
uint32_t init_14 = 0;
|
||||
|
||||
@@ -153,8 +153,8 @@ static int CmdMotorolaReader(const char *Cmd) {
|
||||
PrintAndLogEx(INFO, "Press " _GREEN_("<Enter>") " to exit");
|
||||
}
|
||||
|
||||
// Motorola Flexpass seem to work at 74 kHz
|
||||
// and take about 4400 samples to befor modulating
|
||||
// Motorola Flexpass seems to work at 74 kHz
|
||||
// and take about 4400 samples too before modulating
|
||||
sample_config sc = {
|
||||
.decimation = -1,
|
||||
.bits_per_sample = -1,
|
||||
|
||||
@@ -53,7 +53,7 @@ static int getWiegandFromPrintedPresco(void *arr, uint32_t *fullcode) {
|
||||
|
||||
*fullcode += val;
|
||||
|
||||
// last digit is only added, not multipled.
|
||||
// last digit is only added, not multiplied.
|
||||
if (i < strlen(s) - 1)
|
||||
*fullcode *= 12;
|
||||
}
|
||||
|
||||
+14
-14
@@ -188,7 +188,7 @@ int clone_t55xx_tag(uint32_t *blockdata, uint8_t numblocks) {
|
||||
|
||||
if (i == 0) {
|
||||
SetConfigWithBlock0(blockdata[0]);
|
||||
if (t55xxAquireAndCompareBlock0(false, 0, blockdata[0], false))
|
||||
if (t55xxAcquireAndCompareBlock0(false, 0, blockdata[0], false))
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ static bool t55xxProtect(bool lock, bool usepwd, uint8_t override, uint32_t pass
|
||||
}
|
||||
}
|
||||
|
||||
bool t55xxAquireAndCompareBlock0(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose) {
|
||||
bool t55xxAcquireAndCompareBlock0(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose) {
|
||||
|
||||
if (verbose)
|
||||
PrintAndLogEx(INFO, "Block0 write detected, running `detect` to see if validation is possible");
|
||||
@@ -299,7 +299,7 @@ bool t55xxAquireAndCompareBlock0(bool usepwd, uint32_t password, uint32_t known_
|
||||
return false;
|
||||
}
|
||||
|
||||
bool t55xxAquireAndDetect(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose) {
|
||||
bool t55xxAcquireAndDetect(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose) {
|
||||
|
||||
if (verbose)
|
||||
PrintAndLogEx(INFO, "Block0 write detected, running `detect` to see if validation is possible");
|
||||
@@ -334,11 +334,11 @@ bool t55xxVerifyWrite(uint8_t block, bool page1, bool usepwd, uint8_t override,
|
||||
|
||||
} else if (res == PM3_EWRONGANSWER) {
|
||||
|
||||
// could't decode. Lets see if this was a block 0 write and try read/detect it auto.
|
||||
// this messes up with ppls config..
|
||||
// couldn't decode. Lets see if this was a block 0 write and try read/detect it auto.
|
||||
// this messes up with ppl config..
|
||||
if (block == 0 && page1 == false) {
|
||||
|
||||
if (t55xxAquireAndDetect(usepwd, password, data, true) == false)
|
||||
if (t55xxAcquireAndDetect(usepwd, password, data, true) == false)
|
||||
return false;
|
||||
|
||||
return t55xxVerifyWrite(block, page1, usepwd, 2, password, config.downlink_mode, data);
|
||||
@@ -474,7 +474,7 @@ static int CmdT55xxSetConfig(const char *Cmd) {
|
||||
}
|
||||
|
||||
// Not these flags are used to Toggle the values.
|
||||
// If not flag then dont set or reset, leave as is since the call may just be be setting a different value.
|
||||
// If not flag then don't set or reset, leave as is since the call may just be be setting a different value.
|
||||
bool invert = arg_get_lit(ctx, idx++);
|
||||
bool use_q5 = arg_get_lit(ctx, idx++);
|
||||
bool use_st = arg_get_lit(ctx, idx++);
|
||||
@@ -1727,7 +1727,7 @@ static int CmdT55xxReadTrace(const char *Cmd) {
|
||||
bool pwdmode = false;
|
||||
uint32_t password = 0;
|
||||
|
||||
// REGULAR_READ_MODE_BLOCK - yeilds correct Page 1 Block 2 data i.e. + 32 bit offset.
|
||||
// REGULAR_READ_MODE_BLOCK - yields correct Page 1 Block 2 data i.e. + 32 bit offset.
|
||||
if (!AcquireData(T55x7_PAGE1, REGULAR_READ_MODE_BLOCK, pwdmode, password, downlink_mode))
|
||||
return PM3_ENODATA;
|
||||
}
|
||||
@@ -1867,7 +1867,7 @@ void printT55x7Trace(t55x7_tracedata_t data, uint8_t repeat) {
|
||||
|
||||
/*
|
||||
Trace info.
|
||||
M1, M2 has the about ATMEL defintion of trace data.
|
||||
M1, M2 has the about ATMEL definition of trace data.
|
||||
M3 has unique format following industry defacto standard with row/col parity
|
||||
|
||||
TRACE - BLOCK O
|
||||
@@ -3212,7 +3212,7 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||
|
||||
PrintAndLogEx(INFO, "testing %08"PRIX32, curr_password);
|
||||
for (dl_mode = downlink_mode; dl_mode <= 3; dl_mode++) {
|
||||
// If aquire fails, then we still need to check if we are only trying a single downlink mode.
|
||||
// If acquire fails, then we still need to check if we are only trying a single downlink mode.
|
||||
// If we continue on fail, it will skip that test and try the next downlink mode; thus slowing down the check
|
||||
// when on a single downlink mode is wanted.
|
||||
if (AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, curr_password, dl_mode)) {
|
||||
@@ -3288,7 +3288,7 @@ static int CmdT55xxBruteForce(const char *Cmd) {
|
||||
}
|
||||
|
||||
uint8_t downlink_mode = refFixedBit; // if no downlink mode suppliled use fixed bit/default as the is the most common
|
||||
// Since we dont know the password the config.downlink mode is of little value.
|
||||
// Since we don't know the password the config.downlink mode is of little value.
|
||||
// if (r0 || ra) // if try all (ra) then start at fixed bit for correct try all
|
||||
// downlink_mode = refFixedBit;
|
||||
// else
|
||||
@@ -4071,7 +4071,7 @@ static int CmdT55xxSniff(const char *Cmd) {
|
||||
|
||||
if (pulseSamples > 0) {
|
||||
pulseBuffer[pulseIdx++] = pulseSamples;
|
||||
if (pulseIdx > 79) { // make room for next sample - if not used by now, it wont be.
|
||||
if (pulseIdx > 79) { // make room for next sample - if not used by now, it won't be.
|
||||
t55sniff_trim_samples(pulseBuffer, &pulseIdx, 1);
|
||||
}
|
||||
|
||||
@@ -4111,14 +4111,14 @@ static int CmdT55xxSniff(const char *Cmd) {
|
||||
// At this point we should have
|
||||
// - a min of 6 samples
|
||||
// - the 0 and 1 sample widths
|
||||
// - min 0 and min seperations (worst case)
|
||||
// - min 0 and min separations (worst case)
|
||||
// No max checks done (yet) as have seen samples > then specs in use.
|
||||
|
||||
// Check first bit.
|
||||
|
||||
// Long leading 0
|
||||
if (have_data == false && (APPROX_EQ(pulseBuffer[0], 136 + minWidth, tolerance) && APPROX_EQ(pulseBuffer[1], maxWidth, tolerance))) {
|
||||
// printf ("Long Leading 0 - not yet hanled | have 1 Fisrt bit | Min : %-3d - Max : %-3d : diff : %d\n",minWidth,maxWidth, maxWidth-minWidth);
|
||||
// printf ("Long Leading 0 - not yet handled | have 1 First bit | Min : %-3d - Max : %-3d : diff : %d\n",minWidth,maxWidth, maxWidth-minWidth);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,8 +181,8 @@ void printT5xxHeader(uint8_t page);
|
||||
void printT55xxBlock(uint8_t blockNum, bool page1);
|
||||
int printConfiguration(t55xx_conf_block_t b);
|
||||
|
||||
bool t55xxAquireAndCompareBlock0(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose);
|
||||
bool t55xxAquireAndDetect(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose);
|
||||
bool t55xxAcquireAndCompareBlock0(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose);
|
||||
bool t55xxAcquireAndDetect(bool usepwd, uint32_t password, uint32_t known_block0, bool verbose);
|
||||
bool t55xxVerifyWrite(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode, uint32_t data);
|
||||
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode);
|
||||
int T55xxReadBlockEx(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode, bool verbose);
|
||||
|
||||
@@ -271,7 +271,7 @@ static int CmdScriptRun(const char *Cmd) {
|
||||
}
|
||||
CLIParserFree(ctx);
|
||||
|
||||
// try to detect a valid script file extention, case-insensitive
|
||||
// try to detect a valid script file extension, case-insensitive
|
||||
char *extension_chk;
|
||||
extension_chk = str_dup(filename);
|
||||
str_lower(extension_chk);
|
||||
|
||||
+2
-2
@@ -100,7 +100,7 @@ void SendCommandOLD(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, v
|
||||
but comm thread just spins here. Not good.../holiman
|
||||
**/
|
||||
while (txBuffer_pending) {
|
||||
// wait for communication thread to complete sending a previous commmand
|
||||
// wait for communication thread to complete sending a previous command
|
||||
pthread_cond_wait(&txBufferSig, &txBufferMutex);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ static void SendCommandNG_internal(uint16_t cmd, uint8_t *data, size_t len, bool
|
||||
but comm thread just spins here. Not good.../holiman
|
||||
**/
|
||||
while (txBuffer_pending) {
|
||||
// wait for communication thread to complete sending a previous commmand
|
||||
// wait for communication thread to complete sending a previous command
|
||||
pthread_cond_wait(&txBufferSig, &txBufferMutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -1365,13 +1365,13 @@ static int CmdEMVExec(const char *Cmd) {
|
||||
}
|
||||
PrintAndLogEx(NORMAL, "raw ARPC: %s", sprint_hex(rawARPC, rawARPClen));
|
||||
|
||||
// here must be calculation of ARPC, but we dont know a bank keys.
|
||||
// here must be calculation of ARPC, but we don't know a bank keys.
|
||||
PrintAndLogEx(NORMAL, "ARPC: n/a");
|
||||
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Application Cryptogram (AC) not found.");
|
||||
}
|
||||
// here must be external authenticate, but we dont know ARPC
|
||||
// here must be external authenticate, but we don't know ARPC
|
||||
}
|
||||
|
||||
// needs to send AC2 command (res == ARQC)
|
||||
@@ -1386,7 +1386,7 @@ static int CmdEMVExec(const char *Cmd) {
|
||||
|
||||
PrintAndLogEx(NORMAL, "CDOL2 data[%zu]: %s", cdol2_data_tlv->len, sprint_hex(cdol2_data_tlv->value, cdol2_data_tlv->len));
|
||||
//PrintAndLogEx(NORMAL, "* * AC2");
|
||||
// here must be AC2, but we dont make external authenticate (
|
||||
// here must be AC2, but we don't make external authenticate (
|
||||
/* // AC2
|
||||
PRINT_INDENT(level);
|
||||
if ((CID & EMVAC_AC2_MASK) == EMVAC_AAC2) PrintAndLogEx(NORMAL, "\tAC2: AAC (Transaction declined)");
|
||||
|
||||
@@ -218,7 +218,7 @@ int JsonSaveTLVTree(json_t *root, json_t *elm, const char *path, struct tlvdb *t
|
||||
if (!pelm)
|
||||
return 1;
|
||||
|
||||
// check childs element and add it if not found
|
||||
// check children element and add it if not found
|
||||
json_t *chjson = json_path_get(pelm, "$.Childs");
|
||||
if (!chjson) {
|
||||
json_object_set_new(pelm, "Childs", json_array());
|
||||
|
||||
+10
-10
@@ -9,7 +9,7 @@
|
||||
// To add a new setting
|
||||
// Add the new setting to the session_arg_t; in ui.h
|
||||
// Add the default value for the setting in the settings_load page below
|
||||
// Update the preferences_load_callback to load your setting into the stucture
|
||||
// Update the preferences_load_callback to load your setting into the structure
|
||||
// Update the preferences_save_callback to ensure your setting gets saved when needed.
|
||||
// use the preference as needed : g_session.<preference name>
|
||||
// Can use (g_session.preferences_loaded) to check if json settings file was used
|
||||
@@ -515,7 +515,7 @@ static void showClientExeDelayState(void) {
|
||||
static int setCmdEmoji(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set emoji ",
|
||||
"Set presistent preference of using emojis in the client",
|
||||
"Set persistent preference of using emojis in the client",
|
||||
"prefs set emoji --alias"
|
||||
);
|
||||
|
||||
@@ -569,7 +569,7 @@ static int setCmdEmoji(const char *Cmd) {
|
||||
static int setCmdColor(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set color ",
|
||||
"Set presistent preference of using colors in the client",
|
||||
"Set persistent preference of using colors in the client",
|
||||
"prefs set color --ansi"
|
||||
);
|
||||
|
||||
@@ -613,7 +613,7 @@ static int setCmdColor(const char *Cmd) {
|
||||
static int setCmdDebug(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set clientdebug ",
|
||||
"Set presistent preference of using clientside debug level",
|
||||
"Set persistent preference of using clientside debug level",
|
||||
"prefs set clientdebug --simple"
|
||||
);
|
||||
|
||||
@@ -664,7 +664,7 @@ static int setCmdDeviceDebug (const char *Cmd)
|
||||
{
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set devicedebug ",
|
||||
"Set presistent preference of device side debug level",
|
||||
"Set persistent preference of device side debug level",
|
||||
"prefs set devicedebug --on"
|
||||
);
|
||||
|
||||
@@ -732,7 +732,7 @@ static int setCmdDeviceDebug (const char *Cmd)
|
||||
static int setCmdExeDelay(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set clientdelay",
|
||||
"Set presistent preference of delay before executing a command in the client",
|
||||
"Set persistent preference of delay before executing a command in the client",
|
||||
"prefs set clientdelay --ms 0 --> unsets any delay\n"
|
||||
"prefs set clientdelay --ms 1000 --> sets 1000ms delay"
|
||||
);
|
||||
@@ -760,7 +760,7 @@ static int setCmdExeDelay(const char *Cmd) {
|
||||
static int setCmdHint(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set hints ",
|
||||
"Set presistent preference of showing hint messages in the client",
|
||||
"Set persistent preference of showing hint messages in the client",
|
||||
"prefs set hints --on"
|
||||
);
|
||||
|
||||
@@ -803,7 +803,7 @@ static int setCmdHint(const char *Cmd) {
|
||||
static int setCmdPlotSliders(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set plotsliders",
|
||||
"Set presistent preference of showing the plotslider control in the client",
|
||||
"Set persistent preference of showing the plotslider control in the client",
|
||||
"prefs set plotsliders --on"
|
||||
);
|
||||
|
||||
@@ -845,7 +845,7 @@ static int setCmdPlotSliders(const char *Cmd) {
|
||||
static int setCmdSavePaths(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set savepaths",
|
||||
"Set presistent preference of file paths in the client",
|
||||
"Set persistent preference of file paths in the client",
|
||||
"prefs set savepaths --dump /home/mydumpfolder -> all dump files will be saved into this folder\n"
|
||||
"prefs set savepaths --def /home/myfolder -c -> create if needed, all files will be saved into this folder"
|
||||
);
|
||||
@@ -926,7 +926,7 @@ static int setCmdSavePaths(const char *Cmd) {
|
||||
static int setCmdBarMode(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "prefs set barmode",
|
||||
"Set presistent preference of HF/LF tune command styled output in the client",
|
||||
"Set persistent preference of HF/LF tune command styled output in the client",
|
||||
"prefs set barmode --mix"
|
||||
);
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ ProxGuiQT::~ProxGuiQT(void) {
|
||||
// Event override functions
|
||||
// -------------------------------------------------
|
||||
PictureWidget::PictureWidget() {
|
||||
// Set the initail postion and size from settings
|
||||
// Set the initial postion and size from settings
|
||||
// if (g_session.preferences_loaded)
|
||||
// setGeometry(g_session.pw.x, g_session.pw.y, g_session.pw.w, g_session.pw.h);
|
||||
// else
|
||||
@@ -268,7 +268,7 @@ void PictureWidget::closeEvent(QCloseEvent *event) {
|
||||
// -------------------------------------------------
|
||||
|
||||
SliderWidget::SliderWidget() {
|
||||
// Set the initail postion and size from settings
|
||||
// Set the initial postion and size from settings
|
||||
if (g_session.preferences_loaded)
|
||||
setGeometry(g_session.overlay.x, g_session.overlay.y, g_session.overlay.w, g_session.overlay.h);
|
||||
else
|
||||
@@ -330,7 +330,7 @@ void ProxWidget::vchange_dthr_down(int v) {
|
||||
|
||||
ProxWidget::ProxWidget(QWidget *parent, ProxGuiQT *master) : QWidget(parent) {
|
||||
this->master = master;
|
||||
// Set the initail postion and size from settings
|
||||
// Set the initial postion and size from settings
|
||||
if (g_session.preferences_loaded)
|
||||
setGeometry(g_session.plot.x, g_session.plot.y, g_session.plot.w, g_session.plot.h);
|
||||
else
|
||||
|
||||
@@ -107,7 +107,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||
}
|
||||
|
||||
// Prepare the device control
|
||||
// doesn't matter since PM3 device ignors this CDC command: set_line_coding in usb_cdc.c
|
||||
// doesn't matter since PM3 device ignores this CDC command: set_line_coding in usb_cdc.c
|
||||
memset(&sp->dcb, 0, sizeof(DCB));
|
||||
sp->dcb.DCBlength = sizeof(DCB);
|
||||
if (!BuildCommDCBA("baud=115200 parity=N data=8 stop=1", &sp->dcb)) {
|
||||
|
||||
+3
-3
@@ -447,7 +447,7 @@ int hex_to_bytes(const char *hexValue, uint8_t *bytesValue, size_t maxBytesValue
|
||||
}
|
||||
|
||||
if (maxBytesValueLen && bytesValueLen >= maxBytesValueLen) {
|
||||
// if we dont have space in buffer and have symbols to translate
|
||||
// if we don't have space in buffer and have symbols to translate
|
||||
return -2;
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ int param_gethex_to_eol(const char *line, int paramnum, uint8_t *data, int maxda
|
||||
}
|
||||
|
||||
if (*datalen >= maxdatalen) {
|
||||
// if we dont have space in buffer and have symbols to translate
|
||||
// if we don't have space in buffer and have symbols to translate
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -763,7 +763,7 @@ int param_getbin_to_eol(const char *line, int paramnum, uint8_t *data, int maxda
|
||||
}
|
||||
|
||||
if (*datalen >= maxdatalen) {
|
||||
// if we dont have space in buffer and have symbols to translate
|
||||
// if we don't have space in buffer and have symbols to translate
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user