public void EditEntry(KeePassEntry entry) { if (entry.Password == "**********") { entry.Password = GetEntryPassword(entry.ID); } RemoveEntry(entry.ID); var updateEntry = new PwEntry(false, true); updateEntry.Uuid = new PwUuid(MemUtil.HexStringToByteArray(entry.ID)); updateEntry.Strings.Set("Title", new KeePassLib.Security.ProtectedString(true, entry.Title)); updateEntry.Strings.Set("UserName", new KeePassLib.Security.ProtectedString(true, entry.Username)); updateEntry.Strings.Set("Password", new KeePassLib.Security.ProtectedString(true, entry.Password)); if (!string.IsNullOrEmpty(entry.URL)) { updateEntry.Strings.Set("URL", new KeePassLib.Security.ProtectedString(true, entry.URL)); } if (!string.IsNullOrEmpty(entry.Notes)) { updateEntry.Strings.Set("Notes", new KeePassLib.Security.ProtectedString(true, entry.Notes)); } var group = _db.RootGroup.FindCreateGroup(entry.Group, true); group.AddEntry(updateEntry, true); _db.Save(null); }
protected override void Login() { using (KeePassService.Open()) { //change to username login Browser.FindElement(By.Id("tab-benutzer")).Click(); //type username Browser.FindElement(new ByIdOrName("loginform:LOGINNAME")).SendKeys(KeePassEntry.GetUserName()); //type password Browser.FindElement(new ByIdOrName("loginform:LOGINPASSWD")).SendKeys(KeePassEntry.GetPassword()); //check pass Browser.FindElement(new ByIdOrName("loginform:checkPasswort")).Click(); //type pin Browser.FindElement(new ByIdOrName("loginpinform:PIN")) .SendKeys(KeePassEntry.GetString(Configuration.AdditionalKeePassFields[Constants.DownloadHandler.RaiffeisenPin])); //final login Browser.FindElement(new ByIdOrName("loginpinform:anmeldenPIN")).Click(); Browser.FindElement(By.LinkText("Jetzt Mein ELBA starten")).Click(); } }
protected override void Login() { using (KeePassService.Open()) { Browser.FindElement(By.Name("login_email")).SendKeys(KeePassEntry.GetUserName()); Browser.FindElement(By.Name("login_password")).SendKeys(KeePassEntry.GetPassword()); Browser.FindElement(By.Name("btnLogin")).Click(); } }
protected override void Login() { using (KeePassService.Open()) { Browser.FindElement(By.Id("loginInputSelector")).SendKeys(KeePassEntry.GetUserName()); Browser.FindElement(By.Id("pinInputSelector")).SendKeys(KeePassEntry.GetPassword()); Browser.FindElement(By.Id("login")).Submit(); } }
public IActionResult Create([Bind("ID,Group,Title,Username,Password,URL,Notes")] KeePassEntry keePassEntry) { if (ModelState.IsValid) { _logger.LogInformation($"{User.Identity.Name} added entry with Title: '{keePassEntry.Title}'"); _keePassApi.AddEntry(keePassEntry); return(RedirectToAction(nameof(Index))); } return(View(keePassEntry)); }
protected override void Login() { using (KeePassService.Open()) { Browser.FindElement(By.Id("loginForm_userId")).SendKeys(KeePassEntry.GetUserName()); Browser.FindElement(By.Id("loginForm_pin")).SendKeys(KeePassEntry.GetPassword()); Browser.WaitForJavaScript(); //Browser.FindElement(By.Id("loginFormData_loginForm")).Submit(); Browser.FindElement(By.Id("loginForm_loginButton")).Click(); } }
protected override void Login() { using (KeePassService.Open()) { Browser.FindElement(By.Id("logon-username")).SendKeys(KeePassEntry.GetUserName()); Browser.WaitForJavaScript(); Browser.FindElement(By.Id("logon-password")).SendKeys(KeePassEntry.GetPassword()); Browser.WaitForJavaScript(); Browser.FindElement(By.XPath("//button[@type='submit']")).Click(); } }
protected override void Login() { using (KeePassService.Open()) { Browser.WaitForJavaScript(); Browser.FindElement(By.Name("email")) .SendKeys(KeePassEntry.GetUserName()); Browser.FindElement(By.Name("password")) .SendKeys(KeePassEntry.GetPassword()); Browser.FindElement(new ByAll(By.TagName("a"), By.ClassName("login"))).Click(); } }
/// <summary> /// Performs the password migration from BB Password Keeper to Kee Pass /// </summary> public void Migrate() { if (PkInputFile == null || KpOutputFile == null) { throw new Exception("Input and Output file paths must be specified"); } /* * Iterate over all lines (except for the first, which contains header information) * * Mash the input into this CSV column format: * * KeePass: Password Keeper * -------- --------------- * * Account <= name * Login Name <= username * Password <= password * Web Site <= url * Comments <= extra, passwordSetDate, lastModifiedTime */ var inputCsvStream = new CsvReader(new StreamReader(PkInputFile)); var pkEntries = inputCsvStream.GetRecords <PasswordKeeperEntry>(); List <KeePassEntry> keePassEntries = new List <KeePassEntry>(); foreach (var entry in pkEntries) { var kpEntry = new KeePassEntry(); // Build a KeePass entry from the PasswordKeeper entry kpEntry.Account = entry.name; kpEntry.LoginName = entry.username; kpEntry.Password = entry.password; kpEntry.WebSite = entry.url; String comments = entry.extra + "\r\n\r\nDate Modified: " + UnixToDateTime(entry.lastModifiedTime).ToLongDateString() + "\r\nDate Created: " + UnixToDateTime(entry.passwordSetDate).ToLongDateString(); kpEntry.Comments = comments; keePassEntries.Add(kpEntry); } // Write the output CSV file using (var csvWriter = new CsvWriter(new StreamWriter(KpOutputFile))) { csvWriter.Configuration.RegisterClassMap <KeePassClassMap>(); csvWriter.Configuration.QuoteAllFields = true; csvWriter.WriteRecords(keePassEntries); } }
protected override void Login() { using (KeePassService.Open()) { Browser.FindElement(new ByChained(By.Id("eserviceLogin"), new ByIdOrName("disposerId"))) .SendKeys(KeePassEntry.GetUserName()); Browser.FindElement(new ByChained(By.Id("eserviceLogin"), new ByIdOrName("birthdate"))) .SendKeys(KeePassEntry.GetString(Configuration.AdditionalKeePassFields[Constants.DownloadHandler.SantanderBirthday])); Browser.FindElement(new ByChained(By.Id("eserviceLogin"), new ByIdOrName("password"))) .SendKeys(KeePassEntry.GetPassword()); Browser.FindElement(new ByChained(By.Id("eserviceLogin"), new ByIdOrName("submitButton"))).Click(); } }
public IActionResult Edit(string id, [Bind("ID,Group,Title,Username,Password,URL,Notes")] KeePassEntry keePassEntry) { if (id != keePassEntry.ID) { return(NotFound()); } if (ModelState.IsValid) { _logger.LogInformation($"{User.Identity.Name} updated entry: {id} ({keePassEntry.Title})"); _keePassApi.EditEntry(keePassEntry); return(RedirectToAction(nameof(Index))); } return(View(keePassEntry)); }
static void Main(string[] args) { string dll = FindKeePassCommandDll(); if (dll == null) { Console.WriteLine("Error locating KeePassCommandDll.dll"); Environment.Exit(1); return; } KeePassEntry.Initialize(dll); KeePassEntry entry = null; string title = "Sample Entry"; try { entry = KeePassEntry.getfirst(title); } catch { } if (entry == null) { Console.WriteLine("KeePass is not started"); Console.WriteLine("Has KeePassCommander.dll been copied to the directory containing KeePass.exe ?"); Environment.Exit(2); return; } if (entry.Title != title) { Console.WriteLine("KeePass Entry not found: " + title); Environment.Exit(3); } Console.OutputEncoding = System.Text.Encoding.UTF8; Console.WriteLine(); Console.WriteLine("title : " + entry.Title); Console.WriteLine("username : "******"password : "******"url : " + entry.Url); Console.WriteLine("urlscheme : " + entry.UrlScheme); Console.WriteLine("urlhost : " + entry.UrlHost); Console.WriteLine("urlport : " + entry.UrlPort); Console.WriteLine("urlpath : " + entry.UrlPath); Console.WriteLine("notes : " + entry.Notes); Environment.Exit(0); }
public void AddEntry(KeePassEntry entry) { var addEntry = new PwEntry(true, true); addEntry.Strings.Set("Title", new KeePassLib.Security.ProtectedString(true, entry.Title)); addEntry.Strings.Set("UserName", new KeePassLib.Security.ProtectedString(true, entry.Username)); addEntry.Strings.Set("Password", new KeePassLib.Security.ProtectedString(true, entry.Password)); if (!string.IsNullOrEmpty(entry.URL)) { addEntry.Strings.Set("URL", new KeePassLib.Security.ProtectedString(true, entry.URL)); } if (!string.IsNullOrEmpty(entry.Notes)) { addEntry.Strings.Set("Notes", new KeePassLib.Security.ProtectedString(true, entry.Notes)); } var group = _db.RootGroup.FindCreateGroup(entry.Group, true); group.AddEntry(addEntry, true); _db.Save(null); }