mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-14 03:03:14 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
e406dd5cc9
1 changed files with 13 additions and 10 deletions
|
@ -1200,9 +1200,9 @@ int CmdHF14AMfELoad(const char *Cmd)
|
|||
|
||||
len = param_getstr(Cmd,nameParamNo,filename);
|
||||
|
||||
if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;
|
||||
if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;
|
||||
|
||||
fnameptr += len-4;
|
||||
fnameptr += len;
|
||||
|
||||
sprintf(fnameptr, ".eml");
|
||||
|
||||
|
@ -1299,19 +1299,22 @@ int CmdHF14AMfESave(const char *Cmd)
|
|||
|
||||
len = param_getstr(Cmd,nameParamNo,filename);
|
||||
|
||||
if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;
|
||||
if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;
|
||||
|
||||
// user supplied filename?
|
||||
if (len < 1) {
|
||||
// get filename (UID from memory)
|
||||
if (mfEmlGetMem(buf, 0, 1)) {
|
||||
PrintAndLog("Can\'t get UID from block: %d", 0);
|
||||
sprintf(filename, "dump.eml");
|
||||
len = sprintf(fnameptr, "dump");
|
||||
fnameptr += len;
|
||||
}
|
||||
else {
|
||||
for (j = 0; j < 7; j++, fnameptr += 2)
|
||||
sprintf(fnameptr, "%02X", buf[j]);
|
||||
}
|
||||
for (j = 0; j < 7; j++, fnameptr += 2)
|
||||
sprintf(fnameptr, "%02X", buf[j]);
|
||||
} else {
|
||||
fnameptr += len-4;
|
||||
fnameptr += len;
|
||||
}
|
||||
|
||||
// add file extension
|
||||
|
@ -1572,10 +1575,10 @@ int CmdHF14AMfCLoad(const char *Cmd)
|
|||
return 0;
|
||||
} else {
|
||||
len = strlen(Cmd);
|
||||
if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;
|
||||
if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;
|
||||
|
||||
memcpy(filename, Cmd, len);
|
||||
fnameptr += len-4;
|
||||
fnameptr += len;
|
||||
|
||||
sprintf(fnameptr, ".eml");
|
||||
|
||||
|
@ -1741,7 +1744,7 @@ int CmdHF14AMfCSave(const char *Cmd) {
|
|||
return 0;
|
||||
} else {
|
||||
len = strlen(Cmd);
|
||||
if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;
|
||||
if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;
|
||||
|
||||
if (len < 1) {
|
||||
// get filename
|
||||
|
|
Loading…
Reference in a new issue