mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-22 08:11:25 -04:00
parent
6c4a82bd51
commit
d16fc2d62a
8 changed files with 294 additions and 126 deletions
|
@ -18,7 +18,9 @@
|
|||
#include "Info.h"
|
||||
|
||||
#include "Utils.h"
|
||||
#include "core/DatabaseStats.h"
|
||||
#include "core/Global.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
|
||||
#include <QCommandLineParser>
|
||||
|
@ -47,5 +49,25 @@ int Info::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
|
|||
} else {
|
||||
out << QObject::tr("Recycle bin is not enabled.") << endl;
|
||||
}
|
||||
|
||||
DatabaseStats stats(database);
|
||||
out << QObject::tr("Location") << ": " << database->filePath() << endl;
|
||||
out << QObject::tr("Database created") << ": "
|
||||
<< database->rootGroup()->timeInfo().creationTime().toString(Qt::DefaultLocaleShortDate) << endl;
|
||||
out << QObject::tr("Last saved") << ": " << stats.modified.toString(Qt::DefaultLocaleShortDate) << endl;
|
||||
out << QObject::tr("Unsaved changes") << ": " << (database->isModified() ? QObject::tr("yes") : QObject::tr("no"))
|
||||
<< endl;
|
||||
out << QObject::tr("Number of groups") << ": " << QString::number(stats.groupCount) << endl;
|
||||
out << QObject::tr("Number of entries") << ": " << QString::number(stats.entryCount) << endl;
|
||||
out << QObject::tr("Number of expired entries") << ": " << QString::number(stats.expiredEntries) << endl;
|
||||
out << QObject::tr("Unique passwords") << ": " << QString::number(stats.uniquePasswords) << endl;
|
||||
out << QObject::tr("Non-unique passwords") << ": " << QString::number(stats.reusedPasswords) << endl;
|
||||
out << QObject::tr("Maximum password reuse") << ": " << QString::number(stats.maxPwdReuse()) << endl;
|
||||
out << QObject::tr("Number of short passwords") << ": " << QString::number(stats.shortPasswords) << endl;
|
||||
out << QObject::tr("Number of weak passwords") << ": " << QString::number(stats.weakPasswords) << endl;
|
||||
out << QObject::tr("Entries excluded from reports") << ": " << QString::number(stats.excludedEntries) << endl;
|
||||
out << QObject::tr("Average password length") << ": " << QObject::tr("%1 characters").arg(stats.averagePwdLength())
|
||||
<< endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue