Advertisement
poys

Untitled

Dec 25th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.02 KB | None | 0 0
  1. <?php
  2. show_source(__FILE__);
  3. ?>
  4. <html>
  5. <tittle>Can you bypass it?</tittle>
  6. <from method="post" enctype="multipart/form-data">
  7. upload: <input type="file" name="p0tz">
  8. <input type="submit" value="upload" name="upload">
  9. </form>
  10. </html>
  11. <?php
  12. $upload_dir = "p0tz";
  13. $info = pathinfo($_FILES['p0tz']['name']);
  14. $file = getimagesize($_FILES['p0tz']['tmp_name']);
  15. if(isset($_POST['upload'])) {
  16.     if(($info['extension'] != ("jpg") && ($file['mime'] != "image/jpeg")) {
  17.         print "file .jpg cok !<br>";
  18.     } else {
  19.         if(!$file) {
  20.             print "Are you Sure This is Images? :D<br> I Smell backdoor here Bhahahahaha , you must try harder to bypass it :D<br>";
  21.         } else {
  22.             if(preg_match("/php|phtml|html|txt|aps|x/" , $info['extension'])) {
  23.                 die("Are You Sure This Images? :D<br> I smell backdoor here Bhahahahaha , you must try harder to bypass it :D<br>";
  24.             }
  25.             @copy($_FILES['p0tz']['tmp_name'], $upload_dir."/".$_FILES['p0tz']['name']);
  26.             print "(OK) Your File:  ".$upload_dir."/".$FILES['p0tz']['name']."<br>";
  27.         }
  28.     }
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement