added support to wipe data directory on exit
This commit is contained in:
parent
567af997d7
commit
8e5152a14e
5 changed files with 63 additions and 67 deletions
|
@ -63,6 +63,8 @@ from onionrblocks.deleteplaintext import delete_plaintext_no_blacklist # noqa
|
|||
setup.setup_config()
|
||||
|
||||
import config # noqa
|
||||
import filenuke
|
||||
from utils import identifyhome
|
||||
|
||||
if config.get('advanced.security_auditing', True):
|
||||
try:
|
||||
|
@ -84,6 +86,11 @@ def onionr_main():
|
|||
if ran_as_script:
|
||||
onionr_main()
|
||||
|
||||
# Wipe Onionr data directory if security level calls for it
|
||||
config.reload()
|
||||
if config.get('general.security_level', 1) >= 2:
|
||||
filenuke.nuke.clean_tree(identifyhome.identify_home())
|
||||
|
||||
# Cleanup standard out/err because Python refuses to do it itsself
|
||||
try:
|
||||
sys.stderr.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue