phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Automate deletion of robotic accounts.


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
adrianxw
Board Member



Joined: 08 Aug 2011

Posts: 10


flag
PostPosted: Mon Nov 28, 2011 11:40 am 
Post subject: Automate deletion of robotic accounts.

Our phpBB 2 forum is remotely hosted, I have no access to the server so a "mod" is not practical.

Since last week, we have been bombarded with "new users" who have a random string of characters as their username. They make no posts, just clutter things up. They have url's in the website field, sometimes the sig field sometimes both for webcrawlers to see. The tool doing this seems to have been distributed to more than one site compounding the problem. My fellow admin and I are spending time each day, (hours), deleting these damn things.

It occurred to me to write a program to automate their deletion, something that periodically scans the member list, reads the url and sig fields and if matching anything on a list/table, deletes the account. My programming experience is, however, not the most suited to this task, (C and C++, embedded apps). It then occurred to me to ask if any such tool was already available as it seemed an obvious way forward.

So, is there?
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Mon Nov 28, 2011 1:53 pm 
Post subject: Re: Automate deletion of robotic accounts.

It's better to prevent them from signing up in the first place, saving you the effort of cleaning them up. Once you get on "the list" it's nearly impossible to get off, so you will continue to get hit until you take other measures.

When you say you don't have access to the server, you don't have ftp or any other sort of access?

_________________
phpBBDoctor Blog
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Tue Nov 29, 2011 1:49 am 
Post subject: Re: Automate deletion of robotic accounts.

adrianxw wrote:
My programming experience is, however, not the most suited to this task, (C and C++, embedded apps). It then occurred to me to ask if any such tool was already available as it seemed an obvious way forward.
C or C++ can do the job. You'd need to write a program that can open a network socket to work the HTTP protocol. There should be tons of libraries written to do this already.

A few steps:

1.) Create an administrator account for the phpBB forum

2.) Have your program log in to phpBB 2. This involves:
a.) GETting the login form
b.) catching the session cookie
c.) POSTing to the login form the admin account's username + password, and the session ID
d.) catching and storing the resulting session cookie that phpBB assigns to you.

3.) Send HTTP requests to download the memberlist and any profiles

4.) Use regular expressions to match undesirable characteristics.
a.) Save a list of user IDs in an array

5.) Authenticating to the admin panel (this is basically a repeat of step 2, except you need to append &admin=1 to the login URL)

6.) Sending the appropriate POST request to admin_users.php to delete the offending users.
a.) this needs to have your newly-assigned admin session ID that you got from step 5.

7.) Logging out of phpBB (or just let the session expire)



Assuming that you have sufficient experience with programming, sockets and HTTP, as well as pattern-matching, this program could be written in a day (probably a weekend day).

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog Mac GUI
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Wed Feb 22, 2012 9:28 pm 
Post subject: Re: Automate deletion of robotic accounts.

Looks pretty dense. Couldn't you do that during registration?
- update the registration codes to refuse certain type of characters in the user's name.
You could for instance, for an english forum, reject all ascii characters greater than 127 as a starter.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0281 seconds using 15 queries. (SQL 0.0025 Parse 0.0008 Other 0.0247)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo