Loading include/mainwindow.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void setFilename(const std::string& filename); void setThreads(const int& nb_threads); public slots: Loading src/core/statsgen.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -281,8 +281,6 @@ int Statsgen::generate_stats() { return 0; } cout << "total counter " << total_counter << endl; return 1; } Loading Loading @@ -463,10 +461,8 @@ Container analyze_password(const string & password, SecurityRules & sr, const in char last_simplemask = 'a'; int sizeAdvancedMask = 0; int sizeSimpleMask = 0; wchar_t letter; for (int i=0; i < c.pass_length; i++) { letter = password[i]; for(wchar_t letter: password){ analyse_letter(letter, last_simplemask, c.simplemask_string, c.advancedmask_string, c.pol, sizeAdvancedMask, sizeSimpleMask); } Loading src/gui/maingui.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -9,8 +9,10 @@ * Please see the attached LICENSE file for additional licensing information. */ #include "mainwindow.h" #include <QApplication> #include <thread> #include "mainwindow.h" int main(int argc, char *argv[]) { Loading @@ -21,5 +23,6 @@ int main(int argc, char *argv[]) if(argc >= 2){ w.setFilename(argv[1]); } w.setThreads(std::thread::hardware_concurrency()); return a.exec(); } src/gui/mainwindow.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,10 @@ void MainWindow::setFilename(const string& filename){ ui->fileLine->setText(QString::fromStdString(filename)); } void MainWindow::setThreads(const int& nb_threads){ ui->threadNumberSpin->setValue(nb_threads); } MainWindow::~MainWindow() { Loading Loading @@ -306,10 +310,10 @@ void MainWindow::handleResults() + QString::number(stats.getTotalFilter(), 'g', 2) + " on a total of " + QString::number(stats.getTotalFilter(), 'g', 2) + " passwords (" + QString::number(percentageTotal, 'g', 1) + "%)"); + " passwords (" + QString::number(percentageTotal) + "%)"); ui->securityLabel->setText("--> " + QString::number(percentageSecurity, 'g', 2) ui->securityLabel->setText("--> " + QString::number(percentageSecurity) + "% of the passwords respects the security rules"); stats.print_stats(); Loading Loading
include/mainwindow.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void setFilename(const std::string& filename); void setThreads(const int& nb_threads); public slots: Loading
src/core/statsgen.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -281,8 +281,6 @@ int Statsgen::generate_stats() { return 0; } cout << "total counter " << total_counter << endl; return 1; } Loading Loading @@ -463,10 +461,8 @@ Container analyze_password(const string & password, SecurityRules & sr, const in char last_simplemask = 'a'; int sizeAdvancedMask = 0; int sizeSimpleMask = 0; wchar_t letter; for (int i=0; i < c.pass_length; i++) { letter = password[i]; for(wchar_t letter: password){ analyse_letter(letter, last_simplemask, c.simplemask_string, c.advancedmask_string, c.pol, sizeAdvancedMask, sizeSimpleMask); } Loading
src/gui/maingui.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -9,8 +9,10 @@ * Please see the attached LICENSE file for additional licensing information. */ #include "mainwindow.h" #include <QApplication> #include <thread> #include "mainwindow.h" int main(int argc, char *argv[]) { Loading @@ -21,5 +23,6 @@ int main(int argc, char *argv[]) if(argc >= 2){ w.setFilename(argv[1]); } w.setThreads(std::thread::hardware_concurrency()); return a.exec(); }
src/gui/mainwindow.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,10 @@ void MainWindow::setFilename(const string& filename){ ui->fileLine->setText(QString::fromStdString(filename)); } void MainWindow::setThreads(const int& nb_threads){ ui->threadNumberSpin->setValue(nb_threads); } MainWindow::~MainWindow() { Loading Loading @@ -306,10 +310,10 @@ void MainWindow::handleResults() + QString::number(stats.getTotalFilter(), 'g', 2) + " on a total of " + QString::number(stats.getTotalFilter(), 'g', 2) + " passwords (" + QString::number(percentageTotal, 'g', 1) + "%)"); + " passwords (" + QString::number(percentageTotal) + "%)"); ui->securityLabel->setText("--> " + QString::number(percentageSecurity, 'g', 2) ui->securityLabel->setText("--> " + QString::number(percentageSecurity) + "% of the passwords respects the security rules"); stats.print_stats(); Loading