HOME


sh-3ll 1.0
DIR:/usr/local/softaculous/iwx/enduser/
Upload File :
Current File : //usr/local/softaculous/iwx/enduser/index.php
<?php

//////////////////////////////////////////////////////////////
//===========================================================
// index.php
//===========================================================
// SOFTACULOUS 
// Version : 1.1
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Alons
// Date:       10th Jan 2009
// Time:       21:00 hrs
// Site:       http://www.softaculous.com/ (SOFTACULOUS)
// ----------------------------------------------------------
// Please Read the Terms of use at http://www.softaculous.com
// ----------------------------------------------------------
//===========================================================
// (c)Softaculous Inc.
//===========================================================
//////////////////////////////////////////////////////////////

@define('SOFTACULOUS', 1);

include_once(dirname(__FILE__).'/universal.php');

if(file_exists($globals['path'].'/conf/universal.json') && is_readable($globals['path'].'/conf/universal.json') && (filesize($globals['path'].'/conf/universal.json') > 0)){
	
	$secure_file = @file_get_contents($globals['path'].'/conf/universal.json');
	
	if(empty($secure_file)){
		die('Failed to load universal.json');
	}
	
	$secure_val = json_decode($secure_file, true);
	if(is_array($secure_val)){
		$globals = array_merge($globals, $secure_val);
	}
}

// this needs to be done before stepping down
if(empty($globals['dbpass_len'])){
	$nodeworx_settings = @shell_exec("nodeworx -u -o json -c Settings -a queryEdit 2>/dev/null");
	$data = json_decode($nodeworx_settings,true);
	
	$GLOBALS['iwx_db_pass_len'] = (!empty($data['iworx.passwords_length']) ? $data['iworx.passwords_length'] : 0);
}

$orig_gid = getenv('soft_egid');
$orig_uid = getenv('soft_euid');
posix_setgid($orig_gid);
posix_setuid($orig_uid);
putenv('soft_egid');
putenv('soft_euid');

// Still Root ?
if(posix_getuid() == 0 || posix_geteuid() == 0){
	echo 'ERROR IN SHIFTING TO USER LEVEL';exit(1);
}

include_once('inc.php');