From 08d7b09e05fc1587d941da774fc9cf87e38a0b2e Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 3 Jun 2025 10:31:19 +0000 Subject: [PATCH] update start script --- burp/start_burp.py | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/burp/start_burp.py b/burp/start_burp.py index 5488e7f..fc37d03 100644 --- a/burp/start_burp.py +++ b/burp/start_burp.py @@ -14,28 +14,48 @@ burp_process = subprocess.Popen([ f"--config-file={CONFIG_FILE}" ]) +button = None while True: - button = pyautogui.locateCenterOnScreen("/app/burp/next_button.png", confidence=0.8) + try: + button = pyautogui.locateCenterOnScreen("/app/burp/next_button.png", confidence=0.8) + except: + pass if button: print("Clicking on the 'Next' button...") pyautogui.click(button) + button = None - button = pyautogui.locateCenterOnScreen("/app/burp/start_burp.png", confidence=0.8) + try: + button = pyautogui.locateCenterOnScreen("/app/burp/start_burp.png", confidence=0.8) + except: + pass if button: print("Clicking on the 'Start Burp' button...") pyautogui.click(button) - - button = pyautogui.locateCenterOnScreen("/app/burp/accept.png", confidence=0.8) + button = None + + try: + button = pyautogui.locateCenterOnScreen("/app/burp/accept.png", confidence=0.8) + except: + pass if button: print("Clicking on the 'Accept' button...") pyautogui.click(button) + button = None - button = pyautogui.locateCenterOnScreen("/app/burp/proxy.png", confidence=0.8) + try: + button = pyautogui.locateCenterOnScreen("/app/burp/proxy.png", confidence=0.8) + except: + pass if button: print("Clicking on the 'Proxy' button...") pyautogui.click(button) + button = None - button = pyautogui.locateCenterOnScreen("/app/burp/http_history.png", confidence=0.8) + try: + button = pyautogui.locateCenterOnScreen("/app/burp/http_history.png", confidence=0.8) + except: + pass if button: print("Clicking on the 'HTTP History' button...") pyautogui.click(button) @@ -46,4 +66,5 @@ while True: "java", "-jar", BURP_JAR, f"--config-file={CONFIG_FILE}" ]) + button = None