vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Delete spammers by partial IP address? (https://vborg.vbsupport.ru/showthread.php?t=305006)

Max Taxable 11-25-2013 12:13 AM

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* ??

ForceHSS 11-25-2013 12:33 AM

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

Max Taxable 11-25-2013 12:42 AM

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.* ??

ForceHSS 11-25-2013 12:50 AM

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

Max Taxable 11-25-2013 12:53 AM

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 (Post 2463506)
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.

ForceHSS 11-25-2013 04:08 AM

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

Max Taxable 11-25-2013 03:52 PM

Quote:

Originally Posted by ForceHSS (Post 2463540)
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.

Simon Lloyd 11-25-2013 04:59 PM

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.

Max Taxable 11-25-2013 05:38 PM

Quote:

Originally Posted by Simon Lloyd (Post 2463654)
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!

ForceHSS 11-25-2013 06:56 PM

Quote:

Originally Posted by Max Taxable (Post 2463637)
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


All times are GMT. The time now is 09:02 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.01982 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete