Fix nmap package detection
This commit is contained in:
committed by
Brendan Le Glaunec
parent
6247656a63
commit
d9945f5e26
+1
-1
@@ -23,7 +23,7 @@ message ("Here")
|
|||||||
|
|
||||||
set (${PROJECT_NAME}_VERSION_MAJOR 1)
|
set (${PROJECT_NAME}_VERSION_MAJOR 1)
|
||||||
set (${PROJECT_NAME}_VERSION_MINOR 0)
|
set (${PROJECT_NAME}_VERSION_MINOR 0)
|
||||||
set (${PROJECT_NAME}_VERSION_PATCH 3)
|
set (${PROJECT_NAME}_VERSION_PATCH 4)
|
||||||
set (${PROJECT_NAME}_SUFFIX "-beta")
|
set (${PROJECT_NAME}_SUFFIX "-beta")
|
||||||
set (${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}")
|
set (${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}")
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
## An RTSP surveillance camera access multitool
|
## An RTSP surveillance camera access multitool
|
||||||
|
|
||||||
[](#license)
|
[](#license)
|
||||||
[](https://github.com/EtixLabs/cameradar/releases/latest)
|
[](https://github.com/EtixLabs/cameradar/releases/latest)
|
||||||
|
|
||||||
|
|
||||||
#### Cameradar allows you to:
|
#### Cameradar allows you to:
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
const std::pair<bool, etix::tool::opt_parse>& opts)
|
const std::pair<bool, etix::tool::opt_parse>& opts)
|
||||||
: busy(false)
|
: busy(false)
|
||||||
, current(task::init)
|
, current(task::init)
|
||||||
, nmap_output("scans/scan" + std::to_string(std::chrono::system_clock::to_time_t(
|
, nmap_output("/tmp/scans/scan" + std::to_string(std::chrono::system_clock::to_time_t(
|
||||||
std::chrono::system_clock::now())) +
|
std::chrono::system_clock::now())) +
|
||||||
".xml")
|
".xml")
|
||||||
, conf(conf)
|
, conf(conf)
|
||||||
|
|||||||
@@ -29,11 +29,8 @@ namespace cameradar {
|
|||||||
bool
|
bool
|
||||||
nmap_is_ok() {
|
nmap_is_ok() {
|
||||||
return (
|
return (
|
||||||
launch_command("test `dpkg -l | cut -c 5-9 | grep nmap` = nmap")
|
(system("dpkg -l | cut -c 5-9 | grep nmap") == 0)
|
||||||
// && launch_command("test `nmap --version | cut -c 14-18 | head -n2 | tail -n1` = 6.47")
|
&& launch_command("mkdir -p /tmp/scans")); // Creates the directory in which the scans will be stored
|
||||||
&&
|
|
||||||
launch_command(
|
|
||||||
"mkdir -p scans")); // Creates the directory in which the scans will be stored
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Launches and checks the return of the nmap command
|
//! Launches and checks the return of the nmap command
|
||||||
|
|||||||
Reference in New Issue
Block a user