Skip to content

Commit f3b3814

Browse files
committed
Agent setup
1 parent 9e6ec28 commit f3b3814

File tree

7 files changed

+326
-371
lines changed

7 files changed

+326
-371
lines changed

AGENT.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# AGENT.md
2+
3+
## Building the modules
4+
5+
This guide provides the steps necessary to set up and build the modules, from modules directory, for the [C2Core](https://github.com/maxDcb/C2Core) project.
6+
7+
This document assumes you are only interested in building the modules and running the associated tests.
8+
9+
The code is written in **modern C++**, uses **CMake** as its build system, and expects external dependencies to be placed in specific subdirectories.
10+
11+
---
12+
13+
### 📁 Step-by-Step Instructions
14+
15+
1. **Clone the repository** and move to the `modules` directory:
16+
17+
```bash
18+
git clone https://github.com/maxDcb/C2Core.git
19+
cd C2Core/modules
20+
```
21+
22+
2. **Create required directory structure**:
23+
24+
```bash
25+
mkdir -p ModuleCmd/nlohmann
26+
```
27+
28+
3. **Download external dependencies**:
29+
30+
* `nlohmann::json` (used for JSON parsing):
31+
32+
```bash
33+
curl -o ModuleCmd/nlohmann/json.hpp https://raw.githubusercontent.com/maxDcb/C2TeamServer/refs/heads/master/thirdParty/nlohmann/json.hpp
34+
```
35+
36+
* `base64.h` (from cpp-base64):
37+
38+
```bash
39+
curl -o ModuleCmd/base64.h https://raw.githubusercontent.com/ReneNyffenegger/cpp-base64/82147d6d89636217b870f54ec07ddd3e544d5f69/base64.h
40+
```
41+
42+
4. **Build the module** with CMake:
43+
44+
```bash
45+
mkdir build
46+
cd build
47+
cmake -DWITH_TESTS=ON ..
48+
make
49+
```
50+
51+
---
52+
53+
### ✅ Running the Tests
54+
55+
Once the build completes, the test binaries will be available in the `modules/Tests ` directory. You can run them with:
56+
57+
```bash
58+
./testsModuleName
59+
```
60+
61+
These tests validate core functionality and encoding/decoding routines.
62+
63+

0 commit comments

Comments
 (0)