IamLupo

ljsadlkjbsadbkjesaflbjksaefl

Nov 25th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.15 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "crc32.h"
  3.  
  4. //https://www.tools4noobs.com/online_php_functions/crc32/
  5. int crc = 0x36e85653;
  6.  
  7. static const char alphabeth_small[] = "abcdefghijklmnopqrstuvwxyz";
  8. static const char alphabeth_big[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ1234567890";
  9.  
  10. int bruteforce_start(int strart, char* password, int level) {
  11.     int i;
  12.     for(i = strart; i < 26; i++) {
  13.         password[level] = alphabeth_small[i];
  14.         bruteforce_loop(password, level + 1);
  15.     }
  16. }
  17.  
  18. int bruteforce_loop(char* password, int level) {
  19.     int i;
  20.     for(i = 0; i < 26; i++) {
  21.         password[level] = alphabeth_small[i];
  22.         if(level == 6) {
  23.             bruteforce_check(password, level + 1);
  24.         } else {
  25.             bruteforce_loop(password, level + 1);
  26.         }
  27.     }
  28. }
  29.  
  30. int bruteforce_check(char* password, int level) {
  31.     int i;
  32.     for(i = 0; i < 26; i++) {
  33.         password[level] = alphabeth_small[i];
  34.         if(crc32(password, 8) == 0x36e85653) {
  35.             printf("password = %s\n", password);
  36.         }
  37.     }
  38.     return 0;
  39. }
  40.  
  41. int main() {
  42.     char password[9];
  43.     password[8] = '\0';
  44.    
  45.     //bruteforce_start(1, password, 0); // <-- 0 means aaaaaaaa
  46.     bruteforce_start(1, password, 13); // <-- 15 means paaaaaaa
  47. }
Advertisement
Add Comment
Please, Sign In to add comment