Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "crc32.h"
- //https://www.tools4noobs.com/online_php_functions/crc32/
- int crc = 0x36e85653;
- static const char alphabeth_small[] = "abcdefghijklmnopqrstuvwxyz";
- static const char alphabeth_big[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ1234567890";
- int bruteforce_start(int strart, char* password, int level) {
- int i;
- for(i = strart; i < 26; i++) {
- password[level] = alphabeth_small[i];
- bruteforce_loop(password, level + 1);
- }
- }
- int bruteforce_loop(char* password, int level) {
- int i;
- for(i = 0; i < 26; i++) {
- password[level] = alphabeth_small[i];
- if(level == 6) {
- bruteforce_check(password, level + 1);
- } else {
- bruteforce_loop(password, level + 1);
- }
- }
- }
- int bruteforce_check(char* password, int level) {
- int i;
- for(i = 0; i < 26; i++) {
- password[level] = alphabeth_small[i];
- if(crc32(password, 8) == 0x36e85653) {
- printf("password = %s\n", password);
- }
- }
- return 0;
- }
- int main() {
- char password[9];
- password[8] = '\0';
- //bruteforce_start(1, password, 0); // <-- 0 means aaaaaaaa
- bruteforce_start(1, password, 13); // <-- 15 means paaaaaaa
- }
Advertisement
Add Comment
Please, Sign In to add comment