make style

This commit is contained in:
Philippe Teuwen 2020-11-07 01:32:43 +01:00
commit f63cf02178
12 changed files with 109 additions and 109 deletions

View file

@ -541,7 +541,7 @@ void EPA_PACE_Replay(PacketCommandNG *c) {
int EPA_Setup(void) { int EPA_Setup(void) {
#ifdef WITH_ISO14443a #ifdef WITH_ISO14443a
{ {
// first, look for type A cards // first, look for type A cards
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
// power up the field // power up the field
@ -562,10 +562,10 @@ int EPA_Setup(void) {
iso_type = 'a'; iso_type = 'a';
return 0; return 0;
} }
} }
#endif #endif
#ifdef WITH_ISO14443b #ifdef WITH_ISO14443b
{ {
// if we're here, there is no type A card, so we look for type B // if we're here, there is no type A card, so we look for type B
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
// power up the field // power up the field
@ -578,7 +578,7 @@ int EPA_Setup(void) {
iso_type = 'b'; iso_type = 'b';
return 0; return 0;
} }
} }
#endif #endif
Dbprintf("No card found"); Dbprintf("No card found");
return 1; return 1;

View file

@ -443,7 +443,7 @@ int printDemodBuff(uint8_t offset, bool strip_leading, bool invert, bool print_h
if (print_hex) { if (print_hex) {
buf = (DemodBuffer + offset); buf = (DemodBuffer + offset);
char hex[512] = {0x00}; char hex[512] = {0x00};
int num_bits = binarraytohex(hex, sizeof(hex), (char*)buf, len); int num_bits = binarraytohex(hex, sizeof(hex), (char *)buf, len);
if (num_bits == 0) { if (num_bits == 0) {
return PM3_ESOFT; return PM3_ESOFT;
} }

View file

@ -1851,7 +1851,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
PrintAndLogEx(WARNING, "ATS may be corrupted. Length of ATS (%d bytes incl. 2 Bytes CRC) doesn't match TL", card.ats_len); PrintAndLogEx(WARNING, "ATS may be corrupted. Length of ATS (%d bytes incl. 2 Bytes CRC) doesn't match TL", card.ats_len);
} }
PrintAndLogEx(SUCCESS, "ATS: " _YELLOW_("%s")"[ %02x %02x ]", sprint_hex(card.ats, card.ats_len - 2), card.ats[card.ats_len - 1], card.ats[card.ats_len] ); PrintAndLogEx(SUCCESS, "ATS: " _YELLOW_("%s")"[ %02x %02x ]", sprint_hex(card.ats, card.ats_len - 2), card.ats[card.ats_len - 1], card.ats[card.ats_len]);
PrintAndLogEx(INFO, " " _YELLOW_("%02x") "............... TL length is " _GREEN_("%d") " bytes", card.ats[0], card.ats[0]); PrintAndLogEx(INFO, " " _YELLOW_("%02x") "............... TL length is " _GREEN_("%d") " bytes", card.ats[0], card.ats[0]);
if (card.ats[0] > 1) { // there is a format byte (T0) if (card.ats[0] > 1) { // there is a format byte (T0)
@ -1923,7 +1923,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
tip[0] = '\0'; tip[0] = '\0';
if (card.ats[0] - pos >= 7) { if (card.ats[0] - pos >= 7) {
snprintf(tip, sizeof(tip)," "); snprintf(tip, sizeof(tip), " ");
if ((card.sak & 0x70) == 0x40) { // and no GetVersion().. if ((card.sak & 0x70) == 0x40) { // and no GetVersion()..

View file

@ -349,7 +349,7 @@ typedef struct {
static int CmdHelp(const char *Cmd); static int CmdHelp(const char *Cmd);
static const char *getEncryptionAlgoStr(uint8_t algo) { static const char *getEncryptionAlgoStr(uint8_t algo) {
switch(algo) { switch (algo) {
case MFDES_ALGO_AES : case MFDES_ALGO_AES :
return "AES"; return "AES";
case MFDES_ALGO_3DES : case MFDES_ALGO_3DES :

View file

@ -137,7 +137,7 @@ int demodHID(bool verbose) {
} }
wiegand_message_t packed = initialize_message_object(hi2, hi, lo); wiegand_message_t packed = initialize_message_object(hi2, hi, lo);
if ( HIDTryUnpack(&packed, false) == false) { if (HIDTryUnpack(&packed, false) == false) {
PrintAndLogEx(INFO, "raw: " _GREEN_("%08x%08x%08x"), hi2, hi, lo); PrintAndLogEx(INFO, "raw: " _GREEN_("%08x%08x%08x"), hi2, hi, lo);
printDemodBuff(0, false, false, true); printDemodBuff(0, false, false, true);
} }

View file

@ -410,27 +410,27 @@ Check column "offline" for their availability.
|command |offline |description |command |offline |description
|------- |------- |----------- |------- |------- |-----------
|`hf mfdes help `|Y |`This help` |`hf mfdes help `|Y |`This help`
|`hf mfdes auth `|N |`Tries a MIFARE DesFire Authentication`
|`hf mfdes changekey `|N |`Change Key`
|`hf mfdes chk `|N |`Check keys`
|`hf mfdes enum `|N |`Tries enumerate all applications`
|`hf mfdes formatpicc `|N |`Format PICC`
|`hf mfdes getuid `|N |`Get random uid`
|`hf mfdes info `|N |`Tag information` |`hf mfdes info `|N |`Tag information`
|`hf mfdes list `|Y |`List DESFire (ISO 14443A) history` |`hf mfdes list `|Y |`List DESFire (ISO 14443A) history`
|`hf mfdes enum `|N |`Tries enumerate all applications`
|`hf mfdes auth `|N |`Tries a MIFARE DesFire Authentication`
|`hf mfdes getuid `|N |`Get random uid`
|`hf mfdes selectaid `|N |`Select Application ID`
|`hf mfdes createaid `|N |`Create Application ID` |`hf mfdes createaid `|N |`Create Application ID`
|`hf mfdes deleteaid `|N |`Delete Application ID` |`hf mfdes deleteaid `|N |`Delete Application ID`
|`hf mfdes selectaid `|N |`Select Application ID`
|`hf mfdes changevalue `|N |`Write value of a value file (credit/debit/clear)`
|`hf mfdes clearfile `|N |`Clear record File`
|`hf mfdes createfile `|N |`Create Standard/Backup File` |`hf mfdes createfile `|N |`Create Standard/Backup File`
|`hf mfdes createvaluefile`|N |`Create Value File` |`hf mfdes createvaluefile`|N |`Create Value File`
|`hf mfdes createrecordfile`|N |`Create Linear/Cyclic Record File` |`hf mfdes createrecordfile`|N |`Create Linear/Cyclic Record File`
|`hf mfdes deletefile `|N |`Create Delete File` |`hf mfdes deletefile `|N |`Create Delete File`
|`hf mfdes clearfile `|N |`Clear record File` |`hf mfdes dump `|N |`Dump all files`
|`hf mfdes getvalue `|N |`Get value of file`
|`hf mfdes readdata `|N |`Read data from standard/backup/record file` |`hf mfdes readdata `|N |`Read data from standard/backup/record file`
|`hf mfdes writedata `|N |`Write data to standard/backup/record file` |`hf mfdes writedata `|N |`Write data to standard/backup/record file`
|`hf mfdes getvalue `|N |`Get value of file`
|`hf mfdes changevalue `|N |`Write value of a value file (credit/debit/clear)`
|`hf mfdes changekey `|N |`Change Key`
|`hf mfdes formatpicc `|N |`Format PICC`
|`hf mfdes dump `|N |`Dump all files`
|`hf mfdes chk `|N |`Check keys`
### hf st ### hf st