projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CHG: changed output for the "hf mf nested" to show KEY: A or B instead of 0/1
[proxmark3-svn]
/
client
/
loclass
/
elite_crack.c
diff --git
a/client/loclass/elite_crack.c
b/client/loclass/elite_crack.c
index c824eaa188ed45c56fce156718c4dfeda90f5b19..2329e597d3f708a537b30a24e785c737607294c7 100644
(file)
--- a/
client/loclass/elite_crack.c
+++ b/
client/loclass/elite_crack.c
@@
-563,6
+563,12
@@
int bruteforceFile(const char *filename, uint16_t keytable[])
long fsize = ftell(f);
fseek(f, 0, SEEK_SET);
long fsize = ftell(f);
fseek(f, 0, SEEK_SET);
+ if (fsize < 0) {
+ prnlog("Error, when getting filesize");
+ fclose(f);
+ return 1;
+ }
+
uint8_t *dump = malloc(fsize);
size_t bytes_read = fread(dump, 1, fsize, f);
uint8_t *dump = malloc(fsize);
size_t bytes_read = fread(dump, 1, fsize, f);
@@
-571,7
+577,10
@@
int bruteforceFile(const char *filename, uint16_t keytable[])
{
prnlog("Error, could only read %d bytes (should be %d)",bytes_read, fsize );
}
{
prnlog("Error, could only read %d bytes (should be %d)",bytes_read, fsize );
}
- return bruteforceDump(dump,fsize,keytable);
+
+ uint8_t res = bruteforceDump(dump,fsize,keytable);
+ free(dump);
+ return res;
}
/**
*
}
/**
*
Impressum
,
Datenschutz