mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-27 02:24:47 +08:00
chg: \r didn't work well with printandlogex
chg: spaces chg: cleaning
This commit is contained in:
parent
c41013d394
commit
271cb3e1cc
8 changed files with 18 additions and 19 deletions
|
@ -1406,10 +1406,10 @@ void ReaderHitag(hitag_function htf, hitag_data* htd) {
|
|||
// falling edge occured halfway the period. with respect to this falling edge,
|
||||
// we need to wait (T_Wait2 + half_tag_period) when the last was a 'one'.
|
||||
// All timer values are in terms of T0 units
|
||||
while (AT91C_BASE_TC0->TC_CV < T0 * (t_wait+(HITAG_T_TAG_HALF_PERIOD*lastbit)));
|
||||
while (AT91C_BASE_TC0->TC_CV < T0 * (t_wait + (HITAG_T_TAG_HALF_PERIOD * lastbit)));
|
||||
|
||||
// Transmit the reader frame
|
||||
hitag_reader_send_frame(tx,txlen);
|
||||
hitag_reader_send_frame(tx, txlen);
|
||||
|
||||
// Enable and reset external trigger in timer for capturing future frames
|
||||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
||||
|
|
|
@ -1335,7 +1335,7 @@ int CmdHexsamples(const char *Cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
GetFromBigBuf(got,requested,offset);
|
||||
GetFromBigBuf(got, requested, offset);
|
||||
WaitForResponse(CMD_ACK,NULL);
|
||||
|
||||
i = 0;
|
||||
|
|
|
@ -41,36 +41,35 @@ int CmdHFSearch(const char *Cmd){
|
|||
char cmdp = param_getchar(Cmd, 0);
|
||||
if (cmdp == 'h' || cmdp == 'H') return usage_hf_search();
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
int ans = CmdHF14AInfo("s");
|
||||
if (ans > 0) {
|
||||
PrintAndLogEx(NORMAL, "\nValid ISO14443-A Tag Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid ISO14443-A Tag Found\n");
|
||||
return ans;
|
||||
}
|
||||
ans = HF15Reader("", false);
|
||||
if (ans) {
|
||||
PrintAndLogEx(NORMAL, "\nValid ISO15693 Tag Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid ISO15693 Tag Found\n");
|
||||
return ans;
|
||||
}
|
||||
ans = HFLegicReader("", false);
|
||||
if ( ans == 0) {
|
||||
PrintAndLogEx(NORMAL, "\nValid LEGIC Tag Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid LEGIC Tag Found\n");
|
||||
return 1;
|
||||
}
|
||||
ans = CmdHFTopazReader("s");
|
||||
if (ans == 0) {
|
||||
PrintAndLogEx(NORMAL, "\nValid Topaz Tag Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid Topaz Tag Found\n");
|
||||
return 1;
|
||||
}
|
||||
// 14b and iclass is the longest test (put last)
|
||||
ans = HF14BReader(false); //CmdHF14BReader("s");
|
||||
if (ans) {
|
||||
PrintAndLogEx(NORMAL, "\nValid ISO14443-B Tag Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid ISO14443-B Tag Found\n");
|
||||
return ans;
|
||||
}
|
||||
ans = HFiClassReader("", false, false);
|
||||
if (ans) {
|
||||
PrintAndLogEx(NORMAL, "\nValid iClass Tag (or PicoPass Tag) Found\n");
|
||||
PrintAndLogEx(SUCCESS, "\nValid iClass Tag (or PicoPass Tag) Found\n");
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ int CmdHF14AInfo(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(NORMAL, "proprietary non iso14443-4 card found, RATS not supported");
|
||||
PrintAndLogEx(INFO, "proprietary non iso14443-4 card found, RATS not supported");
|
||||
}
|
||||
|
||||
detect_classic_magic();
|
||||
|
|
|
@ -2254,7 +2254,7 @@ int CmdHF14AMfKeyBrute(const char *Cmd) {
|
|||
PrintAndLogEx(FAILED, "key not found");
|
||||
|
||||
t1 = msclock() - t1;
|
||||
PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(SUCCESS, "time in keybrute: %.0f seconds\n", (float)t1/1000.0);
|
||||
PrintAndLogEx(SUCCESS, "\ntime in keybrute: %.0f seconds\n", (float)t1/1000.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,8 +213,8 @@ void UsbCommandReceived(UsbCommand* _ch) {
|
|||
|
||||
// print debug line on same row. escape seq \r
|
||||
if ( c->arg[1] == CMD_MEASURE_ANTENNA_TUNING_HF) {
|
||||
PrintAndLogEx(NORMAL, "\r#db# %s", s);
|
||||
//fflush(stdout);
|
||||
printf("\r#db# %s", s);
|
||||
fflush(stdout);
|
||||
} else {
|
||||
PrintAndLogEx(NORMAL, "#db# %s", s);
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ void UsbCommandReceived(UsbCommand* _ch) {
|
|||
uint32_t len = MIN(c->arg[1], sample_buf_size);
|
||||
//uint32_t tracelen = c->arg[2];
|
||||
|
||||
printf("SAMPLE_BUF_SIZE %u | adjusted len %u \n", sample_buf_size, len);
|
||||
//printf("SAMPLE_BUF_SIZE %u | adjusted len %u | offset %u\n", sample_buf_size, len, offset);
|
||||
|
||||
memcpy( sample_buf + offset, c->d.asBytes, len);
|
||||
//PrintAndLogEx(NORMAL, "ICE:: Download from device. chunk %" PRIu32 " | size %" PRIu32 " | tracelen:%" PRIu32 " \n", offset, len, c->arg[2]);
|
||||
|
|
|
@ -156,7 +156,7 @@ int mfCheckKeys_fast( uint8_t sectorsCnt, uint8_t firstChunk, uint8_t lastChunk,
|
|||
// s70 with 40*2 keys to check, 80*85 = 6800 auth.
|
||||
// takes about 97s, still some margin before abort
|
||||
if (timeout > 180) {
|
||||
PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(WARNING, "no response from Proxmark. Aborting...");
|
||||
PrintAndLogEx(WARNING, "\nno response from Proxmark. Aborting...");
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
|||
}
|
||||
|
||||
int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len){
|
||||
PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(SUCCESS, "encrypted data: [%s]", sprint_hex(data, len) );
|
||||
PrintAndLogEx(SUCCESS, "\nencrypted data: [%s]", sprint_hex(data, len) );
|
||||
struct Crypto1State *s;
|
||||
ks2 = ar_enc ^ prng_successor(nt, 64);
|
||||
ks3 = at_enc ^ prng_successor(nt, 96);
|
||||
|
|
|
@ -128,7 +128,7 @@ void PrintAndLog(char *fmt, ...) {
|
|||
logfile = fopen(logfilename, "a");
|
||||
if (!logfile) {
|
||||
fprintf(stderr, "Can't open logfile, logging disabled!\n");
|
||||
logging=0;
|
||||
logging = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ void PrintAndLog(char *fmt, ...) {
|
|||
|
||||
if (logging && logfile) {
|
||||
vfprintf(logfile, fmt, argptr2);
|
||||
fprintf(logfile,"\n");
|
||||
fprintf(logfile, "\n");
|
||||
fflush(logfile);
|
||||
}
|
||||
va_end(argptr2);
|
||||
|
|
Loading…
Reference in a new issue