Interview with Jordan Mara

I would like to introduce to you a lovely young man, Jordan Mara. I first met Jordan approximately three years ago, although it seems that I have known him longer. His mom and I are acquaintances…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Steam Auto Login Project

Yesterday I started this project called Steam Auto Login, intending to make easier my life using many alternative accounts in my own computer without having the annoying part of typing every time the whole Steam Login and Auth code.

So i caught myself thinking about some user32.dll functions like SetForegroundWindow, GetForegroundWindow, FindWindow, FindWindowEx, GetWindowText, GetWindowTextLenght and every of those functions are perfect for doing that job, so why not?

I started first getting the process alive status checking with a thread every 10ms for Steam.exe in Windows Process List nothing special, in C# with

System.Diagnostics.Process.GetProcessesByName(“Steam”)

And after we grab this list we check for IList.Count() > 0 if the count value is greater than 0 we go to the second part

We check for our Steam windows status, but before anything we need to know that Steam doesn’t use Windows Forms API for rendering Steam instead they use SDL and Chromium for this job

So what we need to find those Windows?

Well FindWindowEx did the job, but for what we are searching for?

Remembering that FindWindowEx have 4 arguments

First of all we need to know how steam process looks like when we try to find it class and window name, for this task we gonna use a tool called Spy++ is easier and straight forward for what we need

Using Spy++ i found that Steam Main Application Window have the class vguiPopupWindow and Steam Login, Steam Guard, Steam Warning Windows shares the very same class, so this makes our job a bit easier

For the first step we need to check which window is currently running

For Steam Main -> Class: vguiPopupWindow Name: Steam

For Steam Login -> Class: vguiPopupWindow Name: Steam Login

For Steam Guard -> Class: vguiPopupWindow Name: Steam Guard –

but how we will manage to find all those Windows, because when we are dealing with FindWindowEx function the argument LPCSTR windowName only accept exact names

And we know Steam sometimes use the default dash character sometimes not so we can’t just copy paste the Window name because it will not work properly

Instead we will use user32!EnumWindows returns every created Window in Windows System with a class name and not required window name.

Now how we will use properly the EnumWindows function

Knowing this function have 2 arguments

First we need to know what this callback requires, so after a search on msdn we know this function will requires this

In C# this will be like

So know we can start finding those Steam windows using user32!EnumWindows and checking if their those Window names match our requirements

We will use the following process to find and test

Query All Windows then in our response callback we check for Class name and after checking for Window class we will check for Window title so only after this we will return the IntPtr (HANDLE) for the target Window

So now our software flow will work like this

Check if Steam process is alive then we check if Steam is not on Main Window after that we check if Steam Login Window exists so only after that we will start typing our user information using System.Windows.Forms.SendKeys from C#

And this is straight forward so after we check the for those Window status we can clearly input every information we want to.

and Steam.exe process have the argument -login and -shutdown for a safe manner of dealing with users informations

Add a comment

Related posts:

Superfluid Distributions

Superfluid is a smart contracts framework that adds functionalities to crypto tokens. We call these new functionalities agreements, they represent structured relationships between parties that last…

Teacurry Facial Hair Removal Tea

Teacurry Facial Hair Removal Tea. Facial hair growth is a natural phenomenon that affects both men and women. While it is perfectly normal for men to have a beard, mustache….

7 Ways To Build Solid Foundation Of Your Career In Your College Days.

Day by day competition to find matching job is going get fierce. It may not be sufficient to start thinking of your career in final year of your college. Those who start early and put strategic…