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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2013, 12:13 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Delete spammers by partial IP address?

I am helping someone with their long neglected board that's got alot of spam accounts with IP address starting with 121 in the profile.

They are all in the registered users group, and I want to know what a query would be to delete them all. Anyone with a idea? Can a partial IP be entered in a query, with a asterisk as wildcard? Like 121* ??
Reply With Quote
  #2  
Old 11-25-2013, 12:33 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If all ips were the same yes you could be as more than one table holds user info it would not be a good way to go
Reply With Quote
  #3  
Old 11-25-2013, 12:42 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm asking specifically about the profile field, "IP Address" the admin can see in profiles when looking them up in AdminCP. This as a identifier similar to the user profile fields used to mass move spam accounts to a custom usergroup as in this article: https://vborg.vbsupport.ru/showthread.php?t=276547

If we know the profile field number and the first three digits of the offending IP address, can we craft a query to delete all such accounts? Would such a query accept the asterisk as a wildcard, as in 121.* ??
Reply With Quote
  #4  
Old 11-25-2013, 12:50 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said in my first post you need the full ip if all spammers IPs were the same then you could but if doing it from a query it will cause problems

UPDATE `user` SET `usergroupid`='8', `ipaddress`='FULL IP HERE' WHERE (`userid`='2')
this will move them from group 2 to 8 with x ip
then you could use the prune option to delete all in that group

is only the first 3 numbers of the ip the same and how many spammers and do they have posts. If the forum you are helping I can give you a plugin that will delete all there posts and delete the accounts
Reply With Quote
2 благодарности(ей) от:
Max Taxable, tbworld
  #5  
Old 11-25-2013, 12:53 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Need the FULL Ip address, wildcards won't work? That's what I am asking. Never been tried? How do we know?



Quote:
Originally Posted by ForceHSS View Post
is only the first 3 numbers of the ip the same and how many spammers and do they have posts. If the forum you are helping I can give you a plugin that will delete all there posts and delete the accounts
I missed this before....

Yes there's a couple thousand or so with first three numbers of the IP the same. Some of those accounts have 1 or 2 posts, most have zero. Some of them have exact IP address (all numbers) the same, vast majority, not.

Only common denominator is first three digits of the registration IP.
Reply With Quote
Благодарность от:
ozzy47
  #6  
Old 11-25-2013, 04:08 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATE `user` SET `usergroupid`='8' WHERE ipaddress LIKE '121%';

change group if you need then you can use the prune options in vb but before you do make sure all spammers posts are deleted first

Always backup first

PM sent I gave you a custom plugin that will help
Reply With Quote
  #7  
Old 11-25-2013, 03:52 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
UPDATE `user` SET `usergroupid`='8' WHERE ipaddress LIKE '121%';

change group if you need then you can use the prune options in vb but before you do make sure all spammers posts are deleted first

Always backup first


PM sent I gave you a custom plugin that will help
Thanks Force! Does that query scare anyone besides me? Part of me wants to run it part of me wants to run from it!

I appreciate your time and help.
Reply With Quote
  #8  
Old 11-25-2013, 04:59 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That query will move users to usergroup 8 if their ip address is:
121.123.00....etc
1212.....etc

so any ip address that starts with 121 will get the user moved, the wildcard operator (%)will account for anything at all after 121.
Reply With Quote
Благодарность от:
Max Taxable
  #9  
Old 11-25-2013, 05:38 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
That query will move users to usergroup 8 if their ip address is:
121.123.00....etc
1212.....etc

so any ip address that starts with 121 will get the user moved, the wildcard operator (%)will account for anything at all after 121.
I'm not as skeered of it now, as I was. Thanks Simon!
Reply With Quote
  #10  
Old 11-25-2013, 06:56 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Max Taxable View Post
Thanks Force! Does that query scare anyone besides me? Part of me wants to run it part of me wants to run from it!

I appreciate your time and help.
Dont be scared lol when it comes to things like this I know what I am doing been at it for over 20 years
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 05:22 AM.


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.04705 seconds
  • Memory Usage 2,261KB
  • Queries Executed 13 (?)
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
  • (4)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
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete