Example #1
0
        private void OnConnected(SteamKit2.SteamClient.ConnectedCallback obj)
        {
            logger.Info("Connection to SteamClient is successful.");

            logger.Info($"Logging on to Steam with bot '{BotName}'...");
            steamUser.LogOn(LogOnParameters);
        }
Example #2
0
        void OnConnected(SteamKit2.SteamClient.ConnectedCallback callback)
        {
            if (callback.Result == EResult.NoConnection)
            {
                Console.WriteLine("Not connected to the internet.  Gonna take a little longer than usual.",
                                  Console.ForegroundColor = ConsoleColor.Green);
                Thread.Sleep(25000);
            }
            if (callback.Result != EResult.OK)
            {
                Console.WriteLine("OH NO! I CAN'T BELIEVE IT!  Steam won't talk to me." + callback.Result,
                                  Console.ForegroundColor = ConsoleColor.Green);
                return;
            }

            Console.WriteLine("Connected to Steam.");
            Console.WriteLine("Logging in, reversing the polarity of the neutron flow!",
                              Console.ForegroundColor = ConsoleColor.Green);

            byte[] sentryHash = null;
            if (File.Exists("sentry.bin"))
            {
                byte[] sentryFile = File.ReadAllBytes("sentry.bin");

                sentryHash = CryptoHelper.SHAHash(sentryFile);
                if (RememberMe && File.Exists("UserKey.bin"))
                {
                    byte[] keyhashed = File.ReadAllBytes("UserKey.bin");
                    RememberKey =
                        Encoding.Unicode.GetString(CryptoHelper.SymmetricDecrypt(keyhashed, getstandardkey()));
                }

                if (decrwSentP == true)
                {
                    byte[] phashed = File.ReadAllBytes("UserPass.bin");
                    strPassword = Encoding.Unicode.GetString(CryptoHelper.SymmetricDecrypt(phashed, getstandardkey()));
                }
            }

            steamUser.LogOn(new SteamUser.LogOnDetails
            {
                Username = strUser,
                Password = strPassword,

                AuthCode = authCode,

                TwoFactorCode = twofactor,

                LoginKey = RememberKey,

                ShouldRememberPassword = RememberMe,

                SentryFileHash = sentryHash,
            });
        }
        private void OnConnected(SteamKit2.SteamClient.ConnectedCallback callback)
        {
            ConsoleSystem.Log("Connected to Steam! Logging in '{0}'...", _user);

            _steamUser.LogOn(new SteamUser.LogOnDetails
            {
                Username = _user,
                Password = _password,

                AuthCode      = _authCode,
                TwoFactorCode = _twoFactorAuth
            });
        }
Example #4
0
        void OnConnected(SK.SteamClient.ConnectedCallback callback)
        {
            SK.SteamUser.LogOnDetails loginDetails = new SK.SteamUser.LogOnDetails
            {
                Username = Username,
                Password = Password
            };

            if (!string.IsNullOrWhiteSpace(AuthenticationCode))
            {
                loginDetails.AuthCode       = AuthenticationCode;
                loginDetails.TwoFactorCode  = AuthenticationCode;
                loginDetails.SentryFileHash = GetSentryHash();
            }

            steamUser.LogOn(loginDetails);

            Connected?.Invoke(this, null);
        }
Example #5
0
 private void onConnected(SteamKit2.SteamClient.ConnectedCallback callback)
 {
     onConnectedResult = callback.Result;
     onConnectedEvent.Set();
 }
Example #6
0
 private void OnConnected(SteamKit.SteamClient.ConnectedCallback callback)
 {
     AttemptLogin();
 }