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

Method _Base__send_message

src/FlaskExploitProcessor.py:82–101  ·  view source on GitHub ↗
(self, message: str)

Source from the content-addressed store, hash-verified

80 @brief See base class for details.
81 """
82 def _Base__send_message(self, message: str):
83 url = f"{self.host}{self.path}"
84 if not self.host.startswith("http"):
85 url = "http://" + url
86 try:
87 response = requests.request(
88 self.method,
89 url,
90 headers={ f"{self.header}":
91 base64.b64encode(message.encode()).decode() }
92 )
93 if not response.ok:
94 raise Exception()
95 if not self.header in response.headers:
96 raise CommandException(
97 f"No message sent back from server, your exploit is "
98 f"probably being filtered by a firewall.")
99 return response.headers[self.header]
100 except:
101 raise CommandException(f"Message was not successfully processed.")
102
103 """
104 @brief See base class for details.

Callers 2

__evalMethod · 0.95

Calls 1

CommandExceptionClass · 0.85

Tested by

no test coverage detected