Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Wie du mithilfe von Bruteforce eine geschützte Zip knacken kannst, wird dir hier keiner sagen. Das ist illegal.
Quellcode |
|
1 2 3 4 5 6 7 8 9 |
foreach( password ) { zipfile.open( file, password ) if( content_valid( zipfile ) ) { // Passwort geknackt } } |
Wie du mithilfe von Bruteforce eine geschützte Zip knacken kannst, wird dir hier keiner sagen. Das ist illegal.
Warum sollte ihm das keiner sagen? Wie du doch schon selber festgestellt hast wird auch mit dem Wissen nichts anfangen können weil das eben zu lange dauert.
Ob das illegal ist bezweifel ich auch mal stark. Illegal wird es erst, wenn man damit an Daten kommt, die nicht für einen bestimmt sind...
@layle:
Pseudocode:
Quellcode
1 2 3 4 5 6 7 8 9 foreach( password ) { zipfile.open( file, password ) if( content_valid( zipfile ) ) { // Passwort geknackt } }
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
#include <iostream> #include <ctime> #include <string> using namespace std; string crackPassword(string pass); long long int attempt; clock_t start_t, end_t; int main(){ int wait; string password; cout << "Enter the password to crack : "; cin >> password; cout << "\n\n\n\n" << "CRACKED THE PASSWORD!" << "\n"<<"\n"<<"\n"; cout << "The password : " << crackPassword(password) << "\n"; cout << "The time duration passed : " << (double)(end_t - start_t) / 1000 << " seconds" << endl << endl; cin >> wait; return 0; } string crackPassword(string pass){ int digit[7], alphabetSet = 1, passwordLength = 1; start_t = clock(); string test, alphabet = "1337 also daktari is pro"; while (1){ switch (passwordLength){ case 1: while (alphabetSet<4){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; } for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 2: alphabetSet = 1; while (alphabetSet<6){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 3: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 4: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 5: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 6: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[5] = 0; digit[5]<alphabet.length(); digit[5]++) for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 7: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[6] = 0; digit[6]<alphabet.length(); digit[6]++) for (digit[5] = 0; digit[5]<alphabet.length(); digit[5]++) for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; case 8: alphabetSet = 1; while (alphabetSet<8){ switch (alphabetSet){ case 1: alphabet = "-0123456789"; cout << endl << endl << "Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2: alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3: alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; case 4: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait"; break; case 5: alphabet = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing uppercase characters and numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait"; break; case 6: alphabet = "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters, please wait"; break; case 7: alphabet = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level." << endl << endl << "Testing lowercase, uppercase characters and numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62 Characters, please wait"; break; } for (digit[7] = 0; digit[7]<alphabet.length(); digit[7]++) for (digit[6] = 0; digit[6]<alphabet.length(); digit[6]++) for (digit[5] = 0; digit[5]<alphabet.length(); digit[5]++) for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ attempt++; if (attempt % 2500000 == 0) cout << "."; test = alphabet[digit[0]]; for (int i = 1; i<passwordLength; i++) if (alphabet[digit[i]] != '-')test += alphabet[digit[i]]; if (pass.compare(test) == 0){ end_t = clock(); return test; } } alphabetSet++; } break; } cout << endl << endl << endl << endl << "*" << endl; cout << "*** Password length is not " << passwordLength << ". Increasing password length! ***"; cout << endl << "*" << endl << endl; passwordLength++; } } |
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 |
for (digit[7] = 0; digit[7]<alphabet.length(); digit[7]++) for (digit[6] = 0; digit[6]<alphabet.length(); digit[6]++) for (digit[5] = 0; digit[5]<alphabet.length(); digit[5]++) for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){ |
Ja frag halt endlich mal Google nach einer Zip-Bibliothek. 300 Zeilen (unglaublich redundanten) Code zu posten wird Dich da jedenfalls nicht weiter bringen.
PS:
C-/C++-Quelltext
1 2 3 4 5 6 7 8 for (digit[7] = 0; digit[7]<alphabet.length(); digit[7]++) for (digit[6] = 0; digit[6]<alphabet.length(); digit[6]++) for (digit[5] = 0; digit[5]<alphabet.length(); digit[5]++) for (digit[4] = 0; digit[4]<alphabet.length(); digit[4]++) for (digit[3] = 0; digit[3]<alphabet.length(); digit[3]++) for (digit[2] = 0; digit[2]<alphabet.length(); digit[2]++) for (digit[1] = 0; digit[1]<alphabet.length(); digit[1]++) for (digit[0] = 1; digit[0]<alphabet.length(); digit[0]++){
Wenn Du Schleifen doch schon kennst, warum benutzt Du sie dann nicht entsprechend, sondern baust solche Mega-Verschachtelungen auf?
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
C-/C++-Quelltext |
|
1 |
bool OpenZipFile(string Filename, string Password);
|
Lass solche persönlichen Angriffe lieber bleiben, meine sind härter.
... und diese Signatur kürzer!
- übersichtlicher
- logischer
- verständlicher
Werbeanzeige