Skip to content

Commit 8dc0635

Browse files
committed
Maj modules
1 parent af70d98 commit 8dc0635

5 files changed

Lines changed: 44 additions & 39 deletions

File tree

CMakeLists.txt

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
2-
3-
project(C2LinuxImplant VERSION 0.0.0 LANGUAGES CXX C)
4-
set(CMAKE_BUILD_TYPE Release)
1+
cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
2+
3+
project(C2LinuxImplant VERSION 0.0.0 LANGUAGES CXX C)
4+
set(CMAKE_BUILD_TYPE Release)
55
set(CMAKE_CXX_STANDARD 17)
66

77
set(CMAKE_CXX_STANDARD_REQUIRED ON)
88
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
99

10+
option(BUILD_TEAMSERVER "Build teamserver-side command parsing/help code" OFF)
1011
option(C2CORE_BUILD_TESTS "Enable C2Core tests from the parent project" OFF)
12+
if(BUILD_TEAMSERVER)
13+
add_compile_definitions(BUILD_TEAMSERVER)
14+
endif()
1115
if(C2CORE_BUILD_TESTS)
16+
add_compile_definitions(C2CORE_BUILD_TESTS)
1217
enable_testing()
1318
endif()
1419

@@ -22,15 +27,15 @@ file(MAKE_DIRECTORY "${C2_TEST_BIN_OUTPUT_DIR}")
2227

2328

2429
add_definitions(-DBUILD_IMPLANT)
25-
26-
27-
##
28-
## Conan Dependencies
29-
##
30-
31-
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
32-
33-
find_package(OpenSSL REQUIRED)
30+
31+
32+
##
33+
## Conan Dependencies
34+
##
35+
36+
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
37+
38+
find_package(OpenSSL REQUIRED)
3439
find_package(httplib REQUIRED)
3540
find_package(Libssh2 REQUIRED)
3641
find_package(nlohmann_json REQUIRED CONFIG)
@@ -44,14 +49,14 @@ get_target_property(C2_NLOHMANN_JSON_INCLUDE_DIRS nlohmann_json::nlohmann_json I
4449
if(C2_NLOHMANN_JSON_INCLUDE_DIRS)
4550
include_directories(BEFORE ${C2_NLOHMANN_JSON_INCLUDE_DIRS})
4651
endif()
47-
48-
49-
##
50-
## Build
51-
##
52-
53-
include_directories(thirdParty)
54-
52+
53+
54+
##
55+
## Build
56+
##
57+
58+
include_directories(thirdParty)
59+
5560
add_subdirectory(libs)
5661
if(C2CORE_BUILD_TESTS)
5762
add_test(NAME dnsTest COMMAND dnsTest)
@@ -66,15 +71,15 @@ if(C2CORE_BUILD_TESTS)
6671
endif()
6772

6873
add_subdirectory(thirdParty)
69-
include_directories(thirdParty/base64)
70-
include_directories(thirdParty/donut/include)
71-
72-
set(DONUT_BUILD_DIR "${CMAKE_BINARY_DIR}/thirdParty/donut")
73-
add_library(Donut STATIC IMPORTED)
74-
set_target_properties(Donut PROPERTIES
75-
IMPORTED_LOCATION "${DONUT_BUILD_DIR}/lib/libdonut.a"
76-
)
77-
74+
include_directories(thirdParty/base64)
75+
include_directories(thirdParty/donut/include)
76+
77+
set(DONUT_BUILD_DIR "${CMAKE_BINARY_DIR}/thirdParty/donut")
78+
add_library(Donut STATIC IMPORTED)
79+
set_target_properties(Donut PROPERTIES
80+
IMPORTED_LOCATION "${DONUT_BUILD_DIR}/lib/libdonut.a"
81+
)
82+
7883
add_subdirectory(core/modules)
7984
add_subdirectory(core/beacon)
8085
if(C2CORE_BUILD_TESTS)
@@ -83,8 +88,8 @@ if(C2CORE_BUILD_TESTS)
8388
endif()
8489

8590
include_directories(core/listener)
86-
include_directories(core/beacon)
87-
include_directories(core/modules/ModuleCmd)
88-
add_subdirectory(beacon/beacon)
89-
90-
91+
include_directories(core/beacon)
92+
include_directories(core/modules/ModuleCmd)
93+
add_subdirectory(beacon/beacon)
94+
95+

core

Submodule core updated 57 files

libs/libDns

0 commit comments

Comments
 (0)