mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
whitespace
This commit is contained in:
parent
bccad7b9d5
commit
f805e5c7c7
4 changed files with 33 additions and 33 deletions
|
@ -117,7 +117,7 @@ void initSampleBufferEx(uint32_t *sample_size, bool use_malloc) {
|
|||
|
||||
if (use_malloc) {
|
||||
|
||||
if (sample_size == NULL || *sample_size == 0 ) {
|
||||
if (sample_size == NULL || *sample_size == 0) {
|
||||
*sample_size = BigBuf_max_traceLen();
|
||||
data.buffer = BigBuf_get_addr();
|
||||
} else {
|
||||
|
@ -127,7 +127,7 @@ void initSampleBufferEx(uint32_t *sample_size, bool use_malloc) {
|
|||
}
|
||||
|
||||
} else {
|
||||
if (sample_size == NULL || *sample_size == 0 ) {
|
||||
if (sample_size == NULL || *sample_size == 0) {
|
||||
*sample_size = BigBuf_max_traceLen();
|
||||
}
|
||||
data.buffer = BigBuf_get_addr();
|
||||
|
|
|
@ -400,8 +400,8 @@ static int CmdFlashMemSpiFFSLoad(const char *Cmd) {
|
|||
cmdp += 2;
|
||||
break;
|
||||
case 'o':
|
||||
param_getstr(Cmd, cmdp + 1, (char*)destfilename, 32);
|
||||
if (strlen((char*)destfilename) == 0) {
|
||||
param_getstr(Cmd, cmdp + 1, (char *)destfilename, 32);
|
||||
if (strlen((char *)destfilename) == 0) {
|
||||
PrintAndLogEx(FAILED, "Destination Filename missing or invalid");
|
||||
errors = true;
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ static int CmdFlashMemSpiFFSLoad(const char *Cmd) {
|
|||
|
||||
free(data);
|
||||
|
||||
if ( res == PM3_SUCCESS )
|
||||
if (res == PM3_SUCCESS)
|
||||
PrintAndLogEx(SUCCESS, "Wrote "_GREEN_("%zu") "bytes to file "_GREEN_("%s"), datalen, destfilename);
|
||||
|
||||
return res;
|
||||
|
|
|
@ -897,30 +897,30 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
|
|||
|
||||
|
||||
// decode block 6
|
||||
if (memcmp(decrypted + (8*6), empty, 8) != 0 ) {
|
||||
if (memcmp(decrypted + (8 * 6), empty, 8) != 0) {
|
||||
if (use_sc) {
|
||||
DecodeBlock6(decrypted + (8*6));
|
||||
DecodeBlock6(decrypted + (8 * 6));
|
||||
}
|
||||
}
|
||||
|
||||
// decode block 7-8-9
|
||||
if (memcmp(decrypted + (8*7), empty, 8) != 0 ) {
|
||||
if (memcmp(decrypted + (8 * 7), empty, 8) != 0) {
|
||||
|
||||
//todo: remove preamble/sentinal
|
||||
|
||||
uint32_t top = 0, mid, bot;
|
||||
mid = bytes_to_num(decrypted + (8*7), 4);
|
||||
bot = bytes_to_num(decrypted + (8*7) + 4, 4);
|
||||
mid = bytes_to_num(decrypted + (8 * 7), 4);
|
||||
bot = bytes_to_num(decrypted + (8 * 7) + 4, 4);
|
||||
|
||||
PrintAndLogEx(INFO, "Block 7 binary");
|
||||
|
||||
char hexstr[8+1] = {0};
|
||||
hex_to_buffer((uint8_t *)hexstr, decrypted + (8*7), 8, sizeof(hexstr) - 1, 0, 0, true);
|
||||
char hexstr[8 + 1] = {0};
|
||||
hex_to_buffer((uint8_t *)hexstr, decrypted + (8 * 7), 8, sizeof(hexstr) - 1, 0, 0, true);
|
||||
|
||||
char binstr[8*8+1] = {0};
|
||||
char binstr[8 * 8 + 1] = {0};
|
||||
hextobinstring(binstr, hexstr);
|
||||
uint8_t i=0;
|
||||
while (i<strlen(binstr) && binstr[i++] == '0');
|
||||
uint8_t i = 0;
|
||||
while (i < strlen(binstr) && binstr[i++] == '0');
|
||||
|
||||
PrintAndLogEx(SUCCESS, "%s", binstr + i);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue