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

Method _Base__rm

src/PHPExploitProcessor.py:271–283  ·  view source on GitHub ↗
(self, options: str)

Source from the content-addressed store, hash-verified

269 raise CommandException(f"Could not upload file.")
270
271 def _Base__rm(self, options: str):
272 out = self.__eval(f"$out='File does not exist.';"
273 f"if(file_exists('{options}')){{"
274 f"$out='Done.';"
275 f"if(is_dir('{options}')){{"
276 f"if(!rmdir('{options}')){{"
277 f"$out='Not empty';}}"
278 f"}}else{{if(!unlink('{options}')){{"
279 f"$out='Could not delete';}}}}"
280 f"}}"
281 f"header('{self.header}: ' . "
282 f"$out);")
283 print(out)
284
285 def _Base__mkdir(self, options: str):
286 out = self.__eval(f"$out='Already exists.';"

Callers

nothing calls this directly

Calls 1

__evalMethod · 0.95

Tested by

no test coverage detected