Anonymous User ID: #
Jay99 Offline
Junior Member
**
Posts: 11
Joined: May 2011
Post: #1
Anonymous User ID: #
Hello everyone,

I am looking for some help or a plugin that can add a User Id: #.... to all users upon posting.

Let me explain,

I have enabled the guest posting feature, now of course each anonymous poster must be unique....since each member is already unique.

What I would like to see is Every Registered User and Every Anonymous User when they post a message I want the system to check if the IP Address has been logged and ASSIGN a numerical incremental value to User ID: # 1, User ID: # 2, and so on...
05-22-2011 07:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Anonymous User ID: #
Probably easier just to hash/encrypt the IP address and display that rather than some incremental thing.
But users on dynamic IPs will have multiple identities anyway.

My Blog
05-22-2011 09:01 AM
Find all posts by this user Quote this message in a reply
Jay99 Offline
Junior Member
**
Posts: 11
Joined: May 2011
Post: #3
RE: Anonymous User ID: #
(05-22-2011 09:01 AM)ZiNgA BuRgA Wrote:  Probably easier just to hash/encrypt the IP address and display that rather than some incremental thing.
But users on dynamic IPs will have multiple identities anyway.

Hi ZiNgA,

Yes, I know.....I already tried
Quote:$post['uid'] = ip2long($post['ipaddress']);
in functions_post.php. But the problem I have is that the number shown is reversible with online tools....thereby exposing every ones IP Address. Not cool at all.

How about can ip2long be encrypted further?
05-22-2011 09:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Anonymous User ID: #
ip2long doesn't encrypt or hash the IP, so yes, it's completely reversable.

Hashing functions would mainly be md5() and sha1().  As these are long, you may wish to truncate the hashes a bit.  Be sure to add in a "salt" or static unquifier unknown to the user, otherwise these hashes will also be reversable.

Some sites just hide the last two octets of the IP address.  That may also be a solution which may work a bit better with dynamic IPs, at the cost of being less unique.

My Blog
(This post was last modified: 05-22-2011 09:46 AM by ZiNgA BuRgA.)
05-22-2011 09:45 AM
Find all posts by this user Quote this message in a reply
Jay99 Offline
Junior Member
**
Posts: 11
Joined: May 2011
Post: #5
RE: Anonymous User ID: #
(05-22-2011 09:45 AM)ZiNgA BuRgA Wrote:  ip2long doesn't encrypt or hash the IP, so yes, it's completely reversable.

Hashing functions would mainly be md5() and sha1().  As these are long, you may wish to truncate the hashes a bit.  Be sure to add in a "salt" or static unquifier unknown to the user, otherwise these hashes will also be reversable.

Some sites just hide the last two octets of the IP address.  That may also be a solution which may work a bit better with dynamic IPs, at the cost of being less unique.

Ok Thanks,

I'm going to do some more research on this issue. I know that what I want, has been done already, I just don't know How.

Here's my example: Godlike Productions

The reason I like it so much is that is short and sweet, no 34 characters, weird characters, just straight sequential numbers.

Every user id is based upon a unique ip address so no 2 are alike, including registered members. It's a custom system obviously, I just love to duplicated.
05-22-2011 10:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Anonymous User ID: #
Well, if you're willing to put the effort to make a sequential number system, be my guest.

Hide last two octets:

PHP Code:
long2ip(ip2long($post['ipaddress']) & 0xFFFF0000)


Hash:

PHP Code:
substr(sha1($post['ipaddress'] . substr($mybb->settings['internal']['encryption_key'], 0, 8)), 0, 8)


Quite simple really.


My Blog
(This post was last modified: 05-22-2011 03:07 PM by ZiNgA BuRgA.)
05-22-2011 03:05 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: