An open API service indexing awesome lists of open source software.

https://github.com/alessiobugetti/password-cracker

Implements both sequential and parallel brute-force decryption of DES-encrypted passwords, focusing on 8-character passwords from the set [a-zA-Z0-9./]
https://github.com/alessiobugetti/password-cracker

brute-force-attack data-encryption-standard openmp parallel-computing pthread

Last synced: 2 months ago
JSON representation

Implements both sequential and parallel brute-force decryption of DES-encrypted passwords, focusing on 8-character passwords from the set [a-zA-Z0-9./]

Awesome Lists containing this project

README

        

# Password Cracker

## Table of Contents

- [Overview](#Overview)
- [Project Structure](#project-structure)
- [Requirements](#requirements)
- [Linux](#linux)
- [macOS](#macos)
- [Homebrew](#homebrew)
- [MacPorts](#macports)
- [Installation](#installation)
- [Usage](#usage)
- [Building the Project](#building-the-project)
- [Running an Executable](#running-an-executable)
- [Generating Documentation](#generating-documentation)
- [Running Tests](#running-tests)
- [Benchmark](#benchmark)
- [License](#license)
- [Author](#author)

## Overview

Password Cracker is a project that implements both sequential and parallel brute-force decryption of DES-encrypted passwords utilizing OpenMP and PThreads, focusing on 8-character passwords from the set `[a-zA-Z0-9./]`.

The project is currently compatible with Linux and macOS, with a notable difference between the two platforms. On macOS, the `crypt_r()` function from `crypt.h` is not available, so the implementation uses the `OpenSSL::DES_fcrypt()` function as an alternative.

## Project Structure

- `src/`: Contains the source code of the project.
- `parallel-omp-decryptor.cc`: Implementation of the parallel decryptor using OpenMP.
- `parallel-pthread-decryptor.cc`: Implementation of the parallel decryptor using PThreads.
- `sequential-decryptor.cc`: Implementation of the sequential decryptor.
- `decryptor.h`: Base class for decryptors.
- `parallel-decryptor.h`: Base class for parallel decryptors.
- `test/`: Contains unit tests for the project.
- `benchmarks/`: Contains the file that run the benchmarks.
- `data/`: Contains data files used for benchmarks and tests.
- `doc/`: Contains documentation generated by Doxygen.

## Requirements

### Linux
```sh
sudo apt-get update
sudo apt-get install -y g++ python3 cmake ninja-build git libomp-dev doxygen
```

## macOS
The first requirement is the full Xcode IDE or a more minimal installation of the Xcode Command Line Tools. Additionally, some extra packages are needed, which can be installed using either Homebrew or MacPorts.

### Homebrew
```sh
brew install cmake ninja openssl libomp doxygen
```

### Macports
```sh
sudo port install cmake ninja openssl libomp doxygen
```

## Installation

1. Clone the repository:
```sh
git clone https://github.com/AlessioBugetti/password-cracker.git
cd password-cracker
```

2. Build the project:
```sh
./passwordcracker build
```

## Usage

### Building the Project

To build the project, run:
```sh
./passwordcracker build
```

### Running an Executable
To run an executable, use:
```sh
./passwordcracker run
```

### Generating Documentation
To generate documentation with Doxygen, run:
```sh
./passwordcracker doc
```

### Running Tests
To run the tests, execute:
```sh
./test.py
```

## Benchmark
The `benchmarks/decryption-benchmark.cc` file contains the code to run benchmarks on the different decryption methods. To run the benchmark, use:
```sh
./passwordcracker run decryption-benchmark --numExecutions=
```

## License
This project is licensed under the GPL-3.0-only License. See the [`LICENSE`](../LICENSE) file for more details.

## Author
Alessio Bugetti - [email protected]