-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from h311d1n3r/cpp_rewrite
Cpp rewrite
- Loading branch information
Showing
82 changed files
with
3,336 additions
and
983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake-build*/ | ||
.cerberus*/ | ||
build/ | ||
.idea/ | ||
radare2/ | ||
Goliath/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
__pycache__/ | ||
cmake-build*/ | ||
.cerberus*/ | ||
*.spec | ||
build/ | ||
dist/ | ||
target/ | ||
*.lock | ||
.idea/ | ||
radare2/ | ||
Goliath/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
[submodule "lib/Goliath"] | ||
path = lib/Goliath | ||
url = https://github.com/h311d1n3r/Goliath | ||
[submodule "lib/argparse"] | ||
path = lib/argparse | ||
url = https://github.com/p-ranav/argparse | ||
[submodule "lib/lief"] | ||
path = lib/lief | ||
url = https://github.com/lief-project/LIEF | ||
[submodule "lib/gzip-hpp"] | ||
path = lib/gzip-hpp | ||
url = https://github.com/mapbox/gzip-hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
project(Cerberus) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
find_path(libelf.h NAMES LIBELF) | ||
|
||
# will be included statically | ||
add_subdirectory(lib/lief) | ||
add_subdirectory(lib/argparse) | ||
# will be included dynamically | ||
find_package(CURL REQUIRED) | ||
find_package(ZLIB REQUIRED) | ||
find_package(LibArchive REQUIRED) | ||
|
||
include_directories(lib/argparse/include lib/lief/include lib/gzip-hpp/include ${LIBELF} src) | ||
|
||
add_executable(Cerberus src/main.cpp src/utils/logger.h src/utils/logger.cpp src/utils/arg_parser.h src/utils/config.h src/utils/arg_parser.cpp src/global_defs.h src/langs/lang_manager.h src/langs/lang_manager.cpp src/types/value_ordered_map.h src/binaries/bin_identifier.cpp src/user/user_prompt.cpp src/utils/convert.h src/binaries/bin_handler.h src/binaries/handlers/elf_handler.h src/binaries/handlers/elf_handler.cpp src/binaries/bin_extractor.h src/binaries/bin_types.h src/binaries/extractors/lief_extractor.h src/binaries/extractors/lief_extractor.cpp src/binaries/extractors/radare_extractor.h src/binaries/extractors/radare_extractor.cpp src/binaries/handlers/pe_handler.h src/binaries/handlers/pe_handler.cpp src/binaries/bin_handler.cpp src/langs/lib_regex.h src/utils/search.h src/utils/search.cpp src/langs/lang_types.h src/langs/lib_regex.cpp src/utils/convert.cpp src/binaries/lib/lib_manager.h src/binaries/lib/lib_manager.cpp src/binaries/lib/install/lib_installer.h src/binaries/lib/install/rust_lib_installer.h src/binaries/lib/install/go_lib_installer.h src/binaries/lib/install/rust_lib_installer.cpp src/binaries/lib/install/go_lib_installer.cpp src/utils/file_downloader.h src/utils/file_downloader.cpp src/utils/file_operations.h src/utils/file_operations.cpp src/user/dependencies/dependency_manager.h src/command/command_executor.h src/command/command_executor.cpp src/user/local_config.h src/user/local_config.cpp src/user/dependencies/dependency_manager.cpp src/algorithm/part_hash_algorithm.h src/algorithm/part_hash_algorithm.cpp src/algorithm/algorithm.h src/binaries/extractors/libelf_extractor.h src/binaries/extractors/libelf_extractor.cpp src/binaries/pe_types.h src/binaries/extractors/go_extractor.h src/binaries/extractors/go_extractor.cpp) | ||
|
||
target_link_libraries(Cerberus PRIVATE argparse PRIVATE LIEF::LIEF PRIVATE CURL::libcurl PRIVATE ZLIB::ZLIB PRIVATE LibArchive::LibArchive PRIVATE uuid PRIVATE elf PRIVATE stdc++fs) | ||
set_target_properties(Cerberus PROPERTIES OUTPUT_NAME cerberus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:10 | ||
|
||
WORKDIR /root | ||
|
||
RUN apt -y update | ||
RUN apt -y upgrade | ||
RUN apt -y install g++ gcc make tar wget | ||
RUN apt -y install libarchive-dev libcurl4-openssl-dev libssl-dev zlib1g-dev libelf-dev uuid-dev | ||
|
||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5.tar.gz | ||
RUN tar -xzf cmake-3.27.5.tar.gz | ||
WORKDIR cmake-3.27.5 | ||
RUN ./bootstrap | ||
RUN make | ||
RUN make install | ||
WORKDIR .. | ||
|
||
RUN mkdir -p Cerberus | ||
WORKDIR Cerberus | ||
ADD ./ ./ | ||
RUN mkdir -p build | ||
WORKDIR build | ||
|
||
RUN cmake .. | ||
RUN make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM fedora:37 | ||
|
||
WORKDIR /root | ||
|
||
RUN dnf -y update | ||
RUN dnf -y upgrade | ||
RUN dnf -y install g++ gcc make cmake | ||
RUN dnf -y install libarchive-devel libcurl-devel zlib-devel elfutils-libelf-devel libuuid-devel | ||
|
||
RUN mkdir -p Cerberus | ||
WORKDIR Cerberus | ||
ADD ./ ./ | ||
RUN mkdir -p build | ||
WORKDIR build | ||
|
||
RUN cmake .. | ||
RUN make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ubuntu:20.04 | ||
|
||
WORKDIR /root | ||
|
||
RUN apt -y update | ||
RUN apt -y upgrade | ||
RUN apt -y install g++ gcc make tar wget | ||
RUN apt -y install libarchive-dev libcurl4-openssl-dev libssl-dev zlib1g-dev libelf-dev uuid-dev | ||
|
||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5.tar.gz | ||
RUN tar -xzf cmake-3.27.5.tar.gz | ||
WORKDIR cmake-3.27.5 | ||
RUN ./bootstrap | ||
RUN make | ||
RUN make install | ||
WORKDIR .. | ||
|
||
RUN mkdir -p Cerberus | ||
WORKDIR Cerberus | ||
ADD ./ ./ | ||
RUN mkdir -p build | ||
WORKDIR build | ||
|
||
RUN cmake .. | ||
RUN make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:22.04 | ||
|
||
WORKDIR /root | ||
|
||
RUN apt -y update | ||
RUN apt -y upgrade | ||
RUN apt -y install g++ gcc make cmake | ||
RUN apt -y install libarchive-dev libcurl4-openssl-dev zlib1g-dev libelf-dev uuid-dev | ||
|
||
RUN mkdir -p Cerberus | ||
WORKDIR Cerberus | ||
ADD ./ ./ | ||
RUN mkdir -p build | ||
WORKDIR build | ||
|
||
RUN cmake .. | ||
RUN make |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.