Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #31  
Old 02-02-2010, 11:46 PM
edward hamilton edward hamilton is offline
 
Join Date: Mar 2007
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm still getting a few spam registrations but they have definitely slowed way down.

To see what I'm missing, I wrote this to take a look occasionally, while I sip a beer in my new free time.

I used http://www.maxmind.com/app/csv to help determine the countries from the ip addresses


added spamlog table with fields id_spamlog, ip, viewdate, num_spam
added geoip_data table with fields country_full, ip32_start, ip32_end
http://www.maxmind.com/app/csv




PHP Code:
<?php
session_start
();
include 
'/admin/config.php'// connect to database

foreach ($_POST as $key => $value) {  $$key $value; }
?>
 <table><tr><td colspan="4">
<form action="" method="post" name="theform"  >
 
  Find the last <input type="text" name="lastspam"  value=" "> 
    <input type="submit" name="action"  value="bots"> 
     
        </form></td></tr> 
<?php

if(isset($lastspam)){  


$sql "SELECT id_spamlog  
           FROM spamlog 
          ORDER by id_spamlog DESC LIMIT 1"
;  
          
$result mysql_query($sql)  
          or die(
mysql_error()); 

  list(
$num) = mysql_fetch_row($result); 
//   echo "num $num";
 
$id =($num $lastspam); 
 
    while(
$num $id)        {
    
$sql "SELECT id_spamlog, ip, viewdate, num_spam 
            FROM spamlog 
            WHERE id_spamlog = '
$num' "
            
$result mysql_query($sql
            or die(
mysql_error()); 
            
            list(
$id_spamlog$ip$viewdate$num_spam) = mysql_fetch_row($result); 
            
            if(!empty(
$id_spamlog)){
echo 
"<tr><td> id </td><td></td><td>ip </td><td>Country</td><td>Date</td><td></td> <td>Attempts</td></tr>";

/*<td>ip32_start / ip_spam / ip32_end</td> */

//break ip address into four section 
// 404232216 = 16777216*24 + 65536*24 + 256*24 + 24

 
$ip32 explode("."$ip);  

 
$ip32_spam = (16777216*$ip32[0] + 65536*$ip32[1] + 256*$ip32[2] + $ip32[3]);
 
// echo "16777216*$ip32[0] + 65536*$ip32[1] + 256*$ip32[2] + $ip32[3]<br>";
// echo "ipspam - $ip32_spam<br> ";

$ip32_spam str_replace(' '''$ip32_spam);

$ip32_spam abs($ip32_spam);       
 
 
$sql "SELECT  country_full, ip32_start, ip32_end 
            FROM geoip_data 
            WHERE '
$ip32_spam' between ABS(ip32_start) AND ABS(ip32_end) ";
            
$result mysql_query($sql
            or die(
mysql_error()); 

list(
$country$ip32_start$ip32_end) = mysql_fetch_row($result); 

 
echo 
"<tr><td> $id_spamlog</td><td width=\"10\"></td><td>$ip </td><td>$country</td><td>$viewdate</td><td width=\"20\"><td>$num_spam</td> </tr>
<tr><td height = \"20\"></td></tr>"
;
}
    
$num--; 
     }
echo 
"</table>";
}
?>
Further down in this spam log some bots try as many as 8 times a day.
Yesterday there were 78 different ip addresses trying to register.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.19056 seconds
  • Memory Usage 3,472KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (8)bbcode_php
  • (16)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (36)post_thanks_box
  • (36)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (36)post_thanks_postbit_info
  • (36)postbit
  • (36)postbit_onlinestatus
  • (36)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete