Bitcoin Forum
May 13, 2024, 08:43:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bots wasting server resources  (Read 616 times)
allexyame (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
September 12, 2016, 09:15:27 PM
 #1

I set up some mechanisms to minimize the action of bots (Anti-Bot Links and htaccess block), but they continue to attack my faucets intensely, consuming much of the server resources. Is there any real way to prevent them from accessing my faucets?
1715632997
Hero Member
*
Offline Offline

Posts: 1715632997

View Profile Personal Message (Offline)

Ignore
1715632997
Reply with quote  #2

1715632997
Report to moderator
1715632997
Hero Member
*
Offline Offline

Posts: 1715632997

View Profile Personal Message (Offline)

Ignore
1715632997
Reply with quote  #2

1715632997
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715632997
Hero Member
*
Offline Offline

Posts: 1715632997

View Profile Personal Message (Offline)

Ignore
1715632997
Reply with quote  #2

1715632997
Report to moderator
1715632997
Hero Member
*
Offline Offline

Posts: 1715632997

View Profile Personal Message (Offline)

Ignore
1715632997
Reply with quote  #2

1715632997
Report to moderator
1715632997
Hero Member
*
Offline Offline

Posts: 1715632997

View Profile Personal Message (Offline)

Ignore
1715632997
Reply with quote  #2

1715632997
Report to moderator
btc junkie
Sr. Member
****
Offline Offline

Activity: 265
Merit: 250


View Profile
September 13, 2016, 03:42:53 AM
 #2

you can stop them from using your faucet but it isn't practical to stop them from visiting your website
awesome31312
Hero Member
*****
Offline Offline

Activity: 826
Merit: 504


View Profile
September 13, 2016, 04:15:18 AM
 #3

By attack, are you referring to DDoS attacks? Cloudfare would be nice, not even humans can solve that captcha. Everybody will be locked out of your site, problem solved!

Jokes, but seriously, consider it.

Account recovered 08-12-2019
zenitzz
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500


View Profile
September 13, 2016, 05:39:23 AM
 #4

I set up some mechanisms to minimize the action of bots (Anti-Bot Links and htaccess block), but they continue to attack my faucets intensely, consuming much of the server resources. Is there any real way to prevent them from accessing my faucets?
If anti-bot not working you can banned their ip address it will help you for a while but find other way to blocking their to not attack your site.
~Bitcoin~
Legendary
*
Offline Offline

Activity: 994
Merit: 1000



View Profile
September 13, 2016, 10:27:30 AM
 #5

Cloudflare provide free DDOS protection with few guide you can add it to your site and they are capable to handle small amount of traffic attack (DDOS). Other option could be blocking the known IPs of VPN providers, as most of the bots relied on VPN traffic.

elson
Full Member
***
Offline Offline

Activity: 180
Merit: 100


View Profile
September 13, 2016, 10:46:21 AM
 #6

Search for anti proxy APIs on the internet !!


You will find good soulutions.
Its like cloudflare you have to pay for best protection ;-)
Or you make your own faucet script.

tomos81
Hero Member
*****
Offline Offline

Activity: 910
Merit: 504


Enterapp Pre-Sale Live - bit.ly/3UrMCWI


View Profile
September 13, 2016, 02:12:09 PM
 #7

Search for anti proxy APIs on the internet !!


You will find good soulutions.
Its like cloudflare you have to pay for best protection ;-)
Or you make your own faucet script.



try to edit index.php in the  /templates/template-name/ folder on your webserver, at the total beginning put this:

<?php
$proxy_headers = array(
        'HTTP_VIA',
        'HTTP_X_FORWARDED_FOR',
        'HTTP_FORWARDED_FOR',
        'HTTP_X_FORWARDED',
        'HTTP_FORWARDED',
        'HTTP_CLIENT_IP',
        'HTTP_FORWARDED_FOR_IP',
        'VIA',
        'X_FORWARDED_FOR',
        'FORWARDED_FOR',
        'X_FORWARDED',
        'FORWARDED',
        'CLIENT_IP',
        'FORWARDED_FOR_IP',
        'HTTP_PROXY_CONNECTION'
    );
    foreach($proxy_headers as $x){
        if (isset($_SERVER[$x])) die("You are using a proxy!");
    }
?>
<?php
$ports = array(8080,80,81,1080,6588,8000,3128,553,554,4480);
    foreach($ports as $port) {
         if (@fsockopen($_SERVER['REMOTE_ADDR'], $port, $errno, $errstr, 30)) {
              die("You are using a proxy!");
         }
     }
?>
<?php
if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1))
die("It appears you're using a proxy, No proxy allowed here!");
function checkProxy($ip){
$contactEmail="EMAIL@mail.email";
$timeout=3;
$banOnProability=0.99;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, "http[Suspicious link removed]c($ch);
curl_close($ch);
if ($response > $banOnProability) {
return true;
} else {
if ($response < 0 || strcmp($response, "") == 0 ) {
//The server returned an error, you might want to do something
//like write to a log file or email yourself
//This could be true due to an invalid input or you've exceeded
//the number of allowed queries. Figure out why this is happening
//because you aren't protected by the system anymore
//Leaving this section blank is dangerous because you assume
//that you're still protected, which is incorrect
//and you might think GetIPIntel isn't accurate anymore
//which is also incorrect.
//failure to implement error handling is bad for the both of us
}
return false;
}}
$ip=$_SERVER['REMOTE_ADDR'];
if (checkProxy($ip)) {
echo "It appears you're using a proxy, No proxy allowed here! <br />";
}
?>





and on the root edit .htaccess file in public_html folder (its hidden file, check for showing hidden files)   - add these lines:


# block proxy servers from site access
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]




hope it helps

i stopped huge bot attacks by 90-100%

█████████████████████
█████████████████████████
█████████▀▀▀▀▀▀▀█████████
██████▀███████████▀██████
█████▀███▄▄▄▄▄▄▄███▀█████
████████▀▀▀▀▀▀▀▀▀████████
█████████████████████████
█████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█████
█████████████████████████
██████▄███████████▄██████
█████████▄▄▄▄▄▄▄█████████
█████████████████████████
█████████████████████
 
    CRYPTO WEBNEOBANK    
▄▄███████▄▄
▄███████████████▄
▄██████░░░░░░░░░░███▄
▄████▄▄███████▄▄░░░██▄
▄█████████████████░░░██▄
████░░▄▄▄▄▄▄▄▄▄░░░░░░░░██
████░░██████████░░░░░░░██
████░░▀▀▀▀▀▀▀▀▀░░░░░░░░██
▀█████████████████░░░██▀
▀████▀▀███████▀▀░░░██▀
▀██████░░░░░░░░░░███▀
▀███████████████▀
▀▀███████▀▀
catcatcatcaty
Full Member
***
Offline Offline

Activity: 152
Merit: 100


View Profile
September 13, 2016, 06:27:05 PM
 #8

Search for anti proxy APIs on the internet !!


You will find good soulutions.
Its like cloudflare you have to pay for best protection ;-)
Or you make your own faucet script.



try to edit index.php in the  /templates/template-name/ folder on your webserver, at the total beginning put this:

<?php
$proxy_headers = array(
        'HTTP_VIA',
        'HTTP_X_FORWARDED_FOR',
        'HTTP_FORWARDED_FOR',
        'HTTP_X_FORWARDED',
        'HTTP_FORWARDED',
        'HTTP_CLIENT_IP',
        'HTTP_FORWARDED_FOR_IP',
        'VIA',
        'X_FORWARDED_FOR',
        'FORWARDED_FOR',
        'X_FORWARDED',
        'FORWARDED',
        'CLIENT_IP',
        'FORWARDED_FOR_IP',
        'HTTP_PROXY_CONNECTION'
    );
    foreach($proxy_headers as $x){
        if (isset($_SERVER[$x])) die("You are using a proxy!");
    }
?>
<?php
$ports = array(8080,80,81,1080,6588,8000,3128,553,554,4480);
    foreach($ports as $port) {
         if (@fsockopen($_SERVER['REMOTE_ADDR'], $port, $errno, $errstr, 30)) {
              die("You are using a proxy!");
         }
     }
?>
<?php
if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1))
die("It appears you're using a proxy, No proxy allowed here!");
function checkProxy($ip){
$contactEmail="EMAIL@mail.email";
$timeout=3;
$banOnProability=0.99;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, "http[Suspicious link removed]c($ch);
curl_close($ch);
if ($response > $banOnProability) {
return true;
} else {
if ($response < 0 || strcmp($response, "") == 0 ) {
//The server returned an error, you might want to do something
//like write to a log file or email yourself
//This could be true due to an invalid input or you've exceeded
//the number of allowed queries. Figure out why this is happening
//because you aren't protected by the system anymore
//Leaving this section blank is dangerous because you assume
//that you're still protected, which is incorrect
//and you might think GetIPIntel isn't accurate anymore
//which is also incorrect.
//failure to implement error handling is bad for the both of us
}
return false;
}}
$ip=$_SERVER['REMOTE_ADDR'];
if (checkProxy($ip)) {
echo "It appears you're using a proxy, No proxy allowed here! <br />";
}
?>





and on the root edit .htaccess file in public_html folder (its hidden file, check for showing hidden files)   - add these lines:


# block proxy servers from site access
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]




hope it helps

i stopped huge bot attacks by 90-100%

yes it does! i have used similar script on my faucet for a while now. bots = -~75%
socks435
Legendary
*
Offline Offline

Activity: 2016
Merit: 1030

Privacy is always important


View Profile
September 13, 2016, 07:00:08 PM
 #9

Honestly if you are giving those script here publicity they can make a new counter part that can be still claim in your site.. many bots outside in this forum are always releasing and  many professional are making more bots  new script.. they are not doing multiple tabs with the easy to captcha and multiple address.. so i think better to find a new script or block some countries like russian to visit your site.. better to track who is your enemy.. try also cloudflare for ddos attack..

Solving blocks can't be solved without my rigs.
tomos81
Hero Member
*****
Offline Offline

Activity: 910
Merit: 504


Enterapp Pre-Sale Live - bit.ly/3UrMCWI


View Profile
September 13, 2016, 07:11:31 PM
 #10

Honestly if you are giving those script here publicity they can make a new counter part that can be still claim in your site.. many bots outside in this forum are always releasing and  many professional are making more bots  new script.. they are not doing multiple tabs with the easy to captcha and multiple address.. so i think better to find a new script or block some countries like russian to visit your site.. better to track who is your enemy.. try also cloudflare for ddos attack..


this part of code is google-able in few seconds , so this is not a secret piece of code Smiley

█████████████████████
█████████████████████████
█████████▀▀▀▀▀▀▀█████████
██████▀███████████▀██████
█████▀███▄▄▄▄▄▄▄███▀█████
████████▀▀▀▀▀▀▀▀▀████████
█████████████████████████
█████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█████
█████████████████████████
██████▄███████████▄██████
█████████▄▄▄▄▄▄▄█████████
█████████████████████████
█████████████████████
 
    CRYPTO WEBNEOBANK    
▄▄███████▄▄
▄███████████████▄
▄██████░░░░░░░░░░███▄
▄████▄▄███████▄▄░░░██▄
▄█████████████████░░░██▄
████░░▄▄▄▄▄▄▄▄▄░░░░░░░░██
████░░██████████░░░░░░░██
████░░▀▀▀▀▀▀▀▀▀░░░░░░░░██
▀█████████████████░░░██▀
▀████▀▀███████▀▀░░░██▀
▀██████░░░░░░░░░░███▀
▀███████████████▀
▀▀███████▀▀
btc junkie
Sr. Member
****
Offline Offline

Activity: 265
Merit: 250


View Profile
September 14, 2016, 04:14:29 AM
 #11

Honestly if you are giving those script here publicity they can make a new counter part that can be still claim in your site.. many bots outside in this forum are always releasing and  many professional are making more bots  new script.. they are not doing multiple tabs with the easy to captcha and multiple address.. so i think better to find a new script or block some countries like russian to visit your site.. better to track who is your enemy.. try also cloudflare for ddos attack..

blocking entire countries does more harm than good imo
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
September 14, 2016, 04:22:59 AM
 #12

Search for anti proxy APIs on the internet !!


You will find good soulutions.
Its like cloudflare you have to pay for best protection ;-)
Or you make your own faucet script.



try to edit index.php in the  /templates/template-name/ folder on your webserver, at the total beginning put this:

<?php
$proxy_headers = array(
        'HTTP_VIA',
        'HTTP_X_FORWARDED_FOR',
        'HTTP_FORWARDED_FOR',
        'HTTP_X_FORWARDED',
        'HTTP_FORWARDED',
        'HTTP_CLIENT_IP',
        'HTTP_FORWARDED_FOR_IP',
        'VIA',
        'X_FORWARDED_FOR',
        'FORWARDED_FOR',
        'X_FORWARDED',
        'FORWARDED',
        'CLIENT_IP',
        'FORWARDED_FOR_IP',
        'HTTP_PROXY_CONNECTION'
    );
    foreach($proxy_headers as $x){
        if (isset($_SERVER[$x])) die("You are using a proxy!");
    }
?>
<?php
$ports = array(8080,80,81,1080,6588,8000,3128,553,554,4480);
    foreach($ports as $port) {
         if (@fsockopen($_SERVER['REMOTE_ADDR'], $port, $errno, $errstr, 30)) {
              die("You are using a proxy!");
         }
     }
?>
<?php
if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1))
die("It appears you're using a proxy, No proxy allowed here!");
function checkProxy($ip){
$contactEmail="EMAIL@mail.email";
$timeout=3;
$banOnProability=0.99;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, "http[Suspicious link removed]c($ch);
curl_close($ch);
if ($response > $banOnProability) {
return true;
} else {
if ($response < 0 || strcmp($response, "") == 0 ) {
//The server returned an error, you might want to do something
//like write to a log file or email yourself
//This could be true due to an invalid input or you've exceeded
//the number of allowed queries. Figure out why this is happening
//because you aren't protected by the system anymore
//Leaving this section blank is dangerous because you assume
//that you're still protected, which is incorrect
//and you might think GetIPIntel isn't accurate anymore
//which is also incorrect.
//failure to implement error handling is bad for the both of us
}
return false;
}}
$ip=$_SERVER['REMOTE_ADDR'];
if (checkProxy($ip)) {
echo "It appears you're using a proxy, No proxy allowed here! <br />";
}
?>





and on the root edit .htaccess file in public_html folder (its hidden file, check for showing hidden files)   - add these lines:


# block proxy servers from site access
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]




hope it helps

i stopped huge bot attacks by 90-100%
If it really works then I think you just gave away a huge amount of money as helping out some one which is a good thing but you could sell your knowledge in coding you know.

🖤😏
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!