Convert STEAMID to Steam Community ID
I figured I would share this little snippet, this will convert a STEAMID to the a players friendID which is used for steam community.
What could potentially be done with this, is to fetch data on a player, see what groups he is in, and basically gives you the flexibility to ban whole groups from your server without knowing all of their steamids. At least, thats what I intend to do with it. You can also of course do the reverse, converting friend ID's to steamids. PHP Code:
Edit: Using this a Pure MySQL was created |
Re: Convert STEAMID to Steam Community ID
Really interesting data...
I would never have thought there was a relation ship +Karma for you |
Re: Convert STEAMID to Steam Community ID
That's pretty awesome, voogru. I'm curious as to how you discovered this -- observation with some trial and error?
out of boredom I went and looked up the first few steamids to see how many were definitely valve employees: Code:
steam_0:0:1 (alfred) |
Re: Convert STEAMID to Steam Community ID
Quote:
I got the friendID for these two ID's: STEAM_0:1:1182 (76561197960268093) STEAM_0:1:30679 (76561197960327087) I noticed that the 2 friend ID's were identicle up until 11th number. 76561197960 268093 76561197960 327087 Then I tried this: 76561197960327087 - 76561197960268093 = 58994 Result was higher than expected, so I cut it in half for giggles. 58994 / 2 = 29497 Hmm.. not too far from 30679.. 29497 + 1182 = 30679 DING DING DING DING and 30679 - 29497 = 1182 DING DING DING DING :D To get the first number, I then did: 76561197960268093 - (1182 * 2) = 76561197960265729 But, I use the 76561197960265728 number and then just increment it by what the auth server is. There does not appear to be a STEAM_0:0:0 ID, but there is a STEAM_0:1:0 ID. Now with this knowledge, I also have the option of storing steamid's as 64 bit ints rather than strings. My question to valve is where the hell did they pull out a number like 76561197960265728. A friend of mine pointed out when it's converted to hex it's 110000100000000, but no idea if that is significant or not. |
Re: Convert STEAMID to Steam Community ID
holy cow
|
Re: Convert STEAMID to Steam Community ID
Wow
That's really clever! |
Re: Convert STEAMID to Steam Community ID
voogru: thanks for the logic path behind that :)
Of course you could just store them as 32-bit integers if you wanted... if you just do the X*2 + 1, it will be a long time before they overflow. Nice idea either way for lookup algorithms. |
Re: Convert STEAMID to Steam Community ID
Quote:
|
Re: Convert STEAMID to Steam Community ID
Quote:
|
Re: Convert STEAMID to Steam Community ID
You should post this in the AMXX section too.
|
Re: Convert STEAMID to Steam Community ID
Woah, thats really cool.
I am impressed. +karma. |
Re: Convert STEAMID to Steam Community ID
Wow, nice.
|
Re: Convert STEAMID to Steam Community ID
i think i just had a moment. this can be used to give admin to certain groups or special abilities and more. this is revolutionary. DAMN.
|
Re: Convert STEAMID to Steam Community ID
Now my question is when would we see this implemented into a nice plugin for end users?
You could do a lot of interesting things with a plugin that used that, maybe even find steam community groups or something and join them from a server. |
Re: Convert STEAMID to Steam Community ID
Interesting. Bannage by user groups might be useful to implement into my PUG mod.
Roach now has power in this forum. |
Re: Convert STEAMID to Steam Community ID
2 Attachment(s)
I made a PHP script that batch converts both ways.
http://www.joe.to/moo/sid_convert.php Source code attached. you don't need to clean the input, you can paste your admins ini and have the output be the same as your input except for the links Old attachment view count: 2814 views (1747 + 467 + 600) |
Re: Convert STEAMID to Steam Community ID
really nice :)
|
Re: Convert STEAMID to Steam Community ID
very nice thx
|
Re: Convert STEAMID to Steam Community ID
BRILLIANT!!!!!!
I need to integrate this on my forums! |
Re: Convert STEAMID to Steam Community ID
I just wanted to pay homage and say thanks to Voogru for posting this, it's come in EXTREMELY handy. We use in our server administration and it helps greatly. Thanks!
http://www.oldtimersclan.com/post_img/scuztools1.jpg |
Re: Convert STEAMID to Steam Community ID
That administration panel looks pretty impressive. I like the idea of automatically banning previously banned players using a different account. Do you use set_user_info(), IP address or another method?
|
Re: Convert STEAMID to Steam Community ID
Quote:
1) Get all IPs registered for the account, search for all steam-ids associated with that IP. 2) Ban all IDs associated with that IP. Check all IPs for each account banned for additional accounts, repeating the process. This trees out and finds and removes all associated accounts in a recursive process. We don't only run this process on accounts that have been banned though. If an account that was previously banned connects to the server we log the "denied" connection and save the IP. We then run that IP through the process above and nuke an previously undected new accounts of the "LLama". But wait, there's more! If an unbanned account connects to the server we check the IP of that account against the IPs of all previously banned accounts. If that player is playing from the same IP that a previously banned account has, they're immediately banned as well. We don't like Llamas. We don't like it when they return. I also hate "cafe" accounts, we have more idiots play from steam cafes then I care to count. Nothing like total inaccountability to make someone as asshat in a server. This pretty much eliminates them. Scuzzy |
Re: Convert STEAMID to Steam Community ID
And also eliminates anyone with a dynamic IP address on the same ISP as "the banned"?
|
Re: Convert STEAMID to Steam Community ID
Quote:
1) They both have to have the same ISP 2) They have to have Dynamic IPS. 3) One has to be banned. 4) The second has to get that bad IP. 5) They have to both play Steam Games, either TFC/FF/TF2 (Out of the hundreds of thousands of players) 6) They both have to choose our server (out of the 4000+ available in North America alone) Scuzzy |
Re: Convert STEAMID to Steam Community ID
1) "big popular" ISPs are often filling multiple slots on any server
2) If they are on the same ISP, chances are they are both on dynamic addressing 3) A ban increases the chance your system will fail :p 4) Each ISP will have its own way of doing things, some rotate IP addresses automatically so the chances could be quite high 5) True, but hundreds of thousands of players only increases the chance your system will fail 6) If the ISP has a good route to your server, chances are people from the same ISP will join due to the lower pings Plus, you will not be able to identify "false bans" as you could not have a method to verify the identity of the people banned. If we all had static IP addresses, this system would be great - but most domestic connections have a dynamic IP address. If you have lots of bans due to your IP tracking, then personally I would be a bit worried about who I'm banning :D Also, you might want to keep in mind that most kids with a cafe account probably ritually change their IP address to avoid IP bans & mask their identity. If I were in your place, I would only track multiple bans from the same IP address. Once an address has reached a pre-set limit only then would I wipe out the IP. Its far from perfect though, and the same problems still apply - just the chances of banning the wrong people are less due to the "ban limit" buffer. I'm just picking holes anyway, don't mind me - I'm a system whore :] |
Re: Convert STEAMID to Steam Community ID
Quote:
74921 had 9 IPs or lessIt may untentionally ban one or two people out of a few hundred thousand, but I think the margin for error is pretty small. We've also received 0 complaints that a ban was incorrect because of this reason, and we get unban requests every day. We're more willing to crack a few eggs then deal with Llamas over and over again. There are plenty of good servers to play on, being limited away from ours doesn't really hurt anyone. Scuzzy |
Re: Convert STEAMID to Steam Community ID
Wow, very nice find!
|
Re: Convert STEAMID to Steam Community ID
In the first posts of this topic i readed it would be possible to get the steamcommunity information from every desired steamID. If this is correct it would be the plugin or software i need because the player with STEAMID *********** discovered my rcon password due unknown reason. The same IP also hacked my website. To prevent this in the future i've to fix the leak and need to know how he did it. Therefor i need all the info i can get about the the STEAMID **********.
If possible i hope someone can help me to get more information about STEAMID ************. |
Re: Convert STEAMID to Steam Community ID
BTW, for anyone interested in doing this strictly in mySQL, like a trigger to calculate this field when you create a player record... I found some issues getting mySQL to actually ADD the numbers together. I finally came up with this:
Code:
Cheers, Scuzzy |
Re: Convert STEAMID to Steam Community ID
You are awesome Scuzzy! This is really the steamcommunity ID i was looking for and now i can get in touch witch the person that broke into my server. I've only one more question Scuzzy. Would it be possible that you remove the steamid out of my quoted reply because i don't want that this hacker know i'm looking for him. If you remove it i will remove it from my post to, if you don't want to remove it's fine to because you helped me already so much!
|
Re: Convert STEAMID to Steam Community ID
Quote:
|
Re: Convert STEAMID to Steam Community ID
Thanks again Scuzzy! But i have already a new question. I tested with my own steamid aswell with some friends steamid and everything is works correct when i use the formule
steamcommunityID - (steamID * 2) = 76561197960265729 If i take for example the steamID's STEAM_0:0:123456 STEAM_0:1:123456 They both reffer to that same steamcommunityID, how can i be sure to wich of the both steamID's belong the the calculated steamcommunutyID? |
Re: Convert STEAMID to Steam Community ID
Quote:
STEAM_0:0:123456 = 0 + 76561197960265728 + (123456*2) STEAM_0:1:123456 = 1 + 76561197960265728 + (123456*2) Scuzzy |
Re: Convert STEAMID to Steam Community ID
1 Attachment(s)
I got a bit bored, so I made a Python script for it. It took me way longer than it should've...I spent most of the time on the fluff (options, about, etc).
|
Re: Convert STEAMID to Steam Community ID
Quote:
Code:
Fatal error: Call to undefined function bcmul() in /usr/local/www/www.joe.to/moo/sid_convert.php on line 38 |
Re: Convert STEAMID to Steam Community ID
Quote:
Thanks, P2 |
Re: Convert STEAMID to Steam Community ID
StevenT: fixed, after all these years we finally got a decent connection / OS for our site.
http://www.joe.to/moo/sid_convert.php |
Re: Convert STEAMID to Steam Community ID
Quote:
|
Re: Convert STEAMID to Steam Community ID
Should anyone want it, I made this into a little mIRC Script (So you can type /profile STEAMID or COMMUNITY ID to get the steamid or community url returned.
Just read the remarks to see how to install and use, pretty simple. I also set this up in the SourceMod IRC Channel (#sourcemod on gamesurge) just type !profile STEAMID or COMMUNITY ID and if i'm online it'll reply for you :P Code:
; Script to turn STEAM_IDs into Community page URLS and the other way around. Created by CShadowRun! |
Re: Convert STEAMID to Steam Community ID
Phoenix2, it's a Python script. After you've installed Python onto your computer, download the script, remove the .txt extension, and run the script from the command-line.
|
All times are GMT -4. The time now is 18:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.