Created
October 19, 2015 22:03
-
-
Save Frankity/5ac9c583091480d6ca18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/text"); | |
$key = "FUCKYOU"; | |
$uploadhost = "http://yolarrydabomb.net/i/"; | |
$redirect = "http://yolarrydabomb.net/i/pizza.html"; | |
date_default_timezone_set('EST'); | |
$Date = date("Ymd-"); | |
$filenamelength = 4; | |
if ($_SERVER["REQUEST_URI"] == "/robot.txt") { die("User-agent: *\nDisallow: /"); } | |
if (isset($_POST['key'])) { | |
if ($_POST['key'] == $key) { | |
$target = getcwd() . "/" . basename($_FILES['file']['name']); | |
if (move_uploaded_file($_FILES['file']['tmp_name'], $target)) { | |
$md5 = md5_file(getcwd() . "/" . basename($_FILES['file']['name'])); | |
rename(getcwd() . "/" . basename($_FILES['file']['name']), getcwd() . "/" . $Date . $md5 . "." . end(explode(".", $_FILES["file"]["name"]))); | |
echo $uploadhost . $Date . $md5 . "." . end(explode(".", $_FILES["file"]["name"])); | |
} else { | |
echo "Sorry, there was a problem uploading your file."; | |
} | |
} else { | |
header('Location: '.$redirect); | |
} | |
} else { | |
header('Location: '.$redirect); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment