Changeset 474

Show
Ignore:
Timestamp:
04/07/06 03:31:34 (2 years ago)
Author:
common
Message:

library
- library-core
- changes to socket manager, no more than one dialogue required
- SQL{Manager,Handler,Callback,Query,Result} added
- removed add unneeded features like shellcodefoobar from Library, will remove the files later on
- s/Nepenthes/Library/g
- s/nepenthes/library/g

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • library/trunk/library-core/Makefile.am

    r321 r474  
    1 # nepenthes meta-Makefile 
     1# library meta-Makefile 
    22# Maximillian Dornseif 
    33# $Id$ 
  • library/trunk/library-core/include/Buffer.hpp

    r321 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3232#include <stdint.h> 
    3333 
    34 namespace nepenthes 
     34namespace library 
    3535{ 
    3636        /** 
  • library/trunk/library-core/include/Config.hpp

    r321 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    5757 
    5858 
    59 namespace nepenthes 
     59namespace library 
    6060{ 
    6161 
  • library/trunk/library-core/include/ConsoleLogger.hpp

    r321 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3333#include "LogHandler.hpp" 
    3434 
    35 namespace nepenthes 
     35namespace library 
    3636{ 
    3737 
  • library/trunk/library-core/include/DNSCallback.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3535using namespace std; 
    3636 
    37 namespace nepenthes 
     37namespace library 
    3838{ 
    3939        class DNSResult; 
  • library/trunk/library-core/include/DNSHandler.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3535using namespace std; 
    3636 
    37 namespace nepenthes 
     37namespace library 
    3838{ 
    3939        class DNSQuery; 
  • library/trunk/library-core/include/DNSManager.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3737#include "EventHandler.hpp" 
    3838 
    39 namespace nepenthes 
     39namespace library 
    4040{ 
    4141        class DNSCallback; 
     
    4848        { 
    4949        public: 
    50                 DNSManager(Nepenthes *nepenthes); 
     50                DNSManager(Library *library); 
    5151                virtual ~DNSManager(); 
    5252 
  • library/trunk/library-core/include/DNSQuery.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    4141 
    4242 
    43 namespace nepenthes 
     43namespace library 
    4444{ 
    4545 
  • library/trunk/library-core/include/DNSResult.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    4444using namespace std; 
    4545 
    46 namespace nepenthes 
     46namespace library 
    4747{ 
    4848 
  • library/trunk/library-core/include/Dialogue.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3434using namespace std; 
    3535 
    36 namespace nepenthes 
     36namespace library 
    3737{ 
    3838 
     
    4040    class Module; 
    4141    class Socket; 
    42     class Nepenthes
     42    class Library
    4343    class Message; 
    4444 
     
    4848        { 
    4949                CL_DROP, 
    50                 CL_UNSURE, 
    51                 CL_READONLY, 
    52                 CL_ASSIGN, 
    53                 CL_ASSIGN_AND_DONE 
     50                CL_ASSIGN 
    5451        } ConsumeLevel; 
    5552 
     
    6663        virtual ~Dialogue(){}; 
    6764        virtual ConsumeLevel incomingData(Message * msg) = 0; 
    68         virtual ConsumeLevel outgoingData(Message * msg) = 0; 
    6965        virtual ConsumeLevel handleTimeout(Message * msg) = 0; 
    7066 
     
    9995 
    10096 
    101                 /** 
    102                  */ 
    103                 virtual void dump() 
    104                 {// as some dialogues wont need this fn 
    105                         return; 
    106                 } 
    10797 
    10898    protected: 
    10999        Module      *m_Module; 
    110100        Socket      *m_Socket; 
    111         Nepenthes   *m_Nepenthes
     101        Library   *m_Library
    112102 
    113103        ConsumeLevel m_ConsumeLevel; 
  • library/trunk/library-core/include/DialogueFactory.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3434using namespace std; 
    3535 
    36 namespace nepenthes 
     36namespace library 
    3737{ 
    3838        class Socket; 
  • library/trunk/library-core/include/DialogueFactoryManager.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3434#include "Manager.hpp" 
    3535 
    36 #define REG_DIALOGUEFACTORY(diaf) g_Nepenthes->getFactoryMgr()->registerFactory(diaf) 
     36#define REG_DIALOGUEFACTORY(diaf) g_Library->getFactoryMgr()->registerFactory(diaf) 
    3737 
    3838using namespace std; 
    3939 
    40 namespace nepenthes 
     40namespace library 
    4141{ 
    4242 
    4343        class DialogueFactory; 
    44         class Nepenthes
     44        class Library
    4545 
    4646        /** 
     
    5555        { 
    5656        public: 
    57                 DialogueFactoryManager(Nepenthes *nepenthes); 
     57                DialogueFactoryManager(Library *library); 
    5858                virtual ~DialogueFactoryManager(); 
    5959                bool Init(); 
  • library/trunk/library-core/include/Event.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3333#include <stdint.h> 
    3434 
    35 namespace nepenthes 
     35namespace library 
    3636{ 
    3737 
  • library/trunk/library-core/include/EventHandler.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    5151using namespace std; 
    5252 
    53 namespace nepenthes 
     53namespace library 
    5454{ 
    5555        class EventManager; 
  • library/trunk/library-core/include/EventManager.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3737#include "Manager.hpp" 
    3838 
    39 #define REG_EVENT_HANDLER(handler) g_Nepenthes->getEventMgr()->registerEventHandler(handler) 
    40 #define UNREG_EVENT_HANDLER(handler) g_Nepenthes->getEventMgr()->unregisterEventHandler(handler) 
     39#define REG_EVENT_HANDLER(handler) g_Library->getEventMgr()->registerEventHandler(handler) 
     40#define UNREG_EVENT_HANDLER(handler) g_Library->getEventMgr()->unregisterEventHandler(handler) 
    4141 
    4242using namespace std; 
    4343 
    44 namespace nepenthes 
     44namespace library 
    4545{ 
    46         class Nepenthes
     46        class Library
    4747        class Event; 
    4848        class EventHandler; 
     
    6161    { 
    6262    public: 
    63         EventManager(Nepenthes *nepenthes); 
     63        EventManager(Library *library); 
    6464        virtual ~EventManager(); 
    6565        virtual uint32_t handleEvent(Event *event); 
  • library/trunk/library-core/include/FileLogger.hpp

    r336 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3333#include "LogHandler.hpp" 
    3434 
    35 namespace nepenthes 
     35namespace library 
    3636{ 
    3737 
  • library/trunk/library-core/include/GeoLocationCallback.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3939using namespace std; 
    4040 
    41 namespace nepenthes 
     41namespace library 
    4242{ 
    4343        class GeoLocationResult; 
  • library/trunk/library-core/include/GeoLocationHandler.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3939using namespace std; 
    4040 
    41 namespace nepenthes 
     41namespace library 
    4242{ 
    4343        class GeoLocationQuery; 
  • library/trunk/library-core/include/GeoLocationManager.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3838#include "GeoLocationHandler.hpp" 
    3939 
    40 namespace nepenthes 
     40namespace library 
    4141{ 
    4242 
     
    5050        { 
    5151        public: 
    52                 GeoLocationManager(Nepenthes *nepenthes); 
     52                GeoLocationManager(Library *library); 
    5353                ~GeoLocationManager(); 
    5454 
  • library/trunk/library-core/include/GeoLocationQuery.hpp

    r332 r474  
    11 
    22/******************************************************************************** 
    3  *                              Nepenthes 
     3 *                              Library 
    44 *                        - finest collection - 
    55 * 
     
    2323 *  
    2424 *  
    25  *             contact nepenthesdev@users.sourceforge.net   
     25 *             contact librarydev@users.sourceforge.net   
    2626 * 
    2727 *******************************************************************************/ 
     
    4141using namespace std; 
    4242 
    43 namespace nepenthes 
     43namespace library 
    4444{ 
    4545        class GeoLocationCallback; 
  • library/trunk/library-core/include/GeoLocationResult.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    4040using namespace std; 
    4141 
    42 namespace nepenthes 
     42namespace library 
    4343{ 
    4444        class GeoLocationResult 
  • library/trunk/library-core/include/LogHandler.hpp

    r321 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3333#include <stdint.h> 
    3434 
    35 namespace nepenthes 
     35namespace library 
    3636{ 
    3737        class LogManager; 
  • library/trunk/library-core/include/LogHandlerEntry.hpp

    r321 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3131#define LOGHANDLERENTRY_HPP 
    3232 
    33 namespace nepenthes 
     33namespace library 
    3434{ 
    3535        class LogHandler; 
  • library/trunk/library-core/include/LogManager.hpp

    r375 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3434#include <stdint.h> 
    3535 
    36 namespace nepenthes 
     36namespace library 
    3737{ 
    3838        #define MAX_TAGS 32 
  • library/trunk/library-core/include/Makefile.am

    r332 r474  
    1 # nepenthes header Makefile 
     1# library header Makefile 
    22# Maximillian Dornseif 
    33# $Id$ 
     
    1111EXTRA_DIST += DialogueFactory.hpp DialogueFactoryManager.hpp Dialogue.hpp 
    1212EXTRA_DIST += DNSManager.hpp DNSHandler.hpp DNSQuery.hpp DNSCallback.hpp DNSResult.hpp 
    13 EXTRA_DIST += DownloadManager.hpp DownloadHandler.hpp Download.hpp DownloadBuffer.hpp DownloadUrl.hpp DownloadCallback.hpp 
    1413EXTRA_DIST += EventManager.hpp EventHandler.hpp Event.hpp SubmitEvent.hpp SocketEvent.hpp 
    1514EXTRA_DIST += GeoLocationManager.hpp GeoLocationHandler.hpp GeoLocationCallback.hpp GeoLocationQuery.hpp  GeoLocationResult.hpp GeoLocationResult.hpp 
     
    1716EXTRA_DIST += LuaFunctions.hpp LuaInterface.hpp 
    1817EXTRA_DIST += ModuleManager.hpp Module.hpp   
    19 EXTRA_DIST += Manager.hpp Nepenthes.hpp 
    20 EXTRA_DIST += SocketManager.hpp Socket.hpp TCPSocket.hpp UDPSocket.hpp POLLSocket.hpp RAWSocket.hpp Responder.hpp  UDSSocket.hpp FILESocket.hpp 
    21 EXTRA_DIST += ShellcodeManager.hpp ShellcodeHandler.hpp  
     18EXTRA_DIST += Manager.hpp Library.hpp 
     19EXTRA_DIST += SocketManager.hpp Socket.hpp TCPSocket.hpp 
    2220EXTRA_DIST += Packet.hpp 
    23 EXTRA_DIST += SubmitManager.hpp SubmitHandler.hpp  
    24 EXTRA_DIST += UploadManager.hpp UploadHandler.hpp UploadQuery.hpp UploadCallback.hpp  UploadResult.hpp  
    2521EXTRA_DIST += Utilities.hpp 
  • library/trunk/library-core/include/Manager.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3131#define HAVE_MANAGER_HPP 
    3232 
    33 namespace nepenthes 
     33namespace library 
    3434{ 
    3535 
    36         class Nepenthes
     36        class Library
    3737 
    3838        /** 
     
    4444        public: 
    4545                virtual ~Manager(){};  
    46                 virtual Nepenthes *getNepenthes(); 
     46                virtual Library *getLibrary(); 
    4747                virtual bool Init()=0; 
    4848                virtual bool Exit()=0; 
    4949                virtual void doList()=0; 
    5050        protected: 
    51                 Nepenthes *m_Nepenthes
     51                Library *m_Library
    5252        }; 
    5353} 
  • library/trunk/library-core/include/Message.hpp

    r332 r474  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24