/* * Copyright � 2015 Matthieu DUVAL, Rudy DUCHE * * This file is part of RizzleHash. * * RizzleHash is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RizzleHash is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RizzleHash. If not, see */ #ifndef RH_PROCESSBRUTEFORCE_H #define RH_PROCESSBRUTEFORCE_H #include #include #include #include #include #include "../include/RH_Encryption.h" //#include //#include //#include //#include //#include //#include //#include using namespace std; class ProcessBruteForce { public: struct statReturn { bool isFound = false; uint32_t nbSecond; uint32_t totalWords; string currentWord; string currentProcessName; }; public: ProcessBruteForce(); ProcessBruteForce(queue *q,int idx,int nbInstence,string hashString,string clef,uint32_t limite,bool verbose,string hashMethode); void init(queue *q,int idx,int nbInstence,string hashString,string clef,uint32_t limite,bool verbose,string hashMethode); void operator()(); virtual ~ProcessBruteForce(); private: void bruteForce(); void recursiveFunction(uint32_t index); void testSpeed(string currentWord); private: queue *q; int idx; int nbInstence; bool verbose; uint32_t nbWord; function hashMethodeFunction; bool keySet; string clef; uint32_t limite; string hashString; char* password; bool isFound = false; char tabChar[63] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', '0','1','2','3','4','5','6','7','8','9',' '}; short indexMin = 0; short indexMax = 0; // test de performaces time_t clock; }; #endif // BF_PROCESSBRUTEFORCE_H