Commit f1eaaa41 authored by Marcos Fouces's avatar Marcos Fouces

New upstream version 0.5~alpha1

parent 775aab34
Francesco Cecconi <francesco.cecconi@gmail.com>
Innocenzo Ventre <el.diabl09@gmail.com>
cmake_minimum_required(VERSION 2.6.0)
PROJECT( nmapsi4 )
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 70)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
cmake_minimum_required(VERSION 2.8.2)
if (NOT WIN32 AND NOT APPLE)
FIND_PACKAGE(Qt4 4.5.3 COMPONENTS QtCore QtGui QtNetwork QtWebKit QtDBus REQUIRED)
FIND_PACKAGE(Qt5 5.2.0 COMPONENTS
Core
Widgets
Network
WebKitWidgets
WebKit
DBus
Script
LinguistTools
Quick
Qml
Gui
REQUIRED)
else (NOT WIN32 AND NOT APPLE)
FIND_PACKAGE(Qt4 4.5.3 COMPONENTS QtCore QtGui QtNetwork QtWebKit REQUIRED)
FIND_PACKAGE(Qt5 5.2.0
COMPONENTS
Core
Widgets
Network
WebKitWidgets
WebKit
Script
LinguistTools
Quick
Qml
Gui
REQUIRED)
endif (NOT WIN32 AND NOT APPLE)
include(${QT_USE_FILE})
add_definitions (${QT5_DEFINITIONS})
include_directories(${QT5_USE_FILE})
ADD_DEFINITIONS(-O2 -Wall -Wextra -g -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-nmapsi4.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nmapsi4.h )
if (Q_WS_WIN)
include(CMakeMinGWFindMake)
endif (Q_WS_WIN)
add_definitions(-O2 -Wall -Wextra -g -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
if(Q_WS_MAC)
SET( CMAKE_OSX_ARCHITECTURES i386;x86_64 )
SET( MACOSX_BUNDLE_ICON_FILE ${PROJECT_SOURCE_DIR}/icons/nmapsi4.icns )
endif(Q_WS_MAC)
if(UNIX)
add_definitions(-std=c++0x)
endif()
add_subdirectory( lib )
add_subdirectory( nmapsi4 )
add_subdirectory( nmapsi4-logr )
if (WIN32)
include(CMakeMinGWFindMake)
endif (WIN32)
if(APPLE)
SET( CMAKE_OSX_ARCHITECTURES x86_64 )
SET( MACOSX_BUNDLE_ICON_FILE ${PROJECT_SOURCE_DIR}/icons/nmapsi4.icns )
set( MACOSX_BUNDLE_BUNDLE_NAME nmapsi4 )
set( MACOSX_BUNDLE_GUI_IDENTIFIER "nmapsi4" )
set( MACOSX_BUNDLE_INFO_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ","
" Copyright 2013 Francesco Cecconi" )
set( MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}" )
set( MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
set( MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
set( MACOSX_BUNDLE_COPYRIGHT "(C) 2013 Francesco Cecconi" )
endif(APPLE)
CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${PROJECT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY )
ADD_CUSTOM_TARGET( uninstall
"${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake" )
message("------------------------------------------------")
message(" Required for build: qt4-dev (>> 4.5.3) ")
message(" Required for runtime: nmap ( >= 5.51 ) with nping for discovery tool")
message(" Recommends for runtime: dig ")
message("------------------------------------------------")
message("-------------------------------------------------------------------")
message(" Required for build: qt5-dev (>>= 5.2.0) ")
message(" Required for runtime: nmap+nping ( >= 6.00 ), dig ")
message("-------------------------------------------------------------------")
add_subdirectory( src )
See the source page at http://nmapsi4.org/node/5 and/or contact brand@nmapsi4.org
for helpful info.
#!/bin/bash
tsDir="src/ts"
templateDir="$tsDir/template/nmapsi4.ts"
translationsPath="$templateDir "
for tsfile in $(ls $tsDir); do
if [ $tsfile != "po" ] && [ $tsfile != "template" ]; then
translationsPath="$translationsPath$tsDir/$tsfile "
fi
done
lupdate -recursive -no-obsolete src/ -ts $translationsPath
cd tools/
ruby convert_translations.rb ts2po
\ No newline at end of file
Build Information for Linux:
Required:
* qt4
* cmake >= 2.6
* nmap >= 5.51 with nping for discovery tool
Recommend:
* dig package (debian: dnsutils)
Build:
# cd tools/
# ./cmake_verbose_script.sh
cd ../build/
# make
# make install (only root) || search or create a package for your disto ;)
Packages:
http://www.nmapsi4.org
* Debian Package (not tested with kubuntu)
* OpenSuse
* altlinux
* archlinux (DPKGBUILD)
Start nmapsi4 SVN version:
# ./nmapsi (user mode)
# sudo ./nmapsi4 (full nmap extensions) || (kdesu etc etc ;) )
For SVN version read:
http://code.google.com/p/nmapsi4/wiki/CompileSvnSnapshot
**********************************************************************
nmapsi4-admin.desktop (with kdesu):
**********************************************************************
installed nmapsi4-admin.desktop used kdesu for default
**********************************************************************
**********************************************************************
For sudo users:
**********************************************************************
* set X-KDE-SubstituteUID=true to X-KDE-SubstituteUID=false in /usr/share/applications/kde/nmapsi4-admin.desktop
* change Exec=nmapsi4 with Exec=kdesu/sudo/su-to-root nmapsi4
insert this line in your /etc/sudoers:
#cd /etc
#visudo
#
# sudoers line
#
Cmnd_Alias NMAPSI4 = /usr/bin/nmapsi4
ALL ALL=NOPASSWD:NMAPSI4
Else:
start nmapsi4 in user mode. ;)
***********************************************************************************
MS windows build:
for build informations with MS windows OS visit: http://www.nmapsi4.org
***********************************************************************************
Mac Os:
sorry, but I haven't a mac machine, for build nmapsi4 ;)
# NmapSi4
## Description:
NmapSi4 is a complete Qt-based Gui with the design goals to provide a complete nmap
interface for Users, in order to management all options of this powerful
security net scanner.
## HomePage:
<http://www.nmapsi4.org>
## Required for build:
* cmake >= 2.8.2
* Qt5 >= 5.2
* qtwebkit
## Required for runtime:
* nmap + nping >= 6.00
* dig package (debian: dnsutils)
## Build on GNU/Linux:
$ cd nmapsi4
$ cd tools/
$ ./cmake_verbose_script.sh
### OR
$ cd nmapsi4
$ mkdir build
$ cd build/
### AND
$ make
$ make install (only root) or create a package for your disto ;)
## Packages:
Visit <http://www.nmapsi4.org>
## Info for admin desktop file:
nmapsi4-admin.desktop uses by default kdesu for execute nmap with root uid.
However, it is possible change kdesu in the desktop file:
nmapsi4-admin.desktop: Exec=kdesu nmapsi4 with Exec=[what you want] nmapsi4
## Build on MS Windows:
visit: <http://www.nmapsi4.org>
## Build on Mac Osx:
Read: <http://www.nmapsi4.org/node/38>
## Contributing
Report bugs on <http://bugs.nmapsi4.org>
Clone git repository with:
git clone git://github.com/nmapsi4/nmapsi4.git
## Author
- Francesco Cecconi <francesco.cecconi@gmail.com>
#define INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/share/nmapsi4/"
#cmakedefine VERSION "@VERSION@"
images/document-preview-archive.png

2.27 KB | W: | H:

images/document-preview-archive.png

6.46 KB | W: | H:

images/document-preview-archive.png
images/document-preview-archive.png
images/document-preview-archive.png
images/document-preview-archive.png
  • 2-up
  • Swipe
  • Onion skin
images/hub.png

921 Bytes

images/os-logo/windows_logo.png

4.22 KB | W: | H:

images/os-logo/windows_logo.png

1.14 KB | W: | H:

images/os-logo/windows_logo.png
images/os-logo/windows_logo.png
images/os-logo/windows_logo.png
images/os-logo/windows_logo.png
  • 2-up
  • Swipe
  • Onion skin
EXCLUDE qclasses,license,i18ncheckarg
#
# lib CMakeLists.txt
# Developer: Francesco Cecconi
#
add_subdirectory(history)
add_subdirectory(about)
PROJECT(nmapsi4_about)
SET( SOURCES_CPP about.cpp )
#MESSAGE( STATUS ${SOURCES_CPP} )
#SET(SOURCES_H about.h)
#MESSAGE( STATUS ${SOURCES_H} )
SET(SOURCES_UI about.ui )
#MESSAGE( STATUS ${SOURCES_UI} )
SET(RESOURCES_QRC ../../mainwin.qrc)
#MESSAGE( STATUS ${RESOURCES_QRC} )
QT4_ADD_RESOURCES(RESOURCES_QRC_SOURCES ${RESOURCES_QRC} )
QT4_WRAP_UI(SOURCES_UI_H ${SOURCES_UI})
QT4_WRAP_CPP( SOURCES_CPP ${SOURCES_H} )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
ADD_LIBRARY( nmapsi4_about STATIC ${SOURCES_CPP} ${SOURCES_H} ${SOURCES_UI_H} ${RESOURCES_QRC_SOURCES})
/***************************************************************************
* Copyright (C) 2008-2011 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "about.h"
mainAbout::mainAbout()
{
setupUi(this);
QString version = labelVersion->text();
version.append(_VERSION_);
labelVersion->setText(version);
}
void mainAbout::qt()
{
QMessageBox::aboutQt(this, "Qt Version");
}
mainAbout::~mainAbout() {
}
/***************************************************************************
* Copyright (C) 2008-2011 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef ABOUT_H
#define ABOUT_H
#include <QDialog>
#include <QMessageBox>
#include <ui_about.h>
#include "staticDefine.h"
class mainAbout : public QDialog, private Ui::AboutWin
{
public:
mainAbout();
~mainAbout();
void qt();
};
#endif
/***************************************************************************
* Copyright (C) 2007-2011 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef STATICDEFINE_H
#define STATICDEFINE_H
#define _VERSION_ "0.3.1"
#endif
PROJECT(nmapsi4_history)
SET( SOURCES_CPP coreHistory.cpp
loghistory.cpp)
#MESSAGE( STATUS ${SOURCES_CPP} )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
ADD_LIBRARY( nmapsi4_history STATIC ${SOURCES_CPP})
/***************************************************************************
* Copyright (C) 2008-2011 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "loghistory.h"
//
// @Developer: Francesco Cecconi
//
void logHistory::coreItemHistory(const QString url, const QString scanTime)
{
Q_ASSERT(!url.isEmpty());
QSettings settings("nmapsi4", "nmapsi4_bookmark");
QList<QString> urlList;
QList<QString> urlListTime;
urlList = historyReadUrl();
if (!scanTime.isNull())
{
urlListTime = historyReadUrlTime();
}
if (urlList.contains("NULL"))
{
urlList.removeFirst();
urlList.append(url);
settings.setValue(configTag, QVariant(urlList));
if (!scanTime.isNull())
{
urlListTime.removeFirst();
urlListTime.append(scanTime);
settings.setValue(configTagTime, QVariant(urlListTime));
}
}
else if (((urlList.size() == __CACHE_SIZE__)
&& (__CACHE_SIZE__ != -1))
&& (!urlList.contains(url)))
{
urlList.removeLast();
urlList.push_front(url);
settings.setValue(configTag, QVariant(urlList));
if (!scanTime.isNull())
{
urlListTime.removeLast();
urlListTime.push_front(scanTime);
settings.setValue(configTagTime, QVariant(urlListTime));
}
}
else if (!urlList.contains(url))
{
urlList.push_front(url);
settings.setValue(configTag, QVariant(urlList));
if (!scanTime.isNull())
{
urlListTime.push_front(scanTime);
settings.setValue(configTagTime, QVariant(urlListTime));
}
}
else if (!scanTime.isNull())
{
int index = urlList.indexOf(url);
urlListTime[index].clear();
urlListTime[index].append(QDateTime::currentDateTime().toString("ddd MMMM d yy - hh:mm:ss.zzz"));
settings.setValue(configTagTime, QVariant(urlListTime));
}
}
/***************************************************************************
* Copyright (C) 2008-2011 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "loghistory.h"
logHistory::logHistory(QTreeWidget* treeLog,
const QString ConfigTag,
const QString ConfigTagTime,
int cacheSize) : logTree(NULL)
{
Q_ASSERT(treeLog->columnCount() == 2 || treeLog->columnCount() == 3);
logTree = treeLog;
configTag = ConfigTag;
configTagTime = ConfigTagTime;
__CACHE_SIZE__ = cacheSize;
}
// cache host contructor
logHistory::logHistory(const QString ConfigTag, int cacheSize)
: logTree(NULL)
{
configTag = ConfigTag;
__CACHE_SIZE__ = cacheSize;
}
logHistory::~logHistory()
{
}
const QStringList logHistory::historyReadUrl()
{
QSettings settings("nmapsi4", "nmapsi4_bookmark");
QStringList urlList;
urlList = settings.value(configTag, "NULL").toStringList();
return urlList;
}
const QList<QString> logHistory::historyReadUrlTime()
{
QSettings settings("nmapsi4", "nmapsi4_bookmark");
QList<QString> urlListTime;
urlListTime = settings.value(configTagTime, "NULL").toStringList();
return urlListTime;
}
void logHistory::addItemHistory(const QString name)
{
coreItemHistory(name, NULL);
}
void logHistory::addItemHistory(const QString name, const QString value)
{
coreItemHistory(name, value);
}
void logHistory