diff --git a/DynamicAnalyzer/views/android/virtualbox_vm.py b/DynamicAnalyzer/views/android/virtualbox_vm.py index 88c17ebe01..c2229458f1 100755 --- a/DynamicAnalyzer/views/android/virtualbox_vm.py +++ b/DynamicAnalyzer/views/android/virtualbox_vm.py @@ -1,7 +1,7 @@ import time import subprocess from MobSF.utils import PrintException - +from django.conf import settings def refresh_vm(uuid, snapshot_uuid, vbox_exe): """Refresh VirtualBox based VMs""" @@ -20,6 +20,8 @@ def refresh_vm(uuid, snapshot_uuid, vbox_exe): print("\n[INFO] VM Restore Snapshot") # Start Fresh VM args = [vbox_exe, 'startvm', uuid] + if settings.VBOX_HEADLESS: + args += ['--type', 'headless'] subprocess.call(args) print("\n[INFO] VM Starting") except: diff --git a/MobSF/settings.py b/MobSF/settings.py index 9a280ed00f..ac7aaa4ff4 100755 --- a/MobSF/settings.py +++ b/MobSF/settings.py @@ -387,6 +387,7 @@ VM_IP = '192.168.56.101' VM_ADB_PORT = 5555 VM_TIMEOUT = 100 + VBOX_HEADLESS = False #============================================== #-------------------------- @@ -451,4 +452,4 @@ #================VirtualBox Settings============ VBOX = utils.FindVbox(False) -#=============================================== +#=============================================== \ No newline at end of file