From d9945f5e261f2b64fefb0ef0579d9bf698aeab7f Mon Sep 17 00:00:00 2001 From: Brendan LE GLAUNEC Date: Wed, 31 Aug 2016 09:39:08 +0200 Subject: [PATCH] Fix nmap package detection --- CMakeLists.txt | 2 +- README.md | 2 +- cameradar_standalone/include/dispatcher.h | 2 +- cameradar_standalone/src/tasks/mapping.cpp | 7 ++----- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5b92e4..badf6d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ message ("Here") set (${PROJECT_NAME}_VERSION_MAJOR 1) 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}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}") diff --git a/README.md b/README.md index 94d74e2..c692f22 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## An RTSP surveillance camera access multitool [![cameradar License](https://img.shields.io/badge/license-Apache-blue.svg)](#license) -[![Latest release](https://img.shields.io/badge/release-1.0.3-green.svg)](https://github.com/EtixLabs/cameradar/releases/latest) +[![Latest release](https://img.shields.io/badge/release-1.0.4-green.svg)](https://github.com/EtixLabs/cameradar/releases/latest) #### Cameradar allows you to: diff --git a/cameradar_standalone/include/dispatcher.h b/cameradar_standalone/include/dispatcher.h index f722b09..44d6d6e 100644 --- a/cameradar_standalone/include/dispatcher.h +++ b/cameradar_standalone/include/dispatcher.h @@ -64,7 +64,7 @@ public: const std::pair& opts) : busy(false) , 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())) + ".xml") , conf(conf) diff --git a/cameradar_standalone/src/tasks/mapping.cpp b/cameradar_standalone/src/tasks/mapping.cpp index 356ee8c..f976d14 100644 --- a/cameradar_standalone/src/tasks/mapping.cpp +++ b/cameradar_standalone/src/tasks/mapping.cpp @@ -29,11 +29,8 @@ namespace cameradar { bool nmap_is_ok() { return ( - launch_command("test `dpkg -l | cut -c 5-9 | grep nmap` = nmap") - // && launch_command("test `nmap --version | cut -c 14-18 | head -n2 | tail -n1` = 6.47") - && - launch_command( - "mkdir -p scans")); // Creates the directory in which the scans will be stored + (system("dpkg -l | cut -c 5-9 | grep nmap") == 0) + && launch_command("mkdir -p /tmp/scans")); // Creates the directory in which the scans will be stored } //! Launches and checks the return of the nmap command