From 6bee4771a9199216d00d6098f1562ef57176e1cf Mon Sep 17 00:00:00 2001 From: Andrea Bontempi Date: Sat, 25 Aug 2012 22:19:37 +0200 Subject: [PATCH] Config file for breeder --- Breeder.cpp | 9 +- CMakeLists.txt | 2 +- CMakeLists.txt.user | 360 +++++++++++++++++++++++++++++++++++++++ libraries/libBreeder.cpp | 59 +++++++ libraries/libBreeder.h | 34 ++++ 5 files changed, 460 insertions(+), 4 deletions(-) create mode 100644 CMakeLists.txt.user create mode 100644 libraries/libBreeder.cpp create mode 100644 libraries/libBreeder.h diff --git a/Breeder.cpp b/Breeder.cpp index 00210b8..a2d04f5 100644 --- a/Breeder.cpp +++ b/Breeder.cpp @@ -31,6 +31,7 @@ #include #include #include +#include "./libraries/libBreeder.h" #include "./commons/classPacket.h" #include "./commons/classFlow.h" #include "./commons/libDump.h" @@ -56,8 +57,10 @@ int main ( int argc, char **argv ) { return EXIT_SUCCESS; } - // TODO + configInitialization(); + // TODO + classFlowMatch* match = new classFlowMatch("file.txt"); list regularexpressions; @@ -69,8 +72,8 @@ int main ( int argc, char **argv ) { if ( regularexpressions.empty() ) { std::cerr<<"ERROR >> You have not selected any protocol!"< + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + true + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + + CMakeProjectManager.DefaultCMakeTarget + 0 + 0 + 0 + + /home/andreabont/Git/Project-Riddle_build2 + ProjectExplorer.ToolChain.Gcc:{a85a6452-cb1b-4b19-9177-eaa3c55c3bca} + ProjectExplorer.ToolChain.Gcc:{a85a6452-cb1b-4b19-9177-eaa3c55c3bca} + + + + + false + true + Make + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + clean + + true + true + Make + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + all + + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + No deployment + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + breeder + + false + + + breeder + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + true + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + cigarette + + false + + + cigarette + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + true + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + pursuer + + false + + + pursuer + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + true + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + ranging + + false + + + ranging + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + true + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + riddle + + false + + + riddle + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + true + + 5 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {cb167a59-f7ad-4f4e-93fa-2d350f12a295} + + + ProjectExplorer.Project.Updater.FileVersion + 11 + + diff --git a/libraries/libBreeder.cpp b/libraries/libBreeder.cpp new file mode 100644 index 0000000..86670f5 --- /dev/null +++ b/libraries/libBreeder.cpp @@ -0,0 +1,59 @@ +/** + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + * + * Name : Project Riddle + * Author : Andrea Bontempi + * Version : 0.1 aplha + * Description : Modular Network Sniffer + * + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + * + * This file is part of the project Riddle. + * + * The project Riddle 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 3 of the License, or + * (at your option) any later version. + * + * The project Riddle 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 project. If not, see . + * + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + */ + +#include +#include +#include + +#include "libBreeder.h" + +void configInitialization() +{ + + boost::property_tree::ptree root; + + boost::property_tree::ptree global; + global.put( "threshold", "90" ); + global.put( "protocols", "http" ); + + root.push_front( + boost::property_tree::ptree::value_type( "global", global ) + ); + + boost::property_tree::ptree http; + http.put( "description", "..." ); + http.put( "regexp", "..." ); + http.put( "ports", "80 8080" ); + + root.push_back( + boost::property_tree::ptree::value_type( "http", http ) + ); + + write_ini( "breeder.conf", root ); + +} diff --git a/libraries/libBreeder.h b/libraries/libBreeder.h new file mode 100644 index 0000000..33f8087 --- /dev/null +++ b/libraries/libBreeder.h @@ -0,0 +1,34 @@ +/** + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + * + * Name : Project Riddle + * Author : Andrea Bontempi + * Version : 0.1 aplha + * Description : Modular Network Sniffer + * + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + * + * This file is part of the project Riddle. + * + * The project Riddle 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 3 of the License, or + * (at your option) any later version. + * + * The project Riddle 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 project. If not, see . + * + * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - + */ + +#ifndef LIBBREEDER_H +#define LIBBREEDER_H + +void configInitialization(); + +#endif //LIBBREEDER_H