News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

httpBL

Started by Diego Andrés, February 17, 2010, 03:55:54 PM

Previous topic - Next topic

snoopy_virtual

@DJ-X

OK, I understand now were is the problem.

It is a bug in the mod that we discovered some weeks ago and will be sorted in the next version. In the mean time here is the solution:

http://www.simplemachines.org/community/index.php?topic=366399.msg2920367#msg2920367

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

DJ-X

#641
Another error :)

$ip = httpBL_look_for_empty_ip($ip);

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

Database Error: Field 'error' doesn't have a default value
File: C:\inetpub\wwwroot\mysite\Sources\httpBL_Subs.php
Line: 263


phpinfo()

_SERVER["REMOTE_ADDR"]   2604:6600:13:0:225:90ff:fe10:634
_SERVER["REMOTE_HOST"]   2604:6600:13:0:225:90ff:fe10:634

snoopy_virtual

Inside the database, in the table "log_httpBL", the field "error" is a text field.

In all the versions of MySQL I have always used, text fields cannot have default values, so I don't understand that error you are getting.

Do you know what version of MySQL you have in your server or if you are using any other kind of database?

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

BoxingChaos

Just wanted to thank snoopy_virtual for keeping httpBL and Stop Spammer up to date and all. Installed both and my spammers bots are getting trapped left and right and the problem has been solved. Added these two mods httpBL and Stop Spammer to two forums and problem cured. Gracias hermano snoopy_virtual. Muy buen aporte :)

www.BoxingSquad.com/forum

snoopy_virtual

A mandar, que pa eso estamos  ;)

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

BritManNJ

#645
## Okay ... I fixed it ... your tutorial is good ... thank you ##

I am trying to install httpBL, but I'm getting stuck here:

2.     ...
3.   Execute Modification   ./index.php   Test successful
4.   Execute Modification   ./SSI.php   Test successful
5.   Execute Modification   ./Themes/default/index.template.php   Test failed
6.   Execute Modification   ./Themes/default/Who.template.php   Test successful
7.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
8.     ....

Current packages:

Mod Name   Version   
1.   Google Analytics Code   1.4
2.   Stop Spammer   2.3.9
3.   Social Bookmarks   1.1
4.   IP-Address Tracer   1.0

What am I doing wrong?

Thankyou,

aeh

snoopy_virtual

@BritManNJ

Apparently you found the answer before I saw the question.

Anyway if the mod is not working properly or if you have any other question just let me know.  ;)

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

DJ-X

#647
Quote from: snoopy_virtual on April 11, 2011, 11:53:09 AM
Inside the database, in the table "log_httpBL", the field "error" is a text field.

In all the versions of MySQL I have always used, text fields cannot have default values, so I don't understand that error you are getting.

Do you know what version of MySQL you have in your server or if you are using any other kind of database?

Hi !
MySQL Server 5.1

I set up so that the code does not work when IPv6 is used!
Changed in the index.php

Example

// IPv4
if (strstr($_SERVER["REMOTE_ADDR"], '.'))
   {
    // It works only on server with IPv4
    echo "<b>IPv4</b><br />";
   }

// IPv6
if (strstr($_SERVER["REMOTE_ADDR"], '.'))
   {

   }
   else
   {
    // It works only on server with  IPv6
    echo "<b>IPv6</b><br />";
   }


snoopy_virtual

Hi DJ-X

I am not really sure if what you are doing there will sort your problem. Maybe it does.

Let me know if it works for you, because we could use a similar solution if anybody else has the same problem.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

butchs

As far as I know SMF is not designed to work with IPv6 either.  Why should httpBL have to be compatible when SMF has no current method to store and track IPv6 addresses?
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

snoopy_virtual

Every piece of software should be able to deal properly with IPv6 now that there are no more IPv4 available.

IPv6 is not the future any more. It's the present.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Arantor

No, SMF will silently treat IPv6 as 'not supplied' IP addresses.

snoopy_virtual

I know.

But every "GOOD" piece of software should be able to deal properly with IPv6

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

DJ-X

Quote from: snoopy_virtual on April 14, 2011, 11:26:49 AM
Hi DJ-X

I am not really sure if what you are doing there will sort your problem. Maybe it does.

Let me know if it works for you, because we could use a similar solution if anybody else has the same problem.
This works on IPv4 IPv6 Microsoft-IIS/7.5 PHP 5.3 and IPv4 Apache/2.2 (CentOS) PHP 5.2
Please correct MOD correctly

index.php


// Mod httpBL is Off when IPv6
if (strstr($_SERVER["REMOTE_ADDR"], '.'))
   {
// Before we do anything else with this user we check projecthoneypot to see if it's a spammer. MOD httpBL
// But do it only if we are not coming from the file warning.php
global $boardurl, $httpBL_warning;
if ($modSettings['httpBL_enable'] && !isset($httpBL_warning))
{
require_once($sourcedir . '/httpBL_Subs.php');
$response = httpBL_dnslookup($user_info['ip'], $modSettings['httpBL_honeyPot_key']);
if ($response)
{
$_SESSION['response'] = $response;
header('Location: '. $boardurl .'/warning.php');
exit();
}
}

   }

butchs

Quote from: snoopy_virtual on April 15, 2011, 02:51:58 PM
I know.

But every "GOOD" piece of software should be able to deal properly with IPv6

Bad Behavior mod handles ipv6 and Project Honey Pot nicely.

Forum Firewall actually supports and tests ipv6 addresses.

I agree that you should fix httpBL.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

snoopy_virtual

Project Honey Pot doesn't handles IPv6 yet. They are working on it, but they need to built a full new database for that and a full new API system.

Mod httpBL works with the database that Project Honey Pot has just now, so it cannot handle properly IPv6 until they finish all that job.

QuoteI agree that you should fix httpBL.

Why do you care if you don't use it?

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Arantor

I'd guess it's probably the same reason I hang around here and throw out the odd support answer: because even though I might not use something, I figure my knowledge might be able to help someone else.

snoopy_virtual

It's completely different Arantor.

You are one of the best coders I know and normally all your suggestions are accurate and all of them had help me out a lot all these years.

What I don't like is ...

I better shut my mouth before I say something too hard.

I may answer it anyway when I calm down a little.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

cyberdyne

Installed and all is well. Seems to be working fine but unsure how to test it other than just wait.

One question, my email ends in 'co.uk', not 'com' so I presume I simply enter 'co.uk' into the third field for the Admin email address and it will work the same?

Many thanks
Using:
v.1.1.16
Custom theme (modified SMF Default Theme - Core)
AND
v.2.0.1
Custom theme (modified Bright Forest)

snoopy_virtual

Quote from: cyberdyne on April 18, 2011, 09:50:40 AM
Installed and all is well. Seems to be working fine but unsure how to test it other than just wait.

Just now there is no easy way to check if the mod is working OK apart from going to Admin => mod httpBL => Settings and see if there is a green sign saying every thing is OK. But that only tests if the mod is ON or OFF, if it's up-to-date or not and if the connection between your server and Project Honey Pot is OK.

There is actually a complicated way to test it, but I wouldn't recommend you to try it unless you know a lot about computers:

- Log off from your forum (so it doesn't recognize you as admin and the mod treats you as any other visitor).

- Go to Project Honey Pot and look for a very bad IP (one from a spammer with a high Threat Level).

- Change the IP of your modem/router or tweak your browser so it shows that IP as yours.

- Visit now your forum and check if the mod stops you.

I have used that method a few times when I need to do changes in the mod and need to see if they work as expected, but as I said before I wouldn't recommend anybody to use it unless they know very well what they are doing.  ;D

Quote from: cyberdyne on April 18, 2011, 09:50:40 AM
One question, my email ends in 'co.uk', not 'com' so I presume I simply enter 'co.uk' into the third field for the Admin email address and it will work the same?

Yes.

You can check if the result is OK using the links in Admin => mod httpBL => Settings => Warning Page Settings to see how your "warning" page looks like.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Advertisement: