andrew-schofield / keepass2-haveibeenpwned

Simple Have I Been Pwned checker for KeePass
MIT License
425 stars 26 forks source link

Run checks against a single group, single entry, or selection of entries #39

Closed helluvamatt closed 5 years ago

helluvamatt commented 6 years ago

We can hook into context menus for the groups listbox and the entries listbox. We can also get the selected group and the selection of entries. We can add a separator and a submenu like we do in "Tools" for all items, then only run the checks for the selected group, or selected entries.

This would require changes to BaseChecker to accept a PwGroup, but then the entire database check just passes database.RootGroup to that method:

BaseChecker.cs

public async Task<List<BreachedEntry>> CheckDatabase(bool expireEntries, bool oldEntriesOnly, bool ignoreDeleted, IProgress<ProgressItem> progressIndicator)
{
    return await CheckGroup(passwordDatabase.RootGroup, expireEntries, oldEntriesOnly, ignoreDeleted, progressIndicator);
}

public abstract Task<List<BreachedEntry>> CheckGroup(PwGroup group, bool expireEntries, bool oldEntriesOnly, bool ignoreDeleted, IProgress<ProgressItem> progressIndicator);

If this is something you are interested in, I can make a pull request.

vertigo220 commented 6 years ago

I use KeePass to store lots of different stuff, not just passwords, so running this takes easily 2.5-3x as long as it should because it checks every group instead of just the group with actual internet passwords. I'd really like to see the ability to perform checks on individual groups added.

andrew-schofield commented 5 years ago

Merged in #60