Skip to content

Commit

Permalink
add web275
Browse files Browse the repository at this point in the history
  • Loading branch information
evilddog authored and pnck committed Dec 9, 2015
1 parent 0af963e commit e2cf353
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 1 deletion.
9 changes: 9 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash

while true
do
#echo "+-----------------------------------------------------------------+"
ls -al uploads/ > 33384bb51f3f987a7db3f0301a01a43f.log
mv uploads/*.png /root/test
sleep 2s
done
1 change: 0 additions & 1 deletion index.html

This file was deleted.

78 changes: 78 additions & 0 deletions uploads.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php

if (isset($_POST['upload'])){


$httpReferer = $_SERVER['HTTP_REFERER'];
$fileError = $_FILES["uploadfile"]["error"];
$fileName = $_FILES["uploadfile"]["name"];
$fileRename = md5( time() . $fileName ) . ".png";
$fileSize = $_FILES["uploadfile"]["size"];
$fileSudffix = substr(strrchr($fileRename, "."), 1);
$fileTempName = $_FILES["uploadfile"]["tmp_name"];
$fileType = $_FILES["uploadfile"]["type"];
$uploadDir = 'uploads/';
list($width, $height) = getimagesize($_FILES["uploadfile"]["tmp_name"]);

if($fileError > 0 ){
echo "Upload Error" . "<br/>";
}

if(strstr($fileName, "'")){
echo "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 23333";

}

if( $fileSudffix == "png"
&& $fileType == "image/png"
&& !($width == 64 && $height == 64)
&& $fileSize < 20*1024 ){


echo "Upload: " . $fileName . "<br/>";
echo "Type: " . $fileType . "<br/>";
echo "Size: " . ($fileSize / 1024) . "<br/>";
echo "Temp file: " . $fileTempName . "<br/>";


if (file_exists("uploads/" . $fileRename)){

echo $fileRename . " is exist." . "<br/>";

}else{


move_uploaded_file($fileTempName, "uploads/" . $fileRename);

echo "Stored in :" . "uploads/" . "renameBymd5.png" . "<br/>";

$newWidth = 64;
$newHeight = 64;

$newImage = imagecreatetruecolor($newWidth, $newHeight);

$imageIdentifier = imagecreatefrompng("uploads/" . $fileRename);

imagecopyresampled($newImage, $imageIdentifier, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);

imagepng($newImage, "uploads/" . $fileRename);

@include("uploads/" . $fileRename);

}

}else{

echo "Oops?! What are you doing???" . "<!-- H3i3 i5 n0 f1ag-->";
#echo "Upload: " . $fileRename . "<br/>";
#echo "Type: " . $fileType . "<br/>";
#echo "Size: " . ($fileSize / 1024) . "<br/>";
#echo "Temp file: " . $fileTempName . "<br/>";

}

}else{

header("Location: index.html");

}
Binary file added uploads/20fb33a13d42b2f03bae134d5cf2049a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/4498b16ae04baecf3d033b4d84324f17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/4a7748d22c314b089ce291fafb4087c6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/77d14b85cb5e7b5be4b52a9ea91b160c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/97626c89716856cf38a706dd7e13aa9e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/9b8d1cc05e6672af09cab905a6f4d77e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/a5aa1cc363106ba9f668650fba91a796.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/a9f02dce8cfc35b255e1d1030d0f04ff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/c2639124e42efe1ce6434983b5f996fe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/c30d18dd845484f73f450845716117b2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/dce4a3076f6695333e539e8dcafbdd52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e2cf353

Please sign in to comment.