clear tmp for burp

This commit is contained in:
Simon
2025-06-03 10:37:21 +00:00
parent 6b1746180f
commit e51de99853

View File

@@ -2,18 +2,29 @@ import pyautogui
import time
import os
import subprocess
import glob
BURP_JAR = "/headless/burpsuite_community.jar"
CONFIG_FILE = "/app/burp/project_options.json"
print("Waiting for vnc to start up...")
time.sleep(10)
print("Starting Burp Suite...")
burp_process = subprocess.Popen([
"java", "-jar", BURP_JAR,
f"--config-file={CONFIG_FILE}"
])
def start_burp():
for filepath in glob.glob('/tmp/burp*'):
try:
if os.path.isfile(filepath):
os.remove(filepath)
print(f"Deleted: {filepath}")
except Exception as e:
print(f"Error deleting {filepath}: {e}")
burp_process = subprocess.Popen([
"java", "-jar", BURP_JAR,
f"--config-file={CONFIG_FILE}"
])
return burp_process
print("Starting Burp Suite...")
burp_process = start_burp()
button = None
while True:
try:
@@ -62,9 +73,5 @@ while True:
time.sleep(60)
burp_process.terminate()
print("Starting Burp Suite...")
burp_process = subprocess.Popen([
"java", "-jar", BURP_JAR,
f"--config-file={CONFIG_FILE}"
])
button = None
burp_process = start_burp()