mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
chg: 'hf iclass' textual
This commit is contained in:
parent
8103f8c7d0
commit
2b093f8059
1 changed files with 6 additions and 6 deletions
|
@ -608,8 +608,8 @@ int CmdHFiClassELoad(const char *Cmd) {
|
||||||
|
|
||||||
static int readKeyfile(const char *filename, size_t len, uint8_t* buffer) {
|
static int readKeyfile(const char *filename, size_t len, uint8_t* buffer) {
|
||||||
FILE *f = fopen(filename, "rb");
|
FILE *f = fopen(filename, "rb");
|
||||||
if(!f) {
|
if (!f) {
|
||||||
PrintAndLog("Failed to read from file '%s'", filename);
|
PrintAndLog("[!] Failed to read from file '%s'", filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fseek(f, 0, SEEK_END);
|
fseek(f, 0, SEEK_END);
|
||||||
|
@ -618,13 +618,13 @@ static int readKeyfile(const char *filename, size_t len, uint8_t* buffer) {
|
||||||
size_t bytes_read = fread(buffer, 1, len, f);
|
size_t bytes_read = fread(buffer, 1, len, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
if(fsize != len) {
|
if (fsize != len) {
|
||||||
PrintAndLog("Warning, file size is %d, expected %d", fsize, len);
|
PrintAndLog("[!] Warning, file size is %d, expected %d", fsize, len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bytes_read != len) {
|
if (bytes_read != len) {
|
||||||
PrintAndLog("Warning, could only read %d bytes, expected %d" ,bytes_read, len);
|
PrintAndLog("[!] Warning, could only read %d bytes, expected %d" ,bytes_read, len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue