diff --git a/DepotDownloader/AccountSettingsStore.cs b/DepotDownloader/AccountSettingsStore.cs index 8bed9622..64078867 100644 --- a/DepotDownloader/AccountSettingsStore.cs +++ b/DepotDownloader/AccountSettingsStore.cs @@ -11,8 +11,7 @@ namespace DepotDownloader [ProtoContract] class AccountSettingsStore { - [ProtoMember(1, IsRequired = false)] - public Dictionary SentryData { get; private set; } + // Member 1 was a Dictionary for SentryData. [ProtoMember(2, IsRequired = false)] public ConcurrentDictionary ContentServerPenalty { get; private set; } @@ -26,7 +25,6 @@ namespace DepotDownloader AccountSettingsStore() { - SentryData = new Dictionary(); ContentServerPenalty = new ConcurrentDictionary(); LoginTokens = new Dictionary(); } diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 206b3b56..09ed25ac 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -112,26 +111,8 @@ namespace DepotDownloader this.callbacks.Subscribe(LogOnCallback); this.callbacks.Subscribe(SessionTokenCallback); this.callbacks.Subscribe(LicenseListCallback); - this.callbacks.Subscribe(UpdateMachineAuthCallback); Console.Write("Connecting to Steam3..."); - - if (details.Username != null) - { - var fi = new FileInfo(String.Format("{0}.sentryFile", logonDetails.Username)); - if (AccountSettingsStore.Instance.SentryData != null && AccountSettingsStore.Instance.SentryData.ContainsKey(logonDetails.Username)) - { - logonDetails.SentryFileHash = Util.SHAHash(AccountSettingsStore.Instance.SentryData[logonDetails.Username]); - } - else if (fi.Exists && fi.Length > 0) - { - var sentryData = File.ReadAllBytes(fi.FullName); - logonDetails.SentryFileHash = Util.SHAHash(sentryData); - AccountSettingsStore.Instance.SentryData[logonDetails.Username] = sentryData; - AccountSettingsStore.Save(); - } - } - Connect(); } @@ -749,35 +730,6 @@ namespace DepotDownloader } } - private void UpdateMachineAuthCallback(SteamUser.UpdateMachineAuthCallback machineAuth) - { - var hash = Util.SHAHash(machineAuth.Data); - Console.WriteLine("Got Machine Auth: {0} {1} {2} {3}", machineAuth.FileName, machineAuth.Offset, machineAuth.BytesToWrite, machineAuth.Data.Length); - - AccountSettingsStore.Instance.SentryData[logonDetails.Username] = machineAuth.Data; - AccountSettingsStore.Save(); - - var authResponse = new SteamUser.MachineAuthDetails - { - BytesWritten = machineAuth.BytesToWrite, - FileName = machineAuth.FileName, - FileSize = machineAuth.BytesToWrite, - Offset = machineAuth.Offset, - - SentryFileHash = hash, // should be the sha1 hash of the sentry file we just wrote - - OneTimePassword = machineAuth.OneTimePassword, // not sure on this one yet, since we've had no examples of steam using OTPs - - LastError = 0, // result from win32 GetLastError - Result = EResult.OK, // if everything went okay, otherwise ~who knows~ - - JobID = machineAuth.JobID, // so we respond to the correct server job - }; - - // send off our response - steamUser.SendMachineAuthResponse(authResponse); - } - private static void DisplayQrCode(string challengeUrl) { // Encode the link as a QR code