ZerethShell
File Manager
SQL Manager
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
var
/
softaculous
/
grav
_clone.php
<?php ////////////////////////////////////////////////////////////// //=========================================================== // clone.php //=========================================================== // SOFTACULOUS // Version : 4.2.8 // 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. //=========================================================== ////////////////////////////////////////////////////////////// if(!defined('SOFTACULOUS')){ die('Hacking Attempt'); } //The Install process function __clone(){ global $__settings, $error, $software, $globals, $replace_data, $source_data; //Do we meet the Minimum software requirements __requirements(); if(!empty($error)){ return false; } $temp = parse_url($source_data['softurl']); $source_data['relativeurl'] = $temp['path']; // $file = sfile($__settings['softpath'].'/user/config/security.yaml'); if(empty($file)){ $error[] = 'Could not read the required file.'; return false; } soft_preg_replace('/salt:(\s*?)(.*?)\n/is', $file, $salt, 2); $__settings['salt'] = __generateRandomString(14); if(!empty($salt)){ $replace_data[$salt] = $__settings['salt']; } sclone_replace($replace_data, $__settings['softpath'].'/user/config/security.yaml', true); if(sfile_exists($__settings['softpath'].'/.htaccess')){ // If the installation is on root domain we need to change the below relative URL if(is_dom_root($source_data['softpath'])){ $replace_data['RewriteBase \'/\''] = 'RewriteBase \''.$__settings['relativeurl'].'\''; $replace_data['RewriteBase /'] = 'RewriteBase '.$__settings['relativeurl']; }elseif(is_dom_root($__settings['softpath'])){ $replace_data['RewriteBase \''.$source_data['relativeurl'].'\''] = 'RewriteBase \'/\''; $replace_data['RewriteBase '.$source_data['relativeurl']] = 'RewriteBase /'; } sclone_replace($replace_data, $__settings['softpath'].'/.htaccess', true); } srm($__settings['softpath'].'/cache/'); smkdir($__settings['softpath'].'/cache/', $globals['odc']); swrite($__settings['softpath'].'/cache/.gitkeep', "", 1); @schmod($__settings['softpath'].'/cache/', $globals['odc'], 1); @schmod($__settings['softpath'].'/images/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/data/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/accounts/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/pages/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/themes/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/plugins/', $globals['odc'], 1); @schmod($__settings['softpath'].'/logs/', $globals['odc'], 1); @schmod($__settings['softpath'].'/tmp/', $globals['odc'], 1); @schmod($__settings['softpath'].'/backup/', $globals['odc']); @schmod($__settings['softpath'].'/bin/', $globals['odc'], 1); @schmod($__settings['softpath'].'/user/config/site.yaml', $globals['ofc']); @schmod($__settings['softpath'].'/user/config/media.yaml', $globals['ofc']); @schmod($__settings['softpath'].'/user/config/streams.yaml', $globals['ofc']); @schmod($__settings['softpath'].'/user/config/system.yaml', $globals['ofc']); @schmod($__settings['softpath'].'/user/config/themes/', $globals['odc']); @schmod($__settings['softpath'].'/user/config/scheduler.yaml', $globals['ofc']); @schmod($__settings['softpath'].'/user/config/backups.yaml', $globals['ofc']); } //Check whether the Minimum Software configuration matches function __requirements(){ global $__settings, $error, $software, $globals; return true; } /** * Generate a random string of a given length * * @param int $length * * @return string */ function __generateRandomString($length = 5) { return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); } ?>
Kaydet
Vazgeç