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
Exibir arquivo
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
Protected Methods
Method Details
beforeAction()
public method
checkAccess()
protected method
protected checkAccess ( Action $action ) : boolean |
$action |
yii\base\Action |
|
return |
boolean |
whether the module can be accessed by the current user |
Property Details
$allowedIPs public_oe 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.
$checkAccessCallback public_oe 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)
public $checkAccessCallback |
$controllerNamespace public_oe property
public $controllerNamespace |
$greetings public_oe property
$quitUrl public_oe property
URL to use for quit command. If not set, quit command will do nothing.
$yiiScript public_oe property