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 time
import os import os
import subprocess import subprocess
import glob
BURP_JAR = "/headless/burpsuite_community.jar" BURP_JAR = "/headless/burpsuite_community.jar"
CONFIG_FILE = "/app/burp/project_options.json" CONFIG_FILE = "/app/burp/project_options.json"
print("Waiting for vnc to start up...") def start_burp():
time.sleep(10)
print("Starting Burp Suite...") for filepath in glob.glob('/tmp/burp*'):
burp_process = subprocess.Popen([ try:
"java", "-jar", BURP_JAR, if os.path.isfile(filepath):
f"--config-file={CONFIG_FILE}" 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 button = None
while True: while True:
try: try:
@@ -62,9 +73,5 @@ while True:
time.sleep(60) time.sleep(60)
burp_process.terminate() burp_process.terminate()
print("Starting Burp Suite...") print("Starting Burp Suite...")
burp_process = subprocess.Popen([ burp_process = start_burp()
"java", "-jar", BURP_JAR,
f"--config-file={CONFIG_FILE}"
])
button = None