Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

UPDATE: Adding cookie "steamLoginSecure" #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Source/IdleMaster/CookieClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected override WebResponse GetWebResponse(WebRequest request, System.IAsyncR
Settings.Default.steamparental = string.Empty;
Settings.Default.steamMachineAuth = string.Empty;
Settings.Default.steamRememberLogin = string.Empty;
Settings.Default.steamLoginSecure = string.Empty;
Settings.Default.Save();
}
}
Expand All @@ -62,6 +63,7 @@ public static CookieContainer GenerateCookies()
cookies.Add(new Cookie("steamLogin", Settings.Default.steamLogin) { Domain = target.Host });
cookies.Add(new Cookie("steamparental", Settings.Default.steamparental) { Domain = target.Host });
cookies.Add(new Cookie("steamRememberLogin", Settings.Default.steamRememberLogin) { Domain = target.Host });
cookies.Add(new Cookie("steamLoginSecure", Settings.Default.steamLoginSecure) { Domain = target.Host });
cookies.Add(new Cookie(GetSteamMachineAuthCookieName(), Settings.Default.steamMachineAuth) { Domain = target.Host });
return cookies;
}
Expand Down
12 changes: 12 additions & 0 deletions Source/IdleMaster/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Source/IdleMaster/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
<Setting Name="OneThenMany" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="steamLoginSecure" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>
3 changes: 3 additions & 0 deletions Source/IdleMaster/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
<setting name="OneThenMany" serializeAs="String">
<value>True</value>
</setting>
<setting name="steamLoginSecure" serializeAs="String">
<value />
</setting>
</IdleMaster.Properties.Settings>
</userSettings>
<runtime>
Expand Down
7 changes: 7 additions & 0 deletions Source/IdleMaster/frmBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ private void frmBrowser_Load(object sender, EventArgs e)
InternetSetCookie("http://steamcommunity.com", "sessionid", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
InternetSetCookie("http://steamcommunity.com", "steamLogin", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
InternetSetCookie("http://steamcommunity.com", "steamRememberLogin", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
InternetSetCookie("http://steamcommunity.com", "steamLoginSecure", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");

// When the form is loaded, navigate to the Steam login page using the web browser control
wbAuth.Navigate("https://steamcommunity.com/login/home/?goto=my/profile", "_self", null, "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko");
Expand Down Expand Up @@ -132,6 +133,12 @@ private void wbAuth_DocumentCompleted(object sender, WebBrowserDocumentCompleted
{
Settings.Default.steamRememberLogin = cookie.Value;
}

// Save the "steamLoginSecure" cookie"
else if (cookie.Name == "steamLoginSecure")
{
Settings.Default.steamLoginSecure = cookie.Value;
}
}

// Save all of the data to the program settings file, and close this form
Expand Down
1 change: 1 addition & 0 deletions Source/IdleMaster/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ private void ResetClientStatus()
Settings.Default.steamLogin = string.Empty;
Settings.Default.myProfileURL = string.Empty;
Settings.Default.steamparental = string.Empty;
Settings.Default.steamLoginSecure = string.Empty;
Settings.Default.Save();

// Stop the steam-idle process
Expand Down