mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-05 07:36:14 +08:00
CHG: syntax suger
This commit is contained in:
parent
9a6bc2feb4
commit
db289ea7d7
1 changed files with 4 additions and 4 deletions
|
@ -199,7 +199,6 @@ int usage_hf_iclass_snoop(void){
|
||||||
PrintAndLog(" hf iclass snoop");
|
PrintAndLog(" hf iclass snoop");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int xorbits_8(uint8_t val) {
|
int xorbits_8(uint8_t val) {
|
||||||
uint8_t res = val ^ (val >> 1); //1st pass
|
uint8_t res = val ^ (val >> 1); //1st pass
|
||||||
res = res ^ (res >> 1); // 2nd pass
|
res = res ^ (res >> 1); // 2nd pass
|
||||||
|
@ -473,13 +472,14 @@ int CmdHFiClassDecrypt(const char *Cmd) {
|
||||||
uint8_t key[16] = { 0 };
|
uint8_t key[16] = { 0 };
|
||||||
if(readKeyfile("iclass_decryptionkey.bin", 16, key)) return usage_hf_iclass_decrypt();
|
if(readKeyfile("iclass_decryptionkey.bin", 16, key)) return usage_hf_iclass_decrypt();
|
||||||
|
|
||||||
PrintAndLog("Decryption file found...");
|
PrintAndLog("Decryption key loaded from file [ok]");
|
||||||
|
|
||||||
//Open the tagdump-file
|
//Open the tagdump-file
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char filename[FILE_PATH_SIZE];
|
char filename[FILE_PATH_SIZE];
|
||||||
if(opt == 'f' && param_getstr(Cmd, 1, filename) > 0) {
|
if(opt == 'f' && param_getstr(Cmd, 1, filename) > 0) {
|
||||||
if ( (f = fopen(filename, "rb")) == NULL) {
|
f = fopen(filename, "rb");
|
||||||
|
if (!f) {
|
||||||
PrintAndLog("Could not find file %s", filename);
|
PrintAndLog("Could not find file %s", filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1577,7 +1577,7 @@ static int loadKeys(char *filename) {
|
||||||
static int saveKeys(char *filename) {
|
static int saveKeys(char *filename) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
f = fopen(filename,"wb");
|
f = fopen(filename,"wb");
|
||||||
if (f == NULL) {
|
if (!f) {
|
||||||
printf("error opening file %s\n",filename);
|
printf("error opening file %s\n",filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue