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

Method _Base__mkdir

src/NodeExploitProcessor.py:301–318  ·  view source on GitHub ↗
(self, options: str)

Source from the content-addressed store, hash-verified

299 @brief See base class for details.
300 """
301 def _Base__mkdir(self, options: str):
302 if len(options) == 0:
303 raise CommandException("Specify a path/folder name.")
304 out = self.__eval(
305 f"try{{"
306 f"if(fs.existsSync('{options}')){{"
307 f"r.setHeader('{self.header}',"
308 f"'Already exists.');"
309 f"}}else{{"
310 f"fs.mkdirSync('{options}',"
311 f"{{recursive:true}});"
312 f"r.setHeader('{self.header}', 'Done.');"
313 f"}}"
314 f"}}catch(e){{"
315 f"r.setHeader('{self.header}','Error.');"
316 f"}}"
317 f"r.end();")
318 print(out)

Callers

nothing calls this directly

Calls 2

__evalMethod · 0.95
CommandExceptionClass · 0.85

Tested by

no test coverage detected