make style

This commit is contained in:
Philippe Teuwen committed 2022-01-23 20:02:57 +01:00
1 parent b7e35e599f
commit 140a7f34a4
9 files changed
+53 -50

No files matched your search

+5 -5
View File
@@ -271,7 +271,7 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool i
gs_ntag_i2c_state = 1;
} else {
snprintf(exp, size, "RESTORE(%d)", cmd[1]);
}
}
} else {
return PM3_ESOFT;
}
@@ -832,7 +832,7 @@ void annotateIso7816(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
// it's basically a ISO14443a tag, so try annotation from there
if (applyIso14443a(exp, size, cmd, cmdsize, false) != PM3_SUCCESS ) {
if (applyIso14443a(exp, size, cmd, cmdsize, false) != PM3_SUCCESS) {
// S-block 11xxx010
if ((cmd[0] & 0xC0) && (cmdsize == 3)) {
@@ -1182,14 +1182,14 @@ void annotateSeos(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
if (applyIso14443a(exp, size, cmd, cmdsize, false) != PM3_SUCCESS) {
// switch (cmd[0]) {
// default:
// default:
// break;
// };
// apply ISO7816 annotations?
// apply ISO7816 annotations?
// if (annotateIso7816(exp, size, cmd, cmdsize) == 0) {
// }
// apply SEOS annotations?
// apply SEOS annotations?
}
}
+3 -3
View File
@@ -420,7 +420,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
annotateCryptoRF(explanation, sizeof(explanation), frame, data_len);
break;
case SEOS:
annotateSeos(explanation, sizeof(explanation), frame, data_len);
annotateSeos(explanation, sizeof(explanation), frame, data_len);
break;
default:
break;
@@ -724,7 +724,7 @@ int CmdTraceList(const char *Cmd) {
"trace list -t mf -> interpret as " _YELLOW_("MIFARE Classic") " and decrypt crypto1 stream\n"
"trace list -t seos -> interpret as " _YELLOW_("SEOS") "\n"
"trace list -t thinfilm -> interpret as " _YELLOW_("Thinfilm") "\n"
"trace list -t topaz -> interpret as " _YELLOW_("Topaz") "\n"
"trace list -t topaz -> interpret as " _YELLOW_("Topaz") "\n"
"\n"
"trace list -t mf --dict <mfc_default_keys> -> use dictionary keys file\n"
"trace list -t 14a -f -> show frame delay times\n"
@@ -773,7 +773,7 @@ int CmdTraceList(const char *Cmd) {
uint8_t protocol = -1;
// validate type of output
if (strcmp(type, "14a") == 0) protocol = ISO_14443A;
if (strcmp(type, "14a") == 0) protocol = ISO_14443A;
else if (strcmp(type, "14b") == 0) protocol = ISO_14443B;
else if (strcmp(type, "15") == 0) protocol = ISO_15693;
else if (strcmp(type, "7816") == 0) protocol = ISO_7816_4;
+2 -2
View File
@@ -529,14 +529,14 @@ static int ndefDecodeMime_vcard(NDEFHeader_t *ndef) {
PrintAndLogEx(INFO, "");
PrintAndLogEx(INFO, "%.*s", (int)ndef->PayloadLen, ndef->Payload);
char *s = strstr((char*)ndef->Payload, "PHOTO");
char *s = strstr((char *)ndef->Payload, "PHOTO");
if (s) {
s = strtok(s, ";");
while (s) {
char *tmp = s;
if (strncmp(tmp, "ENCODING", 8) == 0) {
} else if (strncmp(tmp, "TYPE", 4) == 0) {
char *part = strtok(tmp + 4, ":");
while (part) {
+5 -5
View File
@@ -32,7 +32,7 @@
#if defined(HAVE_READLINE)
static char* rl_command_generator(const char *text, int state) {
static char *rl_command_generator(const char *text, int state) {
static int index;
static size_t len;
size_t rlen = strlen(rl_line_buffer);
@@ -48,14 +48,14 @@ static char* rl_command_generator(const char *text, int state) {
// When no pm3 device present
// and the command is not available offline,
// we skip it.
if ((g_session.pm3_present == false) && (vocabulory[index].offline == false )) {
if ((g_session.pm3_present == false) && (vocabulory[index].offline == false)) {
index++;
continue;
}
index++;
if (strncmp (command, rl_line_buffer, rlen) == 0) {
if (strncmp(command, rl_line_buffer, rlen) == 0) {
const char *next = command + (rlen - len);
const char *space = strstr(next, " ");
if (space != NULL) {
@@ -70,7 +70,7 @@ static char* rl_command_generator(const char *text, int state) {
static char **rl_command_completion(const char *text, int start, int end) {
rl_attempted_completion_over = 0;
return rl_completion_matches (text, rl_command_generator);
return rl_completion_matches(text, rl_command_generator);
}
#endif // HAVE_READLINE
@@ -94,7 +94,7 @@ static void sigint_handler(int signum) {
}
#endif
void pm3line_install_signals(void){
void pm3line_install_signals(void) {
# if defined(_WIN32)
// SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminate_handler, true);
# else
+1 -1
View File
@@ -21,7 +21,7 @@
void pm3line_init(void);
void pm3line_install_signals(void);
char *pm3line_read(const char* s);
char *pm3line_read(const char *s);
void pm3line_free(void *ref);
void pm3line_update_prompt(const char *prompt);
int pm3line_load_history(const char *path);
+1 -1
View File
@@ -177,7 +177,7 @@ void ProxGuiQT::_ShowBase64PictureWindow(char *b64) {
if (slen == 0)
return;
char *myb64data = (char *)calloc(slen + 1, sizeof(uint8_t));
char *myb64data = (char *)calloc(slen + 1, sizeof(uint8_t));
if (myb64data == NULL)
return;