mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-10 05:34:25 +00:00
Bring back HackedLogOn()
It's still needed...
This commit is contained in:
@@ -177,6 +177,44 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// TODO: Remove me once https://github.com/SteamRE/SteamKit/issues/305 is fixed
|
||||||
|
internal void LogOnWithoutMachineID(SteamUser.LogOnDetails details) {
|
||||||
|
ClientMsgProtobuf<CMsgClientLogon> logon = new ClientMsgProtobuf<CMsgClientLogon>(EMsg.ClientLogon);
|
||||||
|
|
||||||
|
SteamID steamId = new SteamID(details.AccountID, details.AccountInstance, Client.ConnectedUniverse, EAccountType.Individual);
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
internal void PlayGame(string gameName) {
|
internal void PlayGame(string gameName) {
|
||||||
if (!Client.IsConnected) {
|
if (!Client.IsConnected) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1521,7 +1521,7 @@ namespace ArchiSteamFarm {
|
|||||||
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamUser.LogOn(new SteamUser.LogOnDetails {
|
SteamUser.LogOnDetails logOnDetails = new SteamUser.LogOnDetails {
|
||||||
Username = BotConfig.SteamLogin,
|
Username = BotConfig.SteamLogin,
|
||||||
Password = BotConfig.SteamPassword,
|
Password = BotConfig.SteamPassword,
|
||||||
AuthCode = AuthCode,
|
AuthCode = AuthCode,
|
||||||
@@ -1531,7 +1531,14 @@ namespace ArchiSteamFarm {
|
|||||||
TwoFactorCode = TwoFactorCode,
|
TwoFactorCode = TwoFactorCode,
|
||||||
SentryFileHash = sentryHash,
|
SentryFileHash = sentryHash,
|
||||||
ShouldRememberPassword = true
|
ShouldRememberPassword = true
|
||||||
});
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
SteamUser.LogOn(logOnDetails);
|
||||||
|
} catch {
|
||||||
|
// TODO: Remove me once https://github.com/SteamRE/SteamKit/issues/305 is fixed
|
||||||
|
ArchiHandler.LogOnWithoutMachineID(logOnDetails);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
|
private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user