diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..782bd59 --- /dev/null +++ b/clean.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +while true +do + #echo "+-----------------------------------------------------------------+" + ls -al uploads/ > 33384bb51f3f987a7db3f0301a01a43f.log + mv uploads/*.png /root/test + sleep 2s +done diff --git a/index.html b/index.html deleted file mode 100644 index 6824ea8..0000000 --- a/index.html +++ /dev/null @@ -1 +0,0 @@ -I am explorer. diff --git a/uploads.php b/uploads.php new file mode 100644 index 0000000..f9090e0 --- /dev/null +++ b/uploads.php @@ -0,0 +1,78 @@ + 0 ){ + echo "Upload Error" . "
"; + } + + 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 . "
"; + echo "Type: " . $fileType . "
"; + echo "Size: " . ($fileSize / 1024) . "
"; + echo "Temp file: " . $fileTempName . "
"; + + + if (file_exists("uploads/" . $fileRename)){ + + echo $fileRename . " is exist." . "
"; + + }else{ + + + move_uploaded_file($fileTempName, "uploads/" . $fileRename); + + echo "Stored in :" . "uploads/" . "renameBymd5.png" . "
"; + + $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???" . ""; + #echo "Upload: " . $fileRename . "
"; + #echo "Type: " . $fileType . "
"; + #echo "Size: " . ($fileSize / 1024) . "
"; + #echo "Temp file: " . $fileTempName . "
"; + + } + + }else{ + + header("Location: index.html"); + + } diff --git a/uploads/20fb33a13d42b2f03bae134d5cf2049a.png b/uploads/20fb33a13d42b2f03bae134d5cf2049a.png new file mode 100644 index 0000000..816f8c4 Binary files /dev/null and b/uploads/20fb33a13d42b2f03bae134d5cf2049a.png differ diff --git a/uploads/4498b16ae04baecf3d033b4d84324f17.png b/uploads/4498b16ae04baecf3d033b4d84324f17.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/4498b16ae04baecf3d033b4d84324f17.png differ diff --git a/uploads/4a7748d22c314b089ce291fafb4087c6.png b/uploads/4a7748d22c314b089ce291fafb4087c6.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/4a7748d22c314b089ce291fafb4087c6.png differ diff --git a/uploads/77d14b85cb5e7b5be4b52a9ea91b160c.png b/uploads/77d14b85cb5e7b5be4b52a9ea91b160c.png new file mode 100644 index 0000000..816f8c4 Binary files /dev/null and b/uploads/77d14b85cb5e7b5be4b52a9ea91b160c.png differ diff --git a/uploads/97626c89716856cf38a706dd7e13aa9e.png b/uploads/97626c89716856cf38a706dd7e13aa9e.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/97626c89716856cf38a706dd7e13aa9e.png differ diff --git a/uploads/9b8d1cc05e6672af09cab905a6f4d77e.png b/uploads/9b8d1cc05e6672af09cab905a6f4d77e.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/9b8d1cc05e6672af09cab905a6f4d77e.png differ diff --git a/uploads/a5aa1cc363106ba9f668650fba91a796.png b/uploads/a5aa1cc363106ba9f668650fba91a796.png new file mode 100644 index 0000000..816f8c4 Binary files /dev/null and b/uploads/a5aa1cc363106ba9f668650fba91a796.png differ diff --git a/uploads/a9f02dce8cfc35b255e1d1030d0f04ff.png b/uploads/a9f02dce8cfc35b255e1d1030d0f04ff.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/a9f02dce8cfc35b255e1d1030d0f04ff.png differ diff --git a/uploads/c2639124e42efe1ce6434983b5f996fe.png b/uploads/c2639124e42efe1ce6434983b5f996fe.png new file mode 100644 index 0000000..21bf237 Binary files /dev/null and b/uploads/c2639124e42efe1ce6434983b5f996fe.png differ diff --git a/uploads/c30d18dd845484f73f450845716117b2.png b/uploads/c30d18dd845484f73f450845716117b2.png new file mode 100644 index 0000000..816f8c4 Binary files /dev/null and b/uploads/c30d18dd845484f73f450845716117b2.png differ diff --git a/uploads/dce4a3076f6695333e539e8dcafbdd52.png b/uploads/dce4a3076f6695333e539e8dcafbdd52.png new file mode 100644 index 0000000..a16e949 Binary files /dev/null and b/uploads/dce4a3076f6695333e539e8dcafbdd52.png differ