BotScout "BotBuster" for SMF 1.x and 2.0 Beta 4

Started by MrMike, February 27, 2009, 10:36:32 AM

Previous topic - Next topic

rconiv

Quote from: MrMike on April 22, 2012, 08:42:32 AM
I think all you may need to do is declare this var at the top of the botscout.php file, something like:

// declare $data var
$data = '';



Quote from: rconiv on April 22, 2012, 12:35:11 AM
Actually it turned out to be my fault, was trying to figure out why the forum keeps saying there is an issue with the data command, so thought it was missing a } so put one in.  After I removed it, the 500 error went away, but the data error came back.  Hadn't changed anything in the botscout.php, except to add my email to be notified when it stops a bot, and the API info.

http://****.net/index.php?action=register2
Undefined variable: data
File: /var/www/html/Sources/BotScout.php
Line: 248

The print $data on this is what the error log is saying is failing (part in red).  At least that is the error line.


// this example tests the email address and IP to see if either of them appear
// in the database at all. Either one is a fairly good indicator of bot identity.
if($botdata[3] > 0 || $botdata[5] > 0){
   print $data;

   if($diag=='1'){
      print "Bot signature found.";
      print "Type of test was: $botdata[1]";
      print "The {$botdata[2]} was found {$botdata[3]} times, the {$botdata[4]} was found {$botdata[5]} times";
   }

   if($send_alerts=='1'){
      // send an email about the bot?
      $fromText = "BotBuster System";
      $subjectText = "Bot Attempt Stopped";
      $msgText = "A bot tried to register, but was stopped from doing so.\n\nBot Name: $XUSER\nBot Email: $XMAIL\nIP Address: $XIP";
      mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n X-Mailer: PHP 4.x");
   }


   // your 'rejection' code would go here....
   // for example, print a fake error message and exit the process.
   $errnum = round(rand(1100, 25000));
   print "Confabulation Error #$errnum, Halting.";
   exit;

}
////////////////////////

dooie

I had to uninstall in order for real registrations to work. This blocked even me signing up on my own forum.

colinw83

Hi I've got a problem with botscout it appears to be working a little too well as now nobody can register on my forum and is interpreting everyone as a hacking attempt, please help :) 

MrMike

Could you give me a URL to your forum so I can see this?

Quote from: colinw83 on May 31, 2012, 11:10:30 AM
Hi I've got a problem with botscout it appears to be working a little too well as now nobody can register on my forum and is interpreting everyone as a hacking attempt, please help :)


Bryan47

Anyone still watching this topic?

Having issues with the path to the source/botscout.php 

I've changed it several times and still get a weird error.  I get admin notification as ours is setup that way for now and then look at the IP and see the botscout error

I think my other admin deleted the last one but I 'll get screenshot or snip of the error.

I just wasn't sure if this topic would get a reply

TIA

MrMike

A screenshot would help, or the text of the error message.

The path to the botscout.php file should be the absolute path, i.e. something like

/var/www/virtual/somedomain.com/htdocs/forum/Sources/

(just an example)




Quote from: Bryan47 on October 30, 2012, 04:28:04 PM
Anyone still watching this topic?

Having issues with the path to the source/botscout.php 

I've changed it several times and still get a weird error.  I get admin notification as ours is setup that way for now and then look at the IP and see the botscout error

I think my other admin deleted the last one but I 'll get screenshot or snip of the error.

I just wasn't sure if this topic would get a reply

TIA

Bryan47

Quote from: MrMike on October 30, 2012, 05:24:22 PM
A screenshot would help, or the text of the error message.

The path to the botscout.php file should be the absolute path, i.e. something like

/var/www/virtual/somedomain.com/htdocs/forum/Sources/

(just an example)




Quote from: Bryan47 on October 30, 2012, 04:28:04 PM
Anyone still watching this topic?

Having issues with the path to the source/botscout.php 

I've changed it several times and still get a weird error.  I get admin notification as ours is setup that way for now and then look at the IP and see the botscout error

I think my other admin deleted the last one but I 'll get screenshot or snip of the error.

I just wasn't sure if this topic would get a reply

TIA

Thanks I'm surprised I don't have any at the moment to test or get the error message which I guess is a good thing.  There is 2 ways to get to my forum in FTP program so I changed it to reflect the /www/website/forum/source/botscout.php  was public_html/website...

Anyway I can test?

MrMike

Quote from: Bryan47 on October 30, 2012, 05:35:03 PM
Thanks I'm surprised I don't have any at the moment to test or get the error message which I guess is a good thing.  There is 2 ways to get to my forum in FTP program so I changed it to reflect the /www/website/forum/source/botscout.php  was public_html/website...

Anyway I can test?

You can try calling the botscout.php file directly in your browser and see what happens. You should get the text "Error: No return data from API query" on the screen if it's working correctly.

Bryan47

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

MrMike

Quote from: Bryan47 on October 30, 2012, 07:33:52 PM
Internal Server Error

That's probablyy not an error in the file or code, it almost sounds as though you may have something odd with your PHP config or setup, but I've no idea what.

PHP code errors don't normally cause an "Internal Server Error" to be thrown, but it's possible that this is something new that I've not seen before.

I know that in some configs using any of the php flags in an htaccess file can cause this error, but if that's not a possibility then I'm unsure what may be the issue.

Bryan47

Does this look correct?

$_POST[$key]));
   }

   ////////////////////////////////////////////////////
   // hxxp:botscout.com [nonactive] "BotBuster" check
   include('/home/domain/www/subdomain.com/forum/Sources/BotScout.php');
   ////////////////////////////////////////////////////

   // Collect all extra registration fields someone might have filled in.

MrMike

It's hard for me to tell without knowing the actual path on your server.

Quote from: Bryan47 on October 31, 2012, 10:54:58 AM
Does this look correct?

$_POST[$key]));
   }

   ////////////////////////////////////////////////////
   // BotScout.com "BotBuster" check
   include('/home/domain/www/subdomain.com/forum/Sources/BotScout.php');
   ////////////////////////////////////////////////////

   // Collect all extra registration fields someone might have filled in.

Bryan47

59.58.104.178    Guest    2: include() [<a href='function.include'>function.include</a>]: Failed opening '/www/mydomain.com/forum/Sources/BotScout.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
?action=register2    October 31, 2012, 05:58:21 AM
59.58.104.178    Guest    2: include(/www/mydomain.com/forum/Sources/BotScout.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
?action=register2    October 31, 2012, 05:58:21 AM

Not sure if this help but we had a bot register last night

MrMike

This error: 

Failed opening '/www/mydomain.com/forum/Sources/BotScout.php' for inclusion

means the path '/www/mydomain.com/forum/Sources/' to the file is incorrect. You aren't really using "mydomain.com" as the actual path, are you?

That's almost certainly not right, unless you own the domain "mydomain.com".

Bryan47

Got this on Nov 1.

"8: Undefined index: ! <html><body BGCOLOR='#FFFFaa'>Anonymous hit limit reached for IP Address 216.120.237.68.<br>Why not get an <a href='/getkey.htm'>API key</a>? It's free, and it'll allow you to perform a larger number of bot-screening lookups each day.<br>If you aren't the webmaster for this domain, please tell them about this error message.<br></body></html>
?action=register2"


Sounds like botscout is working if I am getting something about a limit reached. I also put in a API key I signed up for



Now my admin sends me a message stating a user got this trying to sign up today

Parse error: syntax error, unexpected T_EXIT in /home/MainDomain/public_html/MYDOMAIN/forum/Sources/BotScout.php on line 1




Thanks
Bryan

MrMike

Quote from: Bryan47 on November 06, 2012, 07:52:29 PMNow my admin sends me a message stating a user got this trying to sign up today

Parse error: syntax error, unexpected T_EXIT in /home/MainDomain/public_html/MYDOMAIN/forum/Sources/BotScout.php on line 1

It sounds like you may have modified the file, or possibly it's been damaged. Try a clean copy of the file and if you're still seeing a problem, let me know.

Bryan47

Downloaded it again from the site and added my API Key

is this correct? 

$APIKEY = '0000MYKEY00000';

Wasnt sure if the  '   '  was suppose to stay

Thanks

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MrMike


Bryan47

Well I was thinking since it was getting the error about line 1 I was making progress.  I upload a new php with my key.

I just got 3 registrations this morning and I am seeing this error again

2: include() [<a href='function.include'>function.include</a>]: Failed opening '/BLAHBLAH.com/www/DOMAINTHATNEEDSBOTSCOUT.com/forum/Sources/BotScout.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
?action=register2

2: include(/BLAHBLAH.com/www/DOMAINTHATNEEDSBOTSCOUT.com/forum/Sources/BotScout.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
?action=register2

Advertisement: