PHP 8.3.31
Preview: _clone.php Size: 4.15 KB
/proc/self/root/proc/self/root/proc/thread-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);
}

?>

Directory Contents

Dirs: 7 × Files: 19

Name Size Perms Modified Actions
images DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
php53 DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
php56 DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
php71 DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
php81 DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
php82 DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
upgrade DIR
- drwxr-xr-x 2026-06-24 17:49:26
Edit Download
293 B lrw-r--r-- 2026-06-24 08:18:24
Edit Download
7.98 KB lrw-r--r-- 2026-06-24 12:06:18
Edit Download
3.79 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
433 B lrw-r--r-- 2021-12-23 11:54:36
Edit Download
9.10 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
240 B lrw-r--r-- 2025-11-12 09:12:00
Edit Download
20.89 MB lrw-r--r-- 2026-06-24 12:06:18
Edit Download
2.44 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
3.98 KB lrw-r--r-- 2026-06-24 12:06:18
Edit Download
924 B lrw-r--r-- 2021-12-23 11:54:36
Edit Download
8.42 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
926 B lrw-r--r-- 2021-12-23 11:54:36
Edit Download
2.16 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
1.05 KB lrw-r--r-- 2026-06-24 12:06:18
Edit Download
541 B lrw-r--r-- 2021-12-23 11:54:36
Edit Download
5.94 KB lrw-r--r-- 2026-06-24 12:40:32
Edit Download
687 B lrw-r--r-- 2026-06-24 08:18:24
Edit Download
64 B lrw-r--r-- 2026-06-24 12:06:18
Edit Download
4.15 KB lrw-r--r-- 2026-06-24 08:18:24
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).