Skip to content

Commit

Permalink
headless mode for virtualbox vm (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham authored Dec 19, 2018
1 parent 3304f38 commit e47dea7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion DynamicAnalyzer/views/android/virtualbox_vm.py
Original file line number Diff line number Diff line change
@@ -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"""
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion MobSF/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
VM_IP = '192.168.56.101'
VM_ADB_PORT = 5555
VM_TIMEOUT = 100
VBOX_HEADLESS = False
#==============================================

#--------------------------
Expand Down Expand Up @@ -451,4 +452,4 @@

#================VirtualBox Settings============
VBOX = utils.FindVbox(False)
#===============================================
#===============================================

0 comments on commit e47dea7

Please sign in to comment.