| |
- builtins.object
-
- WebShell
class WebShell(builtins.object) |
|
WebShell(type_: str = 'cgi', passphrase: str = '$HELL', pass_type: str = 'url')
This class implement a complete webshell with the default page,
webshell page, server type, access to webshell...
type: the type of server (should be "cgi" or "wsgi", default="cgi")
passphrase: your passphrase to get the webshell (default="$HELL")
pass_type: location for the passphrase (default=url):
"url" passphrase should be in "<servername>:<port><path><query string>",
"body" passphrase should be in content,
"arguments" passphrase should be in query string,
"header_value" passphrase should be a header value,
"method" request method should be the passphrase |
|
Methods defined here:
- __init__(self, type_: str = 'cgi', passphrase: str = '$HELL', pass_type: str = 'url')
- Initialize self. See help(type(self)) for accurate signature.
- execute_command(self) -> str
- This function execute command and return the output.
- get_access(self) -> bool
- This function return True if the passphrase
is in request or False.
- get_arguments(self) -> set
- This function return a set of arguments and define self.arguments.
- get_body(self) -> str
- This function return the body and set self.body.
- get_file(self) -> str
- This function send content file.
- get_headers(self) -> set
- This function return a set of headers and define self.headers.
- get_type_page(self) -> ~BinaryListOrNone
- This function define the request type: standard page,
command request, visit directory or WebShell page.
- get_url(self) -> str
- This function return the URL and set self.url.
- get_webshell_page(self) -> str
- This function return the WebShell page.
- run(self, environ: os._Environ = None, responder: collections.abc.Callable = None) -> ~BinaryListOrNone
- Run WebShell server.
- send_page(self) -> ~BinaryListOrNone
- This funtion send page.
- set_method(self) -> str
- This function return the request method and set self.method.
- standard_page(self, env: os._Environ = None, start_response: collections.abc.Callable = None) -> ~BinaryListOrNone
- Content of this function must be the default page or call it.
- try_decoding(self, data: bytes) -> str
- This function decode bytes and return it as html string.
- visit_directory(self) -> str
- This function list files and directory and return it.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |