mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
Reverted to original malicious CSNs from paper, it appears legit readers does not accept if they dont end with F7,FF,12,E0
This commit is contained in:
parent
b160432340
commit
6116c79618
3 changed files with 33 additions and 14 deletions
|
@ -18,7 +18,7 @@ int fileExists(const char *filename) {
|
|||
|
||||
int saveFile(const char *preferredName, const char *suffix, const void* data, size_t datalen)
|
||||
{
|
||||
int size = sizeof(char) * (strlen(preferredName)+strlen(suffix)+5);
|
||||
int size = sizeof(char) * (strlen(preferredName)+strlen(suffix)+10);
|
||||
char * fileName = malloc(size);
|
||||
|
||||
memset(fileName,0,size);
|
||||
|
@ -34,13 +34,14 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
|
|||
/*Opening file for writing in binary mode*/
|
||||
FILE *fileHandle=fopen(fileName,"wb");
|
||||
if(!fileHandle) {
|
||||
prnlog("Failed to write to file '%s'", fileName);
|
||||
PrintAndLog("Failed to write to file '%s'", fileName);
|
||||
free(fileName);
|
||||
return 1;
|
||||
}
|
||||
fwrite(data, 1, datalen, fileHandle);
|
||||
fclose(fileHandle);
|
||||
prnlog("Saved data to '%s'", fileName);
|
||||
PrintAndLog(">Saved data to '%s'", fileName);
|
||||
|
||||
free(fileName);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue