Bitcoin Forum
November 16, 2024, 06:49:21 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Bots attacked?  (Read 1269 times)
dfinc
Member
**
Offline Offline

Activity: 105
Merit: 100

retired since 2019;find me online:functionallyvoid


View Profile WWW
May 03, 2016, 09:46:14 PM
 #21

This code works well, but I was wondering is there is any way you could use this together with the AntiBotLinks script?

now that I’m done cleaning up, I’m retired for good cya everyone! If you need to contact me: functionallyvoid on steam and all over the internet

-2020
Octopus.pp.ua (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
May 04, 2016, 07:24:13 PM
 #22

This code works well, but I was wondering is there is any way you could use this together with the AntiBotLinks script?

You can use this code with any another AntiBotLinks script

frycek
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
May 04, 2016, 08:47:41 PM
 #23

Can I use this script with 15 second timer?
Octopus.pp.ua (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
May 04, 2016, 10:12:35 PM
 #24

Can I use this script with 15 second timer?

Sure. Just set timeout:
Code:
if (($_COOKIE['Mortal'] != getIP()) or ((time() - $_COOKIE['Combat']) < 50))

15, not 50.

Recomended set 10 sec, when page loaded

frycek
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
May 05, 2016, 06:52:10 PM
 #25

Thanks Smiley
Where I can find banned IP list?
Octopus.pp.ua (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
May 05, 2016, 07:54:30 PM
 #26

Thanks Smiley
Where I can find banned IP list?

You can find it in your webserver's logs (error code 403), or you can use code such as:

Code:
$ra = getIP();
$fname = $_SERVER['SERVER_NAME'];

$sql = "INSERT INTO log_faucets (ip, fname)
VALUES
('$ra', '$fname')";

mysql_query($sql, $link);

in IF statement (when cheked, is user legal, listing posted in first post), and logs with banned IPs will be accumulated in database table 'log_faucets'. Sure, you must create this table before:

Code:
CREATE TABLE IF NOT EXISTS `log_faucets` (
  `ip` varchar(50) NOT NULL,
  `fname` varchar(100) NOT NULL,
  `DT` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Where 'ip' - banned ip
'fname' - faucet's name (if you use some faucets)
'DT' - datetime of impression

And later you can use this list in .htaccess or check IP in future impressions for preventive ban.

frycek
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
May 05, 2016, 08:28:29 PM
 #27

Am I do it right?



I want to ask because I don't have any knowledge about sql and php.
Octopus.pp.ua (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
May 05, 2016, 08:42:24 PM
 #28

Am I do it right?



I want to ask because I don't have any knowledge about sql and php.

1. Are you create this table (log_faucets) in your database?
2. Are you connect to database in your script? Do not post connection string to forum coz you can lose your money.
3. Move "{" up to string with "$ra = getIP();" - it's border of IF statement (must be "{$ra = getIP();")

1, 2 you can google how to using DB, or i can help

frycek
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
May 05, 2016, 09:08:03 PM
 #29

Thanks for help, I create table in DB with your commend.
My site is connected to DB (satoshi are sended and adresses are recorded in DB - so I think it's ok).
So now I have to wait is any IP get catch to my log_faucets table Smiley
Octopus.pp.ua (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
May 06, 2016, 09:14:40 PM
 #30

Thanks for help, I create table in DB with your commend.
My site is connected to DB (satoshi are sended and adresses are recorded in DB - so I think it's ok).
So now I have to wait is any IP get catch to my log_faucets table Smiley

So? Have you result?

BitRipped
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
May 07, 2016, 12:06:50 PM
 #31

Is there any way of logging the Invalid and successful CAPTCHAS?

So successful and non successful responses can be added to log file somewhere or a new one entirely? I'm thinking Fail2Ban can then be configured on that log file to trigger temp ban. Then maybe a additional permanent blacklist rule could be made on fail rate  Wink
frycek
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
May 07, 2016, 02:51:59 PM
 #32

Thanks for help, I create table in DB with your commend.
My site is connected to DB (satoshi are sended and adresses are recorded in DB - so I think it's ok).
So now I have to wait is any IP get catch to my log_faucets table Smiley

So? Have you result?

I don't have any records in log_faucets table. I don't know is it possible that my faucet is blear from bots.
(I use nasty hosts protection)
n3rvi0zz0
Sr. Member
****
Offline Offline

Activity: 289
Merit: 250


View Profile
May 07, 2016, 05:53:25 PM
 #33

Will you please show proper coding of this anti-bot you mention above with line number where we have to put it.I really need it because my faucet is full of bots.Faucetbox admin panel show around 6000 claims/day but google adsense show only 800. Sad

I don't wanna refill my wallet till i fix it so please help me & give some advice .

This code insert in 2-3 rows of index.php, after "<?php":

Code:
setcookie("Mortal",$_SERVER['REMOTE_ADDR'], time()+3000);
setcookie("Combat",time(), time()+3000);

Scroll to 1547 row and insert after "// banning
        $ip = ip2long(getIP());
        if($ip) { // only ipv4 supported here
            foreach($security_settings["ip_ban_list"] as $ban) {
                if(ipSubnetCheck($ip, $ban)) {
                    banned();
                }
            }
        }"

Code:
if (($_COOKIE['Mortal'] != getIP()) or ((time() - $_COOKIE['Combat']) < 50))
{
banned();
}

Function "banned()" already in faucetbox script, so, that's all you have to do.

Do not forget use timer on button "Get reward".


im using antibots link and i have this problem i needed to delete the default button and now the  button shows straigh away to do the antibots stuff

also in wich index we put this code in the template or in the root folder

https://bizzilion.com/?ref=n3rvi0zz0

Earn up to 1.5% daily investing in the best platform of internet
Pages: « 1 [2]  All
  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!