Advertisement:

Author Topic: Detecting Multiple Accounts  (Read 51742 times)

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Detecting Multiple Accounts
« on: April 22, 2005, 11:22:50 PM »
I have a fairly regular issue with users creating multiple accounts, whether it's to slip past a ban, lost password, or simple confusion.

To try to detect these, I've put together a script which lists every IP address that has seen more than one account post from it. (Script attached)

It's not pretty, and you will need to customize it a bit, but it should do the trick. Please note that this page takes some serious processing to build, so you may want to run it infrequently.

Each IP address is clickable, taking you to the forum "track IP" page for that address. If an account still exists, it's name will be clickable as well, taking you to the user's profile.

Note that since this page is not protected, you should either remove it when not in use, or place it under a password protected web directory. (It could allow users to get address info for each other, if they know you're using it.)

Enjoy, and good hunting! :D

Edit: Slightly updated, to allow easier setup. (DB/table names have been turned into variables.)

Edit 2: Updated to work with 1.1.

Edit 3: Updated for SMF 2... I can't un-attach the 1.1 version, so here is a link to the SMF 2 script: http://army.ca/deleteme/multiple_accts_php.txt
« Last Edit: August 28, 2011, 11:06:16 AM by Mike Bobbitt »

Offline azuregenesis

  • Semi-Newbie
  • *
  • Posts: 86
Re: Detecting Multiple Accounts
« Reply #1 on: May 23, 2005, 08:41:42 PM »
i would like a step by step on how this is setup :)

thank you.

i'm getting these error messages:

Warning: Cannot modify header information - headers already sent

and

 SELECT command denied to user
« Last Edit: May 23, 2005, 08:45:31 PM by azuregenesis »

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #2 on: May 23, 2005, 09:04:54 PM »
You need to edit the script to ensure the path to your SSI.php needs to be correct:

Code: [Select]
require('/var/www/html/forums/SSI.php');
And just below that, change these settings if required (the defaults may work, as they are the SMF defaults):

Code: [Select]
// Database name
$accounts_db_name="smf";

// Database tables
$db_message_table="smf_messages";
$db_member_table="smf_members";

Once that's done just browse to multiple_accounts.php and it should display the info.
« Last Edit: August 28, 2005, 07:07:03 AM by Mike Bobbitt »

Offline azuregenesis

  • Semi-Newbie
  • *
  • Posts: 86
Re: Detecting Multiple Accounts
« Reply #3 on: May 23, 2005, 10:29:43 PM »
ah. i see. forgot to edit the databse settings.. :)

thank you!

Offline joker

  • Semi-Newbie
  • *
  • Posts: 96
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #4 on: May 24, 2005, 02:10:35 AM »
I'm getting: Error writing file '/tmp/MYWwQGzY' (Errcode: 28)
Any hint?
joker ;-)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #5 on: May 24, 2005, 06:27:30 AM »
I'm getting: Error writing file '/tmp/MYWwQGzY' (Errcode: 28)
Any hint?

Getting Errors From MySQL?

-[Unknown]

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #6 on: May 24, 2005, 12:15:15 PM »
Sounds like you're on your way, but let me know if you need any assistance.


Cheers
Mike

Offline joker

  • Semi-Newbie
  • *
  • Posts: 96
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #7 on: May 25, 2005, 05:10:25 AM »
Thanks [Unknown] , but there is enough db/diskspace. That's why I asked here.
joker ;-)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #8 on: May 25, 2005, 05:27:53 AM »
Joker, this means the /tmp partition is full.  Don't check your space, just tell your host.  This is not your fault, and you can't fix it.

-[Unknown]

Offline joker

  • Semi-Newbie
  • *
  • Posts: 96
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #9 on: May 28, 2005, 10:40:34 AM »
I run my own server, the /tmp IS empty and the error remains the same.  :-\
joker ;-)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Detecting Multiple Accounts
« Reply #10 on: May 28, 2005, 10:44:50 AM »
Then perhaps tmp_table_size is larger than the available space in the /tmp partition.  Check "df".

-[Unknown]

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Detecting Multiple Accounts
« Reply #11 on: August 27, 2005, 11:33:19 AM »

i believe that this one is going to be useful.  however, i can't really understand how i would edit the database info as you have posted.   can you post an example?

mine is now like this:

Code: [Select]
// Database name
$accounts_db_name="smf";

// Database tables
$db_message_table="smf_messages";
$db_member_table="smf_members";

// Make sure table name includes database name
$db_message_table="`$accounts_db_name`.`$db_message_table`";
$db_member_table="`$accounts_db_name`.`$db_member_table`";

require('http://catbalogan.com/discussion/SSI.php');

my database name is "smf"
i'm not sure how to the rest, although i know that my member and messages tables are simply "smf_members" and "smf_messages"

« Last Edit: August 27, 2005, 12:18:45 PM by malinaobenny »

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #12 on: August 28, 2005, 07:08:24 AM »
I've re-jigged the script a bit so it's easier to configure. Sounds like all you should have to do is update the system path to SSI.php. It can't be a URL, it has to be a filesystem path, such as /var/www/html/forums/SSI.php or /home/malinaobenny/www/forums/SSI.php.


Cheers
Mike

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Detecting Multiple Accounts
« Reply #13 on: August 29, 2005, 06:53:03 AM »

i already configured it as:

/malinaobenny/discussion/SSI.php


then i ran the PHP, but all i got is a blank white page

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #14 on: August 29, 2005, 09:34:19 AM »
That looks like it's not a complete path, check your Settings.php and use the value found in $boarddir as the directory. (Just append /SSI.php to that.)

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Detecting Multiple Accounts
« Reply #15 on: August 29, 2005, 10:24:13 AM »


i did, and it was only '/discussion' there, so i set it into '/discussion/SSI.php' but it didn't work either

Code: [Select]
require('discussion/SSI.php');

// Database name
$accounts_db_name="smf";

// Database tables
$db_message_table="smf_messages";
$db_member_table="smf_members";

// Make sure table name includes database name
$db_message_table="`$accounts_db_name`.`$db_message_table`";
$db_member_table="`$accounts_db_name`.`$db_member_table`";


Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #16 on: August 29, 2005, 10:39:57 AM »
You're missing a leading /:

require('/discussion/SSI.php');

If that's the right path, it should work. Anything in your web server error logs?

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Detecting Multiple Accounts
« Reply #17 on: August 29, 2005, 01:36:49 PM »

it now works, but this is what i got:

Quote
You have an error in your SQL syntax near 'OR ID_BOARD = 0)
ORDER BY addDeny DESC, ID_BOARD' at line 5
File: /discussion/Sources/Load.php
Line: 435

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Detecting Multiple Accounts
« Reply #18 on: August 29, 2005, 02:31:43 PM »
Works ok for me on a couple of test boards... have you made any changes to Load.php? Any mods installed?

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Detecting Multiple Accounts
« Reply #19 on: August 29, 2005, 02:47:52 PM »
yes, i had some mods

this is the code in the vicinity of line 435:

Code: [Select]
$request = db_query("
SELECT permission, addDeny
FROM {$db_prefix}member_permissions
WHERE ID_MEMBER = $ID_MEMBER
AND (ID_BOARD = $board OR ID_BOARD = 0)
[color=red]ORDER BY addDeny DESC, ID_BOARD", __FILE__, __LINE__);[/color]
$remove = array();
while ($row = mysql_fetch_assoc($request))
{
if (empty($row['addDeny']))
$removals[] = $row['permission'];