<htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1.0"><title>FileMaster!!</title></head><body><h1>FILEMaster(</h1><formaction="/"method="get"><labelfor="file">æ¥çæ件:</label><inputtype="text"name="filename"><inputtype="submit"value="æ¥è¯¢"></form><formaction="/"method="post"enctype="multipart/form-data"><labelfor="file">ä¸ä¼æ件:</label><inputtype="file"name="file"id="file"><br><inputtype="submit"name="submit"value="ä¸ä¼ "></div><div><?phpsession_start();if(isset($_GET['filename'])){echofile_get_contents($_GET['filename']);}elseif(isset($_FILES['file']['name'])){$whtie_list=array("image/jpeg");$filetype=$_FILES["file"]["type"];if(in_array($filetype,$whtie_list)){$img_info=@getimagesize($_FILES["file"]["tmp_name"]);if($img_info){if($img_info[0]<=20&&$img_info[1]<=20){if(!is_dir("upload/".session_id())){mkdir("upload/".session_id());}$save_path="upload/".session_id()."/".$_FILES["file"]["name"];move_uploaded_file($_FILES["file"]["tmp_name"],$save_path);$content=file_get_contents($save_path);if(preg_match("/php/i",$content)){sleep(5);@unlink($save_path);die("hacker!!!");}else{echo"upload success!! upload/your_sessionid/your_filename";}}else{die("image hight and width must less than 20");}}else{die("invalid file head");}}else{die("invalid file type!image/jpeg only!!");}}else{echo'<img src="data:jpg;base64,'.base64_encode(file_get_contents("welcome.jpg")).'">';}?></div></body></html>