2017 © Pedro Peláez
 

yii2-extension yii2-webshell

A web shell that allows to run yii console commands and create your own commands.

image

samdark/yii2-webshell

A web shell that allows to run yii console commands and create your own commands.

  • Tuesday, June 13, 2017
  • by samdark
  • Repository
  • 34 Watchers
  • 193 Stars
  • 9,999 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 30 Forks
  • 5 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

Yii 2.0 web shell

Web shell allows to run yii console commands using a browser., (*1)

, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist samdark/yii2-webshell "~2.0"

or add, (*5)

"samdark/yii2-webshell": "~2.0"

to the require section of your composer.json file., (*6)

Configuration

To use web shell, include it as a module in the application configuration like the following:, (*7)

return [
    'modules' => [
        'webshell' => [
            'class' => 'samdark\webshell\Module',
            // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script
        ],
    ],

    // ... other application configuration
]

With the above configuration, you will be able to access web shell in your browser using the URL http://localhost/path/to/index.php?r=webshell, (*8)

Access control

By default access is restricted to local IPs. It could be changed via allowedIPs property. Additionally, checkAccessCallback is available to be able to introduce custom access control:, (*9)

return [
    'modules' => [
        'webshell' => [
            'class' => 'samdark\webshell\Module',
            // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script
            'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.2'],
            'checkAccessCallback' => function (\yii\base\Action $action) {
                // return true if access is granted or false otherwise
                return true;
            }
        ],
    ],

    // ... other application configuration
]

Limitations

Web shell is unable to work interactively because of request-response nature of web. Therefore you should disable interactive mode for commands., (*10)

The Versions

13/06 2017

dev-master

9999999-dev

A web shell that allows to run yii console commands and create your own commands.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 console shell webshell

04/03 2016

2.0.0

2.0.0.0

A web shell that allows to run yii console commands and create your own commands.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 console shell webshell

26/08 2015

1.0.1

1.0.1.0

A web shell that allows to run yii console commands and create your own commands.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 console shell webshell

07/08 2015

1.0.0

1.0.0.0

A web shell that allows to run yii console commands and create your own commands.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 console shell webshell