@@ -318,19 +318,21 @@ int main(int argc, char* argv[]) {
318318    std::string wordlistPath;
319319    int  threadCount = std::thread::hardware_concurrency ();
320320    bool  recursive = false ;
321+     std::string charset = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" //  Standard-Zeichen-Set
321322
322323    static  struct  option  long_options[] = {
323324        {" file" 0 , ' f' 
324325        {" length" 0 , ' l' 
325326        {" wordlist" 0 , ' w' 
326327        {" threads" 0 , ' t' 
327328        {" recursive" 0 , ' r' 
329+         {" charset" 0 , ' c' //  Neue Option für das Zeichen-Set
328330        {0 , 0 , 0 , 0 }
329331    };
330332
331333    int  option_index = 0 ;
332334    int  opt;
333-     while  ((opt = getopt_long (argc, argv, " f:l:w:t:r " 1 ) {
335+     while  ((opt = getopt_long (argc, argv, " f:l:w:t:rc: " 1 ) {
334336        switch  (opt) {
335337            case  ' f' 
336338                file = optarg;
@@ -352,9 +354,12 @@ int main(int argc, char* argv[]) {
352354            case  ' r' 
353355                recursive = true ;
354356                break ;
357+             case  ' c' 
358+                 charset = optarg; //  Setze das Zeichen-Set auf den angegebenen Wert
359+                 break ;
355360            default :
356361                std::cerr << " Verwendung: " 0 ]
357-                           << "  -f <file> [-l <password-length>] [-w <wordlist>] [-t <thread-count>] [-r]\n " 
362+                           << "  -f <file> [-l <password-length>] [-w <wordlist>] [-t <thread-count>] [-r] [-c <charset>] \n " 
358363                return  1 ;
359364        }
360365    }
@@ -374,8 +379,6 @@ int main(int argc, char* argv[]) {
374379    std::string encryptionType = detectZipEncryption (zipData);
375380    std::cout << " Erkannte Verschlüsselungsmethode: " 
376381
377-     const  std::string charset = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 
378- 
379382    //  Queue für Passwörter
380383    std::queue<std::string> passwordQueue;
381384    std::string result;
0 commit comments