$ nmap -sC -sV 10.10.11.135 Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-23 14:06 CST Nmap scan report for 10.10.11.135 Host is up (0.076s latency). Not shown: 998 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048 d2:5c:40:d7:c9:fe:ff:a8:83:c3:6e:cd:60:11:d2:eb (RSA) | 256 18:c9:f7:b9:27:36:a1:16:59:23:35:84:34:31:b3:ad (ECDSA) |_ 256 a2:2d:ee:db:4e:bf:f9:3f:8b:d4:cf:b4:12:d8:20:f2 (ED25519) 80/tcp open http Apache httpd 2.4.29 ((Ubuntu)) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-server-header: Apache/2.4.29 (Ubuntu) | http-title: Simple WebApp |_Requested resource was ./login.php Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 30.47 seconds
if (isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if ($check === false) { $error = "Invalid file"; } }
// Check if file already exists if (file_exists($target_file)) { $error = "Sorry, file already exists."; }
if ($imageFileType != "jpg") { $error = "This extension is not allowed."; }
if (empty($error)) { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo"The file has been uploaded."; } else { echo"Error: There was an error uploading your file."; } } else { echo"Error: " . $error; } ?>
admin_auth_check.php
1 2 3 4 5 6 7 8 9 10 11
<?php
include_once"auth_check.php";
if (!isset($_SESSION['role']) || $_SESSION['role'] != 1) { echo"No permission to access this panel!"; header('Location: ./index.php'); die(); }