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

Method _Base__send_message

src/NodeExploitProcessor.py:38–56  ·  view source on GitHub ↗
(self, message: str)

Source from the content-addressed store, hash-verified

36 @brief See base class for details.
37 """
38 def _Base__send_message(self, message: str):
39 url = f"{self.host}{self.path}"
40 if not self.host.startswith("http"):
41 url = "http://" + url
42 try:
43 response = requests.request(
44 self.method,
45 url,
46 headers={ f"{self.header}": message }
47 )
48 if not response.ok:
49 raise Exception()
50 if not self.header in response.headers:
51 raise CommandException(
52 f"No message sent back from server, your exploit is "
53 f"probably being filtered by a firewall.")
54 return response.headers[self.header]
55 except:
56 raise CommandException(f"Message was not successfully processed.")
57
58 """
59 @brief Run a command on the target machine, and return its output as a

Callers 2

__evalMethod · 0.95

Calls 1

CommandExceptionClass · 0.85

Tested by

no test coverage detected