feat(portscanner): implement port scanning CLI and core logic

Implement command-line interface for port scanning with IP validation and option
parsing. Add core scanning logic using Boost.Asio for asynchronous socket
checks, including timeout handling and port probing. Update xmake.lua to
configure build target and include necessary files.
This commit is contained in:
Ваше Имя
2025-10-06 00:05:11 +04:00
parent 0d96c21199
commit c9e1b0a149
6 changed files with 273 additions and 9 deletions
+11 -9
View File
@@ -2,16 +2,18 @@ set_languages "c++23"
add_rules("plugin.compile_commands.autoupdate", { outputdir = "." })
add_requires("boost", {
system = true, -- sudo pacman -S boost
add_requires("cmake::Boost", {
alias = "boost",
system = true,
configs = {
all = false,
system = true, -- asio
components = { "program_options", "log" },
},
})
target "app"
set_kind "binary"
add_files "src/*.cpp"
add_links "boost_system"
target "port_scanner"
do
set_kind "binary"
add_files("src/main.cpp", "src/cli/*.cpp", "src/common/*.cpp", "src/core/*.cpp")
add_includedirs("src", "src/cli", "src/common", "src/core", { public = true })
add_packages "boost"
end