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

Reply
 
Thread Tools Display Modes
  #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
  #32  
Old 02-08-2010, 12:47 AM
Mopar1973Man's Avatar
Mopar1973Man Mopar1973Man is offline
 
Join Date: Mar 2007
Location: New Meadows, Idaho
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shoot...

Even more easy is to ask questions at the registration time...

Like my site is a Dodge Cummins support site. So I ask question about the the Cummins engine at registration time. Like how may cylinder does a Cummins have etc. If you a true Cummins fan you would know this simple answer is 6 (six)... But the bots have never made it in the door yet...

So really you don't need to go out on a limb codeing use the tools you already got...

But to the OP I love the idea of sending the bot to another site... Neat trick but just a bit to much moding for me... I'm not really wanting to chop up the code...
Reply With Quote
  #33  
Old 02-08-2010, 03:54 AM
Glenn_E Glenn_E is offline
 
Join Date: Dec 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mopar1973Man View Post
... Even more easy is to ask questions at the registration time...
I'm with you - I was deleting a few new registrations a day until I added a question/answer. Mine is a simple what is 12-2 question, which stopped them cold.
Reply With Quote
  #34  
Old 02-08-2010, 03:11 PM
tristanisginger tristanisginger is offline
 
Join Date: Feb 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thisgeek, i like your way very mucho. Very clever as I don't have to worry about any upgrades.

I would like to go one step further and incorporate dtv100's idea and do the same for new threads and replies, can you give me a clue to the .htaccess code.

many thanks

tristan
Reply With Quote
  #35  
Old 11-13-2011, 10:21 PM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maria, thanks very much for sharing. I was searching how to do this exact thing last night when I found this thread. I implemented it this morning. Oh boy, what a boring day I've had ever since, not a single spam registration to deal with. :-)

P.S. I've implemented your mod on my vB 3.8.x.
Reply With Quote
  #36  
Old 07-16-2013, 09:15 AM
shaker2003 shaker2003 is offline
 
Join Date: Nov 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Guys, i change register.php everywhere. but look
when i click register on main page, nothing change. when i click a have blank screen.
Reply With Quote
Reply


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 07:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03714 seconds
  • Memory Usage 2,234KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (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_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • 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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete