diff --git a/ArchiSteamFarm/ArchiHandler.cs b/ArchiSteamFarm/ArchiHandler.cs index a082e6fc0..4d34138f4 100644 --- a/ArchiSteamFarm/ArchiHandler.cs +++ b/ArchiSteamFarm/ArchiHandler.cs @@ -250,39 +250,6 @@ namespace ArchiSteamFarm { } } - // TODO: Please remove me immediately after https://github.com/SteamRE/SteamKit/issues/254 gets fixed - internal void HackedLogOn(SteamUser.LogOnDetails details) { - if (!Client.IsConnected) { - return; - } - - SteamID steamID = new SteamID(details.AccountID, details.AccountInstance, Client.ConnectedUniverse, EAccountType.Individual); - - ClientMsgProtobuf logon = new ClientMsgProtobuf(EMsg.ClientLogon); - if (details.LoginID != null) { - logon.Body.obfustucated_private_ip = details.LoginID.Value; - } - - logon.ProtoHeader.client_sessionid = 0; - logon.ProtoHeader.steamid = steamID.ConvertToUInt64(); - logon.Body.account_name = details.Username; - logon.Body.password = details.Password; - logon.Body.should_remember_password = details.ShouldRememberPassword; - logon.Body.protocol_version = MsgClientLogon.CurrentProtocol; - logon.Body.client_os_type = (uint) details.ClientOSType; - logon.Body.client_language = details.ClientLanguage; - logon.Body.cell_id = details.CellID; - logon.Body.steam2_ticket_request = details.RequestSteam2Ticket; - logon.Body.client_package_version = 1771; - logon.Body.auth_code = details.AuthCode; - logon.Body.two_factor_code = details.TwoFactorCode; - logon.Body.login_key = details.LoginKey; - logon.Body.sha_sentryfile = details.SentryFileHash; - logon.Body.eresult_sentryfile = (int) (details.SentryFileHash != null ? EResult.OK : EResult.FileNotFound); - - Client.Send(logon); - } - /* _ _ _ _ | | | | __ _ _ __ __| || | ___ _ __ ___ diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 44c5e5c68..fcb51a961 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -1527,47 +1527,17 @@ namespace ArchiSteamFarm { TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false); } - if (Program.GlobalConfig.HackIgnoreMachineID) { - Logging.LogGenericWarning("Using workaround for broken GenerateMachineID()!", BotName); - ArchiHandler.HackedLogOn(new SteamUser.LogOnDetails { - Username = BotConfig.SteamLogin, - Password = BotConfig.SteamPassword, - AuthCode = AuthCode, - CellID = Program.GlobalDatabase.CellID, - LoginID = LoginID, - LoginKey = BotDatabase.LoginKey, - TwoFactorCode = TwoFactorCode, - SentryFileHash = sentryHash, - ShouldRememberPassword = true - }); - return; - } - - try { - SteamUser.LogOn(new SteamUser.LogOnDetails { - Username = BotConfig.SteamLogin, - Password = BotConfig.SteamPassword, - AuthCode = AuthCode, - CellID = Program.GlobalDatabase.CellID, - LoginID = LoginID, - LoginKey = BotDatabase.LoginKey, - TwoFactorCode = TwoFactorCode, - SentryFileHash = sentryHash, - ShouldRememberPassword = true - }); - } catch (Exception) { - ArchiHandler.HackedLogOn(new SteamUser.LogOnDetails { - Username = BotConfig.SteamLogin, - Password = BotConfig.SteamPassword, - AuthCode = AuthCode, - CellID = Program.GlobalDatabase.CellID, - LoginID = LoginID, - LoginKey = BotDatabase.LoginKey, - TwoFactorCode = TwoFactorCode, - SentryFileHash = sentryHash, - ShouldRememberPassword = true - }); - } + SteamUser.LogOn(new SteamUser.LogOnDetails { + Username = BotConfig.SteamLogin, + Password = BotConfig.SteamPassword, + AuthCode = AuthCode, + CellID = Program.GlobalDatabase.CellID, + LoginID = LoginID, + LoginKey = BotDatabase.LoginKey, + TwoFactorCode = TwoFactorCode, + SentryFileHash = sentryHash, + ShouldRememberPassword = true + }); } private async void OnDisconnected(SteamClient.DisconnectedCallback callback) { diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index cf3640ee2..bbbd523dd 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -107,10 +107,6 @@ namespace ArchiSteamFarm { [JsonProperty(Required = Required.DisallowNull)] internal bool Statistics { get; private set; } = true; - // TODO: Please remove me immediately after https://github.com/SteamRE/SteamKit/issues/254 gets fixed - [JsonProperty(Required = Required.DisallowNull)] - internal bool HackIgnoreMachineID { get; private set; } = false; - [JsonProperty(Required = Required.DisallowNull)] internal HashSet Blacklist { get; private set; } = new HashSet(GlobalBlacklist); diff --git a/ConfigGenerator/GlobalConfig.cs b/ConfigGenerator/GlobalConfig.cs index 77f210bbc..04625fa16 100644 --- a/ConfigGenerator/GlobalConfig.cs +++ b/ConfigGenerator/GlobalConfig.cs @@ -107,9 +107,6 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public bool Statistics { get; set; } = true; - [JsonProperty(Required = Required.DisallowNull)] - public bool HackIgnoreMachineID { get; set; } = false; - [JsonProperty(Required = Required.DisallowNull)] public List Blacklist { get; set; } = new List();