This project implements a brute-force password cracking tool that simulates both sequential and parallel processing using the fork() system call. The password is a 12-character string divided into 4 segments. Each segment is independently brute-forced using printable ASCII characters.
- The
checkPasswordfunction (provided externally) validates if a guessed 3-character string matches part of the secret password at a specified offset. - The program supports two modes:
- Sequential mode: cracks each segment one after another.
- Parallel mode: uses 4 child processes, each cracking one segment concurrently using
fork().
| File Name | Description |
|---|---|
assignment-1.c |
Main C program containing brute-force logic with optional forking |
checkPassword.h |
Header file declaring checkPassword |
checkPassword.o |
Compiled object file containing the actual implementation |
Compile with the provided object file:
gcc assignment-1.c checkPassword.o -o assignment1./assignment1./assignment1 -fProcess 12345 with parent 6789 cracking the password...
Process 12346 with parent 12345 finds 0-2: X7h
Process 12347 with parent 12345 finds 3-5: Bk1
...
All child processes completed.
- The brute-force approach tests all combinations of printable ASCII characters (from code 33 to 126).
- Each child process in forked mode handles one fixed 3-character segment: [0–2], [3–5], [6–8], and [9–11].
- The solution mimics distributed effort for computationally intensive cracking tasks.
This project is part of CS 3305A - Operating Systems at Western University. For academic use only.