SteamTool

Messages
2,664
Reaction score
4,283
Points
845
"
A windows program written in C# that allows for easy accesability to steam account information."
- Github Description, 2016.


SteamTool? What is it?


Github | Report a bug | Contact
Steamtool is a project i started last week, my goal was to make it easy for the end user to retrieve their steamID, profile URL or custom profile url all with 1 click of a button, in a easy to use and fast UI.

But i can use steamidfinder/steamid.co/steamid.com etc!
You can, sure, but it's alot harder if your name isn't unique and doesn't contain dozens of icons, and even if it doesn't, here's a prime example why it is not 100% reliable.

How does it work?
In your registry, steam stores your userid. Idk why.
Based on this number, you can create your steamID, there's some sick advanded mathematics going on there.
Based on the same user ID, you apply some more math and get your profile URL.
Viseting the profile URL in the same application, and retrieving the url 5 seconds later and you get the custom URL, in case you've set one!


VIRUZ!! H3X0R SPYW@R3111!!!!!!111!
The code is on github
so go compile it yourself if you think it has a virus.
please note avast and some other virus scanners don't really like me, since i didn't digitally sign the installer(idk why but it didnt work)

Download here:
https://www.dropbox.com/s/sjt8cba4l1wvhgx/SteamTool.exe?dl=1
- Windows 7+ (Net 3.5)
- Internet connection during installation(For the customURL)



See source files
Screenshots:
c1c49cf3c1.png


Todo:

- Hotkeys
- Voice confirmation when using hotkeys(useful whenever IG for example)
- Teeny tiny fixes such as making forms more neat, making them fixed sizes etc.
- Whatever you guys suggest!
 
This seems like a really great idea, but surely you could, if IG use "status" to do it, I understand if you're outside of game it may not be as reliable to use www.steamidfinder.com but what is it gonna use when the button is pressed to get the steamID, it has to get it from somewhere.
 
This seems like a really great idea, but surely you could, if IG use "status" to do it, I understand if you're outside of game it may not be as reliable to use www.steamidfinder.com but what is it gonna use when the button is pressed to get the steamID, it has to get it from somewhere.
In your registry, steam stores your userid. Idk why.
Based on this number, you can create your steamID, there's some sick advanded mathematics going on there.
Based on the same user ID, you apply some more math and get your profile URL.

Not 100% sure what the exact calculation was, ill search for it
[DOUBLEPOST=1473703085,1473702617][/DOUBLEPOST]
This seems like a really great idea, but surely you could, if IG use "status" to do it, I understand if you're outside of game it may not be as reliable to use www.steamidfinder.com but what is it gonna use when the button is pressed to get the steamID, it has to get it from somewhere.

I was looking for how to do this within c#/c++ and found a batch file with retrieved it from the registry, i based it upon that.

I started with the steamID:

]
Code:
@echo off
if NOT %1a == a goto recurse
reg query HKCU\Software\Valve\Steam\Users > users.tmp
echo.

echo 
for /f "skip=1 delims=\ tokens=6" %%i in (users.tmp) do call %0 %%i
del users.tmp
echo 

pause>nul
goto end

:recurse

set SID=%1
set /A SID=SID/2
set /A SID1=SID*2
set STEAMBIT=0
if NOT %SID1% == %1 set STEAMBIT=1

    echo UserID: %SID%   SteamBit: %STEAMBIT%
    SET /A Low = ( %SID% * 2 ) + ( %STEAMBIT% + 960265728 ),  High = Low / 1000000000 + 76561197
    echo %High%%Low:~-9% > useridresult.txt

:end

exit

Since batch only supports 32 bit numbers, some more things got involved (high/low)

Then, i went to the Long steamID (the profile URL)

Code:
@echo off
if NOT %1a == a goto recurse
reg query HKCU\Software\Valve\Steam\Users > users.tmp
echo.
echo
for /f "skip=1 delims=\ tokens=6" %%i in (users.tmp) do call %0 %%i
del users.tmp
echo
pause>nul
goto end
:recurse
set SID=%1
set /A SID=SID/2
set /A SID1=SID*2
set STEAMBIT=0
if NOT %SID1% == %1 set STEAMBIT=1
echo UserID: %SID% SteamBit: %STEAMBIT%
SET /A Low = ( %SID% * 2 ) + ( %STEAMBIT% + 960265728 ), High = Low / 1000000000 + 76561197
echo %High%%Low:~-9% > useridresult.txt
:end
exit

This has the long number, which can be set to an url with the following pretty much like this


string contents = File.ReadAllText("useridresult.txt");
Clipboard.SetText("http://steamcommunity.com/profiles/"+contents);
label2.Text = "Profile URL copied to clipboard";


By creating another form with a webbrowser element, i can set it to navigate to the profile URL.
if you have a custom url it will automaticlly change to that instead, so when the thing loads, the following happens:

Code:
private void Form5_Load(object sender, EventArgs e)
{
// Lets navigate to the URL
string geturl = System.IO.File.ReadAllText("useridresult.txt");
this.webBrowser1.Navigate("http://steamcommunity.com/profiles/" + geturl);
}

// When webpage loads
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
button1.Visible = true;
button1.Enabled = true;
button1.PerformClick(); // Activate an invisible button
button1.Visible = false;
}

//write the URL to a string then use it
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = webBrowser1.Url.ToString();
}
//When the custom URL gets found, insert it into textbox
private void textBox1_TextChanged(object sender, EventArgs e)
{
string writetheurl = textBox1.Text;
File.WriteAllText("customurl.txt", writetheurl);
File.WriteAllText("tempcustomurlinstallation.txt", "Ayy, you're a curious one aren't you?");
File.Create("setupcomplete.txt");
MessageBox.Show("Setup complete, you can now disable or enable various settings in the configuration tab, you can also reset at anytime");
Application.Restart();

That's probably not in the correct order, since i really quickly copy paste'd but it's all on github
 
I tried it out and it's a very nice program now if i want my steamid i can just use that program. Thank you so much for this and it is a very helpful program.
 
/mobile

It comes up with my borthers account which is family shared and not my account which is the latest and current account logged in
Okay thanks for letting me know about this. Steam stores the last account that logged in in the registry which i guess only works when its not family shared. I'll check tonight what behaviour it will show in the registry when i use a family shared account.
 
Back
Top