mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
incognito: make sure prefs file is not loaded/saved in any circumstances
This commit is contained in:
parent
12fd83b5a1
commit
8fbe3b4463
1 changed files with 10 additions and 3 deletions
|
@ -79,6 +79,11 @@ int preferences_load(void) {
|
||||||
setDefaultPath (spTrace, ".");
|
setDefaultPath (spTrace, ".");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (session.incognito) {
|
||||||
|
PrintAndLogEx(INFO, "No preferences file will be loaded");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// loadFileJson wants these, so pass in place holder values, though not used
|
// loadFileJson wants these, so pass in place holder values, though not used
|
||||||
// in settings load;
|
// in settings load;
|
||||||
uint8_t dummyData = 0x00;
|
uint8_t dummyData = 0x00;
|
||||||
|
@ -101,7 +106,10 @@ int preferences_load(void) {
|
||||||
// Save all settings from memory (struct) to file
|
// Save all settings from memory (struct) to file
|
||||||
int preferences_save(void) {
|
int preferences_save(void) {
|
||||||
// Note sure if backup has value ?
|
// Note sure if backup has value ?
|
||||||
|
if (session.incognito) {
|
||||||
|
PrintAndLogEx(INFO, "No preferences file will be saved");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
PrintAndLogEx(INFO, "Saving preferences...");
|
PrintAndLogEx(INFO, "Saving preferences...");
|
||||||
|
|
||||||
char *fn = prefGetFilename();
|
char *fn = prefGetFilename();
|
||||||
|
@ -986,8 +994,7 @@ static int CmdPrefShow(const char *Cmd) {
|
||||||
PrintAndLogEx(INFO, "Using "_YELLOW_("%s"), fn);
|
PrintAndLogEx(INFO, "Using "_YELLOW_("%s"), fn);
|
||||||
free(fn);
|
free(fn);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(ERR, "Preferences not loaded");
|
PrintAndLogEx(WARNING, "Preferences file not loaded");
|
||||||
return PM3_ESOFT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Current settings");
|
PrintAndLogEx(INFO, "Current settings");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue