{"id":13411043,"url":"https://github.com/samdark/yii2-webshell","last_synced_at":"2025-10-07T14:44:01.419Z","repository":{"id":16051928,"uuid":"18795986","full_name":"samdark/yii2-webshell","owner":"samdark","description":"Web shell allows to run yii console commands using a browser","archived":false,"fork":false,"pushed_at":"2019-05-23T15:45:40.000Z","size":44,"stargazers_count":226,"open_issues_count":5,"forks_count":36,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-28T19:12:34.163Z","etag":null,"topics":["shell","web-shell","yii2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samdark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"samdark","patreon":"samdark"}},"created_at":"2014-04-15T10:22:31.000Z","updated_at":"2025-03-15T20:59:01.000Z","dependencies_parsed_at":"2022-07-13T13:10:30.154Z","dependency_job_id":null,"html_url":"https://github.com/samdark/yii2-webshell","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdark%2Fyii2-webshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdark%2Fyii2-webshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdark%2Fyii2-webshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdark%2Fyii2-webshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdark","download_url":"https://codeload.github.com/samdark/yii2-webshell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242683,"owners_count":20907134,"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":["shell","web-shell","yii2"],"created_at":"2024-07-30T20:01:11.049Z","updated_at":"2025-10-07T14:44:01.336Z","avatar_url":"https://github.com/samdark.png","language":"PHP","funding_links":["https://github.com/sponsors/samdark","https://patreon.com/samdark"],"categories":["\u003ca id=\"bad06ceb38098c26b1b8b46104f98d25\"\u003e\u003c/a\u003ewebshell","PHP","Module 模块","\u003ca id=\"faa91844951d2c29b7b571c6e8a3eb54\"\u003e\u003c/a\u003e新添加"],"sub_categories":["\u003ca id=\"faa91844951d2c29b7b571c6e8a3eb54\"\u003e\u003c/a\u003e未分类-webshell"],"readme":"Yii 2.0 web shell\n=================\n\nWeb shell allows to run `yii` console commands using a browser.\n\n\u003cimg src=\"screenshot.png\" /\u003e\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist samdark/yii2-webshell \"~2.0\"\n```\n\nor add\n\n```\n\"samdark/yii2-webshell\": \"~2.0\"\n```\n\nto the require section of your `composer.json` file.\n\n\nConfiguration\n-------------\n\nTo use web shell, include it as a module in the application configuration like the following:\n \n```php\nreturn [\n    'modules' =\u003e [\n        'webshell' =\u003e [\n            'class' =\u003e 'samdark\\webshell\\Module',\n            // 'yiiScript' =\u003e Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script\n        ],\n    ],\n\n    // ... other application configuration\n]\n```\n\nWith the above configuration, you will be able to access web shell in your browser using\nthe URL `http://localhost/path/to/index.php?r=webshell`\n\nAccess control\n--------------\n\nBy default access is restricted to local IPs. It could be changed via `allowedIPs` property. Additionally,\n`checkAccessCallback` is available to be able to introduce custom access control:\n\n```php\nreturn [\n    'modules' =\u003e [\n        'webshell' =\u003e [\n            'class' =\u003e 'samdark\\webshell\\Module',\n            // 'yiiScript' =\u003e Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script\n            'allowedIPs' =\u003e ['127.0.0.1', '::1', '192.168.0.2'],\n            'checkAccessCallback' =\u003e function (\\yii\\base\\Action $action) {\n                // return true if access is granted or false otherwise\n                return true;\n            }\n        ],\n    ],\n\n    // ... other application configuration\n]\n```\n\nLimitations\n-----------\n\nWeb shell is unable to work interactively because of request-response nature of web. Therefore you should disable interactive mode for commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdark%2Fyii2-webshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdark%2Fyii2-webshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdark%2Fyii2-webshell/lists"}