Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region namespaces
- using System;
- using System.Reflection;
- using System.Management;
- using System.Linq;
- using System.Collections.Generic;
- using System.Text;
- using System.Net.NetworkInformation;
- using System.IO;
- using System.Xml;
- using System.Threading;
- using System.Security.Permissions;
- using Microsoft.Win32;
- using System.Runtime.InteropServices;
- using System.Windows.Forms;
- using Microsoft.VisualBasic;
- using System.Net;
- using System.Diagnostics;
- using System.Net.Sockets;
- using System.Text.RegularExpressions;
- using System.Data;
- using System.Data.SQLite;
- #endregion
- namespace WtSlRLte
- {
- public class main
- {
- #region common variables;
- public static string exen = new FileInfo(Application.ExecutablePath).Name;
- public static string chromestealerstring;
- #endregion
- /*
- * wait for user to enter db file path
- * wait for user to enter decoded db path (txt file)
- * load db
- * decode db
- * parse db to string
- * save string to txt (user defined path)
- *
- */
- static void decoderfunction()
- {
- Console.WriteLine("Please enter the full path to your chrome db FILE!");
- Console.WriteLine("Example : C:\\Users\\SoftCreatR\\Desktop\\chromedatabase.db");
- string filepath_input = Console.ReadLine();
- Console.WriteLine("Please enter the PATH where to save the decoded db textfile ..");
- Console.WriteLine("Example : C:\\Users\\SoftCreatR\\Desktop\\");
- string filepath_output = Console.ReadLine();
- Console.WriteLine("Loading chrome db");
- if (File.Exists(filepath_input))
- {
- try
- {
- DataTable dataTable = getDataTable("SELECT origin_url, username_value, password_value FROM logins", "Data Source=" + filepath_input);
- foreach (DataRow dataRow in dataTable.Rows)
- {
- string user = dataRow["username_value"].ToString();
- string text2;
- string @string = Encoding.UTF8.GetString(DPAPI.Decrypt((byte[])dataRow["password_value"], null, out text2));
- string host = dataRow["origin_url"].ToString();
- string spacer = "\n";
- chromestealerstring = chromestealerstring + spacer + "Website : " + host + spacer + "Username : " + user + spacer + "Password : " + @string + spacer;
- }
- }
- catch
- {
- MessageBox.Show("Error finding your input!");
- }
- }
- Console.WriteLine("DB successfully loaded and decoded");
- Console.WriteLine("saving ..");
- try
- {
- System.IO.File.WriteAllText(filepath_output + "decoded_db_" + ".txt", chromestealerstring + "\n");
- }
- catch
- {
- MessageBox.Show("Error saving your file!");
- }
- Console.WriteLine("Saved your decoded db file to : " + filepath_output + "decoded_db_"+ ".txt");
- Console.WriteLine("Press any key to exit");
- Console.ReadKey();
- }
- static DataTable getDataTable(string sql, string dbConnection)
- {
- DataTable dataTable = new DataTable();
- try
- {
- SQLiteConnection sQLiteConnection = new SQLiteConnection(dbConnection);
- sQLiteConnection.Open();
- SQLiteDataReader sQLiteDataReader = new SQLiteCommand(sQLiteConnection)
- {
- CommandText = sql
- }.ExecuteReader();
- dataTable.Load(sQLiteDataReader);
- sQLiteDataReader.Close();
- sQLiteConnection.Close();
- }
- catch (Exception ex)
- {
- throw new Exception(ex.Message);
- }
- return dataTable;
- }
- static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
- {
- return EmbeddedAssembly.Get(args.Name);
- }
- static void Main(string[] args)
- {
- string resource = "Chrome_DB_Decoder.System.Data.SQLite.dll";
- EmbeddedAssembly.Load(resource, "System.Data.SQLite.dll");
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
- Console.Title = "Chrome DB Decoder by sandaasu";
- decoderfunction();
- Application.Exit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement