mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
chg: unify dump file template used in this repo. hf-mf-(uid)-dump.(bin/eml/json) is the prefeered style.
This commit is contained in:
parent
dd3bd72af4
commit
64e027faf7
5 changed files with 15 additions and 15 deletions
|
@ -898,7 +898,7 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
|
|||
return PM3_EMALLOC;
|
||||
}
|
||||
strcat(fptr, "hf-iclass-");
|
||||
FillFileNameByUID(fptr, hdr->csn, "-data-decrypted", sizeof(hdr->csn));
|
||||
FillFileNameByUID(fptr, hdr->csn, "-dump-decrypted", sizeof(hdr->csn));
|
||||
|
||||
saveFile(fptr, ".bin", decrypted, decryptedlen);
|
||||
saveFileEML(fptr, decrypted, decryptedlen, 8);
|
||||
|
@ -1361,7 +1361,7 @@ static int CmdHFiClassReader_Dump(const char *Cmd) {
|
|||
if (filename[0] == 0) {
|
||||
//Use the first block (CSN) for filename
|
||||
strcat(filename, "hf-iclass-");
|
||||
FillFileNameByUID(filename, tag_data, "-data", 8);
|
||||
FillFileNameByUID(filename, tag_data, "-dump", 8);
|
||||
}
|
||||
|
||||
// save the dump to .bin file
|
||||
|
|
|
@ -300,15 +300,15 @@ static int usage_hf14_restore(void) {
|
|||
PrintAndLogEx(NORMAL, "Usage: hf mf restore [card memory] u <UID> k <name> f <name>");
|
||||
PrintAndLogEx(NORMAL, "Options:");
|
||||
PrintAndLogEx(NORMAL, " [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
|
||||
PrintAndLogEx(NORMAL, " u <UID> : uid, try to restore from hf-mf-<UID>-key.bin and hf-mf-<UID>-data.bin");
|
||||
PrintAndLogEx(NORMAL, " u <UID> : uid, try to restore from hf-mf-<UID>-key.bin and hf-mf-<UID>-dump.bin");
|
||||
PrintAndLogEx(NORMAL, " k <name> : key filename, specific the full filename of key file");
|
||||
PrintAndLogEx(NORMAL, " f <name> : data filename, specific the full filename of data file");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore -- read the UID from tag first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 1 u 12345678 -- restore from hf-mf-12345678-key.bin and hf-mf-12345678-data.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 1 u 12345678 k dumpkey.bin -- restore from dumpkey.bin and hf-mf-12345678-data.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 4 -- read the UID from tag with 4K memory first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore -- read the UID from tag first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-dump.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 1 u 12345678 -- restore from hf-mf-12345678-key.bin and hf-mf-12345678-dump.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 1 u 12345678 k dumpkey.bin -- restore from dumpkey.bin and hf-mf-12345678-dump.bin");
|
||||
PrintAndLogEx(NORMAL, " hf mf restore 4 -- read the UID from tag with 4K memory first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-dump.bin");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
static int usage_hf14_decryptbytes(void) {
|
||||
|
@ -1064,7 +1064,7 @@ static int CmdHF14AMfDump(const char *Cmd) {
|
|||
PrintAndLogEx(SUCCESS, "\nSucceeded in dumping all blocks");
|
||||
|
||||
if (strlen(dataFilename) < 1) {
|
||||
fptr = GenerateFilename("hf-mf-", "-data");
|
||||
fptr = GenerateFilename("hf-mf-", "-dump");
|
||||
if (fptr == NULL)
|
||||
return PM3_ESOFT;
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ static int CmdHF14AMfRestore(const char *Cmd) {
|
|||
if (keyFilename[0] == 0x00)
|
||||
snprintf(keyFilename, FILE_PATH_SIZE, "hf-mf-%s-key.bin", szTemp);
|
||||
if (dataFilename[0] == 0x00)
|
||||
snprintf(dataFilename, FILE_PATH_SIZE, "hf-mf-%s-data.bin", szTemp);
|
||||
snprintf(dataFilename, FILE_PATH_SIZE, "hf-mf-%s-dump.bin", szTemp);
|
||||
cmdp += 2;
|
||||
break;
|
||||
case 'k':
|
||||
|
@ -1161,7 +1161,7 @@ static int CmdHF14AMfRestore(const char *Cmd) {
|
|||
fclose(fkeys);
|
||||
|
||||
if (dataFilename[0] == 0x00) {
|
||||
fptr = GenerateFilename("hf-mf-", "-data.bin");
|
||||
fptr = GenerateFilename("hf-mf-", "-dump.bin");
|
||||
if (fptr == NULL)
|
||||
return 1;
|
||||
|
||||
|
@ -2507,7 +2507,7 @@ all_found:
|
|||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
fnameptr = GenerateFilename("hf-mf-", "-data");
|
||||
fnameptr = GenerateFilename("hf-mf-", "-dump");
|
||||
if (fnameptr == NULL) {
|
||||
free(dump);
|
||||
free(e_sector);
|
||||
|
|
|
@ -1349,7 +1349,7 @@ static int CmdEM4x05Dump(const char *Cmd) {
|
|||
// saveFileEML will add .eml extension to filename
|
||||
// saveFile (binary) passes in the .bin extension.
|
||||
if (strcmp(preferredName, "") == 0) // Set default filename, if not set by user
|
||||
sprintf(preferredName, "lf-4x05-%08X-data", BSWAP_32(data[1]));
|
||||
sprintf(preferredName, "lf-4x05-%08X-dump", BSWAP_32(data[1]));
|
||||
|
||||
saveFileEML(preferredName, (uint8_t *)data, 16 * sizeof(uint32_t), sizeof(uint32_t));
|
||||
saveFile(preferredName, ".bin", data, sizeof(data));
|
||||
|
|
|
@ -202,7 +202,7 @@ static int usage_t55xx_restore() {
|
|||
PrintAndLogEx(NORMAL, _YELLOW_(" Assumes lf t55 detect has been run first!"));
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "Examples:");
|
||||
PrintAndLogEx(NORMAL, " lf t55xx restore f lf-t55xx-00148040-data.bin");
|
||||
PrintAndLogEx(NORMAL, " lf t55xx restore f lf-t55xx-00148040-dump.bin");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
@ -2315,7 +2315,7 @@ static int CmdT55xxDump(const char *Cmd) {
|
|||
else
|
||||
break;
|
||||
}
|
||||
strcat(preferredName, "-data");
|
||||
strcat(preferredName, "-dump");
|
||||
}
|
||||
|
||||
// Swap endian so the files match the txt display
|
||||
|
|
|
@ -115,7 +115,7 @@ local function dump_tag(uid, numsectors)
|
|||
|
||||
if utils.confirm('Do you wish to create a memory dump of tag?') then
|
||||
|
||||
local dumpfile = 'hf-mf-'..uid..'-data'
|
||||
local dumpfile = 'hf-mf-'..uid..'-dump'
|
||||
|
||||
local dmp = ('hf mf dump %s f %s'):format(typ, dumpfile)
|
||||
core.console(dmp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue