Laika uses CMake as it's build system and provides several definitions for you to mess around with.
Definition |
Description |
Example |
LAIKA_PUBKEY |
Sets CNC's public key |
-DLAIKA_PUBKEY=997d026d1c65deb6c30468525132be4ea44116d6f194c142347b67ee73d18814 |
LAIKA_PRIVKEY |
Sets CNC's private key |
-DLAIKA_PRIVKEY=1dbd33962f1e170d1e745c6d3e19175049b5616822fac2fa3535d7477957a841 |
LAIKA_CNC_IP |
Sets CNC's public ip |
-DLAIKA_CNC_IP=127.0.0.1 |
LAIKA_CNC_PORT |
Sets CNC's bind()'d port |
-DLAIKA_CNC_PORT=13337 |
LAIKA_PERSISTENCE |
Enables persistence for LaikaBot |
-DLAIKA_PERSISTENCE=On |
LAIKA_OBFUSCATE |
Enables obfuscation for LaikaBot |
-DLAIKA_OBFUSCATE=On |
these are all passed to cmake -B <dir>
Linux
Make sure you have the following tools installed:
- CMake (>=3.16)
- Compiler with C11 support (GCC >= 4.7, Clang >= 3.1, etc.)
Simply run cmake to build the makefiles with your configuration.
$ cmake -B build -DLAIKA_OBFUSCATE=On
Now compile the project, the binaries will be in ./bin
$ cmake --build build
Windows
Make sure you have a recent-ish version of Visual Studio installed (I used 2022 community).
Visual Studio provides a cmake interface to generate .sln files for Visual Studio (if that's your thing) through the Developer Command Prompt for VS
. Just generate the .sln with
> cmake -B winBuild -DLAIKA_PERSISTENCE=On -DLAIKA_OBFUSCATE=On -DCMAKE_BUILD_TYPE=MinSizeRel
Now you can either open the .sln in .\winBuild
and compile using Visual Studio, or directly compile from the command line using:
> cmake --build winBuild --config MinSizeRel
Output binaries will be in .\winbin