PHP Class samdark\webshell\Module

To use web shell, include it as a module in the application configuration like the following: ~~~ return [ 'modules' => [ 'webshell' => ['class' => 'samdark\webshell\Module'], ], ] ~~~ 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
Author: Alexander Makarov ([email protected])
Inheritance: extends yii\base\Module
Show file Open project: samdark/yii2-webshell

Public Properties

Property Type Description
$allowedIPs the list of IPs that are allowed to access this module. Each array element represents a single IP filter which can be either an IP address or an address with wildcard (e.g. 192.168.0.*) to represent a network segment. The default value is ['127.0.0.1', '::1'], which means the module can only be accessed by localhost.
$checkAccessCallback A valid PHP callback that returns true if user is allowed to use web shell and false otherwise The signature is the following: function (Action $action)
$controllerNamespace
$greetings console greetings
$quitUrl URL to use for quit command. If not set, quit command will do nothing.
$yiiScript path to yii script

Public Methods

Method Description
beforeAction ( $action )
init ( )

Protected Methods

Method Description
checkAccess ( Action $action ) : boolean

Method Details

beforeAction() public method

public beforeAction ( $action )

checkAccess() protected method

protected checkAccess ( Action $action ) : boolean
$action yii\base\Action
return boolean whether the module can be accessed by the current user

init() public method

public init ( )

Property Details

$allowedIPs public property

the list of IPs that are allowed to access this module. Each array element represents a single IP filter which can be either an IP address or an address with wildcard (e.g. 192.168.0.*) to represent a network segment. The default value is ['127.0.0.1', '::1'], which means the module can only be accessed by localhost.
public $allowedIPs

$checkAccessCallback public property

A valid PHP callback that returns true if user is allowed to use web shell and false otherwise The signature is the following: function (Action $action)
Since: 2.0.0
public $checkAccessCallback

$controllerNamespace public property

public $controllerNamespace

$greetings public property

console greetings
public $greetings

$quitUrl public property

URL to use for quit command. If not set, quit command will do nothing.
public $quitUrl

$yiiScript public property

path to yii script
public $yiiScript