Page 1 of 1

Show Bots Online

PostPosted: Wed Apr 11, 2007 8:53 pm
Author: .QUACK.Major.Pain
Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Beginner
Board URL: http://www.aaquacks.com/forum

PHP Version:
MySQL Version:


What was done before the problem appeared?



What was done to try to solve the problem?




De.scription and Message

I tried this mod I found and it shows and identifies the bots in the ACP

It doesn't show in the online box or the prillian box in the forum and home page.

Maybe someone can look it over and fix it up.

##############################################################
## MOD Title: Show Search Bot
## MOD Author: yakusha < http://www.canver.net
## MOD De.scription: This mod show search bots on whois online bar, whois online page
## and ACP index page..
##
## MOD Version: 2.0.0
##
## Installation Level: EASY
## Installation Time: 3 minutes
## Files To Edit:
## - page_header.php
## - viewonline.php
## - admin/index.php
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##
############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##
############################################################
## Author Notes:
## Designed from Show Search Bot 1.0.0
## MOD Author: WILLEM Aurelien <url> ip adress count...
//verifred from -> http://www.iplists.com/google.txt
//172
($tmp_list[0] == "64" && $tmp_list[1] == "68") ||
//63
($tmp_list[0] == "64" && $tmp_list[1] == "233" && $tmp_list[2] == "173") ||
//26
($tmp_list[0] == "216" && $tmp_list[1] == "239") ||
//11
($tmp_list[0] == "66" && $tmp_list[1] == "249")
)
{ //Google
$username = 'Google';
}
if
(
// verifred from -> http://www.iplists.com/nw/msn.txt
//107
($tmp_list[0] == "65" && $tmp_list[1] == "54") ||
//11
($tmp_list[0] == "131" && $tmp_list[1] == "107") ||
//10
($tmp_list[0] == "65" && $tmp_list[1] == "55") ||
//9
($tmp_list[0] == "207" && $tmp_list[1] == "46") ||
//8
($tmp_list[0] == "63" && $tmp_list[1] == "194" && $tmp_list[2] == "155") ||
//8
($tmp_list[0] == "202" && $tmp_list[1] == "96" && $tmp_list[2] == "51") ||
//7
($tmp_list[0] == "207" && $tmp_list[1] == "68")
)
{ //MSN
$username = 'MSN';
}
if
(
// verifred from -> http://www.iplists.com/inktomi.txt
//126
($tmp_list[0] == "68" && $tmp_list[1] == "142") ||
//36
($tmp_list[0] == "72" && $tmp_list[1] == "30") ||
//26*
($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
//25
($tmp_list[0] == "216" && $tmp_list[1] == "32" && $tmp_list[2] == "237") ||
//20
($tmp_list[0] == "66" && $tmp_list[1] == "94" && $tmp_list[2] == "230") ||
//20
($tmp_list[0] == "74" && $tmp_list[1] == "6" && $tmp_list[2] == "131") ||
//19
($tmp_list[0] == "216" && $tmp_list[1] == "109" && $tmp_list[2] == "126") ||
//17
($tmp_list[0] == "66" && $tmp_list[1] == "163" && $tmp_list[2] == "170") ||
//16
($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "193") ||
//16
($tmp_list[0] == "209" && $tmp_list[1] == "191") ||
//13
($tmp_list[0] == "202" && $tmp_list[1] == "160") ||
//13
($tmp_list[0] == "209" && $tmp_list[1] == "131") ||
//12
($tmp_list[0] == "66" && $tmp_list[1] == "218") ||
//10
($tmp_list[0] == "202" && $tmp_list[1] == "212" && $tmp_list[2] == "5")
)
{ //Yahoo
$username = 'Yahoo';
}
//End Show Search Bot

#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;

#
#-----[ AFTER ADD ]------------------------------------------
#

//MOD Show Search Bot
$tmp_list = explode(".", decode_ip($row['session_ip']));
if
(
// number is -> ip adress count...
//verifred from -> http://www.iplists.com/google.txt
//172
($tmp_list[0] == "64" && $tmp_list[1] == "68") ||
//63
($tmp_list[0] == "64" && $tmp_list[1] == "233" && $tmp_list[2] == "173") ||
//26
($tmp_list[0] == "216" && $tmp_list[1] == "239") ||
//11
($tmp_list[0] == "66" && $tmp_list[1] == "249")
)
{ //Google
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>Google</span>' : '<span>Google</span>';
}
if
(
// verifred from -> http://www.iplists.com/nw/msn.txt
//107
($tmp_list[0] == "65" && $tmp_list[1] == "54") ||
//11
($tmp_list[0] == "131" && $tmp_list[1] == "107") ||
//10
($tmp_list[0] == "65" && $tmp_list[1] == "55") ||
//9
($tmp_list[0] == "207" && $tmp_list[1] == "46") ||
//8
($tmp_list[0] == "63" && $tmp_list[1] == "194" && $tmp_list[2] == "155") ||
//8
($tmp_list[0] == "202" && $tmp_list[1] == "96" && $tmp_list[2] == "51") ||
//7
($tmp_list[0] == "207" && $tmp_list[1] == "68")
)
{ //MSN
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>MSN</span>' : '<span>MSN</span>';
}
if
(
// verifred from -> http://www.iplists.com/inktomi.txt
//126
($tmp_list[0] == "68" && $tmp_list[1] == "142") ||
//36
($tmp_list[0] == "72" && $tmp_list[1] == "30") ||
//26*
($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
//25
($tmp_list[0] == "216" && $tmp_list[1] == "32" && $tmp_list[2] == "237") ||
//20
($tmp_list[0] == "66" && $tmp_list[1] == "94" && $tmp_list[2] == "230") ||
//20
($tmp_list[0] == "74" && $tmp_list[1] == "6" && $tmp_list[2] == "131") ||
//19
($tmp_list[0] == "216" && $tmp_list[1] == "109" && $tmp_list[2] == "126") ||
//17
($tmp_list[0] == "66" && $tmp_list[1] == "163" && $tmp_list[2] == "170") ||
//16
($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "193") ||
//16
($tmp_list[0] == "209" && $tmp_list[1] == "191") ||
//13
($tmp_list[0] == "202" && $tmp_list[1] == "160") ||
//13
($tmp_list[0] == "209" && $tmp_list[1] == "131") ||
//12
($tmp_list[0] == "66" && $tmp_list[1] == "218") ||
//10
($tmp_list[0] == "202" && $tmp_list[1] == "212" && $tmp_list[2] == "5")
)
{ //Yahoo
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>Yahoo</span>' : '<span>Yahoo</span>';
}
//End Show Search Bot

#
#-----[ OPEN ]------------------------------------------
#

admin/index.php

#
#-----[ FIND ]------------------------------------------
#

$guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']);

#
#-----[ AFTER ADD ]------------------------------------------
#

//MOD Show Search Bot
$name_guest = $lang['Guest'];
$tmp_list = explode(".", $guest_ip);
if
(
// number is -> ip adress count...
//verifred from -> http://www.iplists.com/google.txt
//172
($tmp_list[0] == "64" && $tmp_list[1] == "68") ||
//63
($tmp_list[0] == "64" && $tmp_list[1] == "233" && $tmp_list[2] == "173") ||
//26
($tmp_list[0] == "216" && $tmp_list[1] == "239") ||
//11
($tmp_list[0] == "66" && $tmp_list[1] == "249")
)
{ //Google
$name_guest = 'Google';
}
if
(
// verifred from -> http://www.iplists.com/nw/msn.txt
//107
($tmp_list[0] == "65" && $tmp_list[1] == "54") ||
//11
($tmp_list[0] == "131" && $tmp_list[1] == "107") ||
//10
($tmp_list[0] == "65" && $tmp_list[1] == "55") ||
//9
($tmp_list[0] == "207" && $tmp_list[1] == "46") ||
//8
($tmp_list[0] == "63" && $tmp_list[1] == "194" && $tmp_list[2] == "155") ||
//8
($tmp_list[0] == "202" && $tmp_list[1] == "96" && $tmp_list[2] == "51") ||
//7
($tmp_list[0] == "207" && $tmp_list[1] == "68")
)
{ //MSN
$name_guest = 'MSN';
}
if
(
// verifred from -> http://www.iplists.com/inktomi.txt
//126
($tmp_list[0] == "68" && $tmp_list[1] == "142") ||
//36
($tmp_list[0] == "72" && $tmp_list[1] == "30") ||
//26*
($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
//25
($tmp_list[0] == "216" && $tmp_list[1] == "32" && $tmp_list[2] == "237") ||
//20
($tmp_list[0] == "66" && $tmp_list[1] == "94" && $tmp_list[2] == "230") ||
//20
($tmp_list[0] == "74" && $tmp_list[1] == "6" && $tmp_list[2] == "131") ||
//19
($tmp_list[0] == "216" && $tmp_list[1] == "109" && $tmp_list[2] == "126") ||
//17
($tmp_list[0] == "66" && $tmp_list[1] == "163" && $tmp_list[2] == "170") ||
//16
($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "193") ||
//16
($tmp_list[0] == "209" && $tmp_list[1] == "191") ||
//13
($tmp_list[0] == "202" && $tmp_list[1] == "160") ||
//13
($tmp_list[0] == "209" && $tmp_list[1] == "131") ||
//12
($tmp_list[0] == "66" && $tmp_list[1] == "218") ||
//10
($tmp_list[0] == "202" && $tmp_list[1] == "212" && $tmp_list[2] == "5")
)
{ //Yahoo
$name_guest = 'Yahoo';
}
//End Show Search Bot

#
#-----[ FIND ]------------------------------------------
#

"USERNAME" => $lang['Guest'],

#
#-----[ AFTER ADD ]------------------------------------------
#

"USERNAME" => $name_guest,

#
#-----[ SAVE & CLOSE ]------------------------------------------
#EOM

PostPosted: Wed Apr 11, 2007 11:56 pm
Author: ZacFields
A couple problems with this mod actually. The first, as you said, is that it's not showing in on the index/prillian. but the second is that its missing one of yahoo's most often used IP ranges which is the 74.6.x.x range. I think they have it listed as 74.6.131.x

I've fixed the 74.6 problem so that its at least registering yahoo on my admin index. but the rest of the work might have to wait til tomorrow or the weekend. I *might* be able to get this. I'll take a look at it.

Zac

Re: Show Bots Online

PostPosted: Thu Apr 12, 2007 2:50 pm
Author: .QUACK.Major.Pain
I'm not sure but not showing bots in prillian/index, might be because part of the mod is inserted in page_header.php, and as you can see that part of this file has modified with alot of lines starting with //.

The mod is inserted in the middle of the portion that has all the // lines. I would think because of this, it wouldn't behave as it should and give the wanted results.

Hope this helps a little.


$prev_user_ip = $prev_session_ip = '';

//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// while( $row = $db->sql_fetchrow($result) )
// {
// // User is logged in and therefor not a guest
// if ( $row['session_logged_in'] )
// {
// // Skip multiple sessions for one user
// if ( $row['user_id'] != $prev_user_id )
// {
// $style_color = '';
// if ( $row['user_level'] == ADMIN )
// {
// $row['username'] = '<b>' . $row['username'] . '</b>';
// $style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
// }
// else if ( $row['user_level'] == MOD )
// {
// $row['username'] = '<b>' . $row['username'] . '</b>';
// $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
// }
//
// if ( $row['user_allow_viewonline'] )
// {
// $user_online_link = '<a>' . $row['username'] . '</a>';
// $logged_visible_online++;
// }
// else
// {
// $user_online_link = '<a><i>' . $row['username'] . '</i></a>';
// $logged_hidden_online++;
// }
//
// if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
// {
// $online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;
// }
// }
//
// $prev_user_id = $row['user_id'];
// }
// else
// {
// // Skip multiple sessions for one user
// if ( $row['session_ip'] != $prev_session_ip )
// {
// $guests_online++;

//MOD Show Search Bot
$tmp_list = explode(".", decode_ip($row['session_ip']));
if
(
// number is -> ip adress count...
//verifred from -> http://www.iplists.com/google.txt
//172
($tmp_list[0] == "64" && $tmp_list[1] == "68") ||
//63
($tmp_list[0] == "64" && $tmp_list[1] == "233" && $tmp_list[2] == "173") ||
//26
($tmp_list[0] == "216" && $tmp_list[1] == "239") ||
//11
($tmp_list[0] == "66" && $tmp_list[1] == "249")
)
{ //Google
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>Google</span>' : '<span>Google</span>';
}
if
(
// verifred from -> http://www.iplists.com/nw/msn.txt
//107
($tmp_list[0] == "65" && $tmp_list[1] == "54") ||
//11
($tmp_list[0] == "131" && $tmp_list[1] == "107") ||
//10
($tmp_list[0] == "65" && $tmp_list[1] == "55") ||
//9
($tmp_list[0] == "207" && $tmp_list[1] == "46") ||
//8
($tmp_list[0] == "63" && $tmp_list[1] == "194" && $tmp_list[2] == "155") ||
//8
($tmp_list[0] == "202" && $tmp_list[1] == "96" && $tmp_list[2] == "51") ||
//7
($tmp_list[0] == "207" && $tmp_list[1] == "68")
)
{ //MSN
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>MSN</span>' : '<span>MSN</span>';
}
if
(
// verifred from -> http://www.iplists.com/inktomi.txt
//126
($tmp_list[0] == "68" && $tmp_list[1] == "142") ||
//36
($tmp_list[0] == "72" && $tmp_list[1] == "30") ||
//26*
($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
//25
($tmp_list[0] == "216" && $tmp_list[1] == "32" && $tmp_list[2] == "237") ||
//20
($tmp_list[0] == "66" && $tmp_list[1] == "94" && $tmp_list[2] == "230") ||
//20
($tmp_list[0] == "74" && $tmp_list[1] == "6" && $tmp_list[2] == "131") ||
//19
($tmp_list[0] == "216" && $tmp_list[1] == "109" && $tmp_list[2] == "126") ||
//17
($tmp_list[0] == "66" && $tmp_list[1] == "163" && $tmp_list[2] == "170") ||
//16
($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "193") ||
//16
($tmp_list[0] == "209" && $tmp_list[1] == "191") ||
//13
($tmp_list[0] == "202" && $tmp_list[1] == "160") ||
//13
($tmp_list[0] == "209" && $tmp_list[1] == "131") ||
//12
($tmp_list[0] == "66" && $tmp_list[1] == "218") ||
//10
($tmp_list[0] == "202" && $tmp_list[1] == "212" && $tmp_list[2] == "5")
)
{ //Yahoo
$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span>Yahoo</span>' : '<span>Yahoo</span>';
}
//End Show Search Bot

// }
// }
//
// $prev_session_ip = $row['session_ip'];
// }
// $db->sql_freeresult($result);
//-- add
$connected = array();
$user_ids = array();
while ($row = $db->sql_fetchrow($result) )
{

PostPosted: Thu Apr 12, 2007 10:59 pm
Author: ZacFields
i'm kind of a newb with php. I'm just starting to learn how to write code. I worked on it some last night and didn't get anywhere. but I might download some other versions of this mod to see if I can get one to work.

Zac

PostPosted: Sun Aug 12, 2007 2:32 pm
Author: richiebgood
so does this mod work?

Re: Show Bots Online

PostPosted: Sun Aug 12, 2007 2:39 pm
Author: .QUACK.Major.Pain
Only shows bots in ACP

PostPosted: Sun Aug 12, 2007 2:45 pm
Author: richiebgood
ok, cause at the minute it only shoes guest on the admin index. Not to worry.

PostPosted: Thu Nov 15, 2007 1:51 pm
Author: richiebgood
how do you edit this to include other ip ranges, there are some yahoo bots ips on the site but still coming up as guest. Google shows all the time alright.

Re: Show Bots Online

PostPosted: Thu Nov 15, 2007 5:48 pm
Author: CaNNon
$tmp_list[0] == "202" && $tmp_list[1] == "212" && $tmp_list[2] == "5")

Looks like it works as 202.212.5.* and that it covers:
202.212.5.30
202.212.5.32
202.212.5.33
202.212.5.34
202.212.5.35
202.212.5.36
202.212.5.37
202.212.5.38
202.212.5.39
202.212.5.47
202.212.5.48


so say we wanted to cover:
68.142.230.132
68.142.230.133
68.142.230.134
68.142.230.135
68.142.230.136
68.142.230.137
68.142.230.138
68.142.230.139
68.142.230.140
68.142.230.141
68.142.230.142
68.142.230.143

then this should work.
// 77
$tmp_list[0] == "68" && $tmp_list[1] == "142" && $tmp_list[2] == "230")

the "// number" are just a reminder so we can just pick a unused number.
Let me know if it was a good guess. <img>

PostPosted: Thu Nov 15, 2007 5:53 pm
Author: richiebgood
cheers, I will give it a try

Re: Show Bots Online

PostPosted: Thu Nov 15, 2007 7:40 pm
Author: CaNNon
If some one wants to test it, this should be the complete yahoo rule set as posted on the iplists site. It's also now in numerical order too.

Please I'm running blind as i don't have this mod installed make sure you keep a back up! :oops:

PostPosted: Thu Nov 15, 2007 8:38 pm
Author: richiebgood
I got errors in making the changes. I got errors on all the pages:

admin/index.php
includes/page_header.php
viewonline.php

When i say error, i mean a blank page with the error: Parse error: syntax error, unexpected '(' in /home/irishpai/public_html/paintballer/includes/page_header.php on line 358

Re: Show Bots Online

PostPosted: Tue Nov 20, 2007 11:27 pm
Author: CaNNon
It's fixed richiebgood, 2 X || issue both typeO's. Only the edits in "admin/index.php" seemed to cause the errors.

Now that I have this installed and running with the updated yahoo ip's. I would like to know where you guys put the "includes/page_header.php" edit? The area to edit for this is rem "//" (or remindme) the code is not used so i didn't bother using that edit.