mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Kill HackIgnoreMachineID with fire
This commit is contained in:
@@ -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<CMsgClientLogon> logon = new ClientMsgProtobuf<CMsgClientLogon>(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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_ _ _ _
|
_ _ _ _
|
||||||
| | | | __ _ _ __ __| || | ___ _ __ ___
|
| | | | __ _ _ __ __| || | ___ _ __ ___
|
||||||
|
|||||||
@@ -1527,47 +1527,17 @@ namespace ArchiSteamFarm {
|
|||||||
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.GlobalConfig.HackIgnoreMachineID) {
|
SteamUser.LogOn(new SteamUser.LogOnDetails {
|
||||||
Logging.LogGenericWarning("Using workaround for broken GenerateMachineID()!", BotName);
|
Username = BotConfig.SteamLogin,
|
||||||
ArchiHandler.HackedLogOn(new SteamUser.LogOnDetails {
|
Password = BotConfig.SteamPassword,
|
||||||
Username = BotConfig.SteamLogin,
|
AuthCode = AuthCode,
|
||||||
Password = BotConfig.SteamPassword,
|
CellID = Program.GlobalDatabase.CellID,
|
||||||
AuthCode = AuthCode,
|
LoginID = LoginID,
|
||||||
CellID = Program.GlobalDatabase.CellID,
|
LoginKey = BotDatabase.LoginKey,
|
||||||
LoginID = LoginID,
|
TwoFactorCode = TwoFactorCode,
|
||||||
LoginKey = BotDatabase.LoginKey,
|
SentryFileHash = sentryHash,
|
||||||
TwoFactorCode = TwoFactorCode,
|
ShouldRememberPassword = true
|
||||||
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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
|
private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
|
||||||
|
|||||||
@@ -107,10 +107,6 @@ namespace ArchiSteamFarm {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal bool Statistics { get; private set; } = true;
|
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)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal HashSet<uint> Blacklist { get; private set; } = new HashSet<uint>(GlobalBlacklist);
|
internal HashSet<uint> Blacklist { get; private set; } = new HashSet<uint>(GlobalBlacklist);
|
||||||
|
|
||||||
|
|||||||
@@ -107,9 +107,6 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Statistics { get; set; } = true;
|
public bool Statistics { get; set; } = true;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
|
||||||
public bool HackIgnoreMachineID { get; set; } = false;
|
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public List<uint> Blacklist { get; set; } = new List<uint>();
|
public List<uint> Blacklist { get; set; } = new List<uint>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user