C Code

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CHARSET "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
void brute_force(char *check) {
    char attempt[6] = {0};
    size_t len = strlen(CHARSET);
    for (size_t a = 0; a < len; a++) {
        for (size_t b = 0; b < len; b++) {
            for (size_t c = 0; c < len; c++) {
                for (size_t d = 0; d < len; d++) {
                    for (size_t e = 0; e < len; e++) {
                        attempt[0] = CHARSET[a];
                        attempt[1] = CHARSET[b];
                        attempt[2] = CHARSET[c];
                        attempt[3] = CHARSET[d];
                        attempt[4] = CHARSET[e];
                        attempt[5] = '\0';
                        if (strcmp(attempt, check) == 0) {
                            printf("Password found: %s\n", attempt);
                            return;
                        }
                    }
                }
            }
        }
    }
    printf("Password not found (or exceeds brute-force limits)\n");
}
int main() {
    char check[6];
    printf("Enter a 5-letter password to hack: ");
    scanf("%5s", check);
    brute_force(check);
    return 0;
}

Compilation and Execution Instructions

Windows

1. Save the code to a file named brute_force.c

2. Open Command Prompt or PowerShell

3. Compile: gcc brute_force.c -o brute_force.exe

4. Run: brute_force.exe

Note: You'll need MinGW or Visual Studio Build Tools installed for gcc

macOS

1. Save the code to a file named brute_force.c

2. Open Terminal

3. Compile: gcc brute_force.c -o brute_force

4. Run: ./brute_force

Note: Xcode Command Line Tools may be required (install with: xcode-select --install)