swsf-bruteforce/README.md

41 lines
1014 B
Markdown
Raw Normal View History

2023-08-22 04:30:34 -04:00
# swsf_bruteforce
A performant, multithreaded, brute-forcer for scrambled cheat codes in Star Wars: Starfighter (JP) and Star Wars: Jedi Starfighter, written in modern C++20.
# Building
You need:
- A C++20 compiler (MSVC 2022, Clang, GCC)
- Boost (I tested with 1.81, should work fine with 1.82 onwards)
- CMake
## Windows
```
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build build
```
## Linux
```
$ cmake -Bbuild -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-march=native -mtune=native"
$ cmake --build build
2023-08-22 05:05:23 -04:00
```
2023-08-22 04:30:34 -04:00
# Usage
2023-08-22 05:05:23 -04:00
`./swsf_bruteforce [-X] -s [START_LENGTH] -e [LENGTH] 0xABCDABCD`
2023-08-22 04:30:34 -04:00
where:
2023-08-22 18:40:57 -04:00
`-X` enables exact length, the value of -s is used as the length.
`-s [START_LENGTH]` is the guessed start bound (greater than 2, less than the value of `-e`), and optional (defaults to 2)
`-e [END_LENGTH]` is the guessed end bound (greater than the value of `-s`, less than or equal to 8), and optional (defaults to 8)
2023-08-22 04:30:34 -04:00
`0xABCDABCD` is the hash to use