Changeset 836

Show
Ignore:
Timestamp:
02/06/07 16:16:50 (2 years ago)
Author:
common
Message:

nepenthes

  • make hexdump an Event, idea from daniel.frasnelli@verizonbusiness.com, will improve performance on high load sensors
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/dnsresolve-adns/dnsresolve-adns.cpp

    r550 r836  
    4848 
    4949#include "EventManager.hpp" 
     50#include "Nepenthes.hpp" 
    5051 
    5152using namespace std; 
  • nepenthes/trunk/modules/download-creceive/CReceiveDialogue.cpp

    r630 r836  
    8888CReceiveDialogue::~CReceiveDialogue() 
    8989{ 
    90 //      g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     90//      HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    9191//      delete m_Buffer; 
    9292        delete m_Download; 
  • nepenthes/trunk/modules/download-http/HTTPDialogue.cpp

    r550 r836  
    179179        { 
    180180                logWarn("HTTP ERROR header found %i\n", size); 
    181               g_Nepenthes->getUtilities()->hexdump((byte *)start,size); 
     181//            g_Nepenthes->getUtilities()->hexdump((byte *)start,size); 
    182182                return CL_DROP; 
    183183        }else 
  • nepenthes/trunk/modules/download-link/LinkDialogue.cpp

    r550 r836  
    123123                { 
    124124                        m_Buffer->add(msg->getMsg(),msg->getSize()); 
    125 //                      g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     125//                      HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    126126                        msg->getResponder()->doRespond((char *)&m_Challenge,4); 
    127127 
  • nepenthes/trunk/modules/module-portwatch/WatchDialogue.cpp

    r332 r836  
    4848#include "Utilities.hpp" 
    4949 
     50#include "EventManager.hpp" 
     51#include "SocketEvent.hpp" 
     52 
    5053#ifdef STDTAGS  
    5154#undef STDTAGS  
     
    7881{ 
    7982        logWarn("Unknown WatchDialogue %i bytes, port %i\n",m_Buffer->getSize(), m_Socket->getLocalPort());              
    80         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     83        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    8184        delete m_Buffer; 
    8285} 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_cmd.cpp

    r550 r836  
    9696        { 
    9797//              logDebug("GenricCMD (improve pcre debug) (%i bytes)\n",(*msg)->getSize()); 
    98 //              g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)(*msg)->getMsg(),(*msg)->getSize()); 
     98//              HEXDUMP(m_Socket,(byte *)(*msg)->getMsg(),(*msg)->getSize()); 
    9999  
    100100                const char * pRemoteCommand; 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_leimbach_url_xor.cpp

    r341 r836  
    204204                        pcre_free_substring(xordecoder); 
    205205 
    206                       g_Nepenthes->getUtilities()->hexdump(l_crit,(byte *)newshellcode, len);                  
     206//                    g_Nepenthes->getUtilities()->hexdump(l_crit,(byte *)newshellcode, len);                  
    207207 
    208208                        Message *newMessage = new Message((char *)newshellcode, len, (*msg)->getLocalPort(), (*msg)->getRemotePort(), 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_url.cpp

    r341 r836  
    120120        if((iResult = pcre_exec(m_pcre, 0, (char *) shellcode, len, 0, 0, (int *)piOutput, sizeof(piOutput)/sizeof(int32_t))) > 0) 
    121121        { 
    122 //              g_Nepenthes->getUtilities()->hexdump(STDTAGS,shellcode,len); 
     122//              HEXDUMP(m_Socket,shellcode,len); 
    123123                const char * pUrl; 
    124124 
  • nepenthes/trunk/modules/shellemu-winnt/VFSCommandFTP.cpp

    r555 r836  
    426426                remotehost = m_VFS->getDialogue()->getSocket()->getRemoteHost(); 
    427427                localhost  = m_VFS->getDialogue()->getSocket()->getLocalHost(); 
    428  
    429428        } 
    430429 
  • nepenthes/trunk/modules/submit-gotek/gotekCTRLDialogue.cpp

    r550 r836  
    113113                        unsigned char sessionkey[8]; 
    114114                        memcpy((char *)sessionkey,(char *)m_Buffer->getData(),8); 
    115                       g_Nepenthes->getUtilities()->hexdump(sessionkey,8); 
     115//                    g_Nepenthes->getUtilities()->hexdump(sessionkey,8); 
    116116 
    117117                         
     
    129129                        memset(hashme,0,1032); 
    130130 
    131                       g_Nepenthes->getUtilities()->hexdump(g_GotekSubmitHandler->getCommunityKey(),1024); 
     131//                    g_Nepenthes->getUtilities()->hexdump(g_GotekSubmitHandler->getCommunityKey(),1024); 
    132132                        memcpy(hashme,g_GotekSubmitHandler->getCommunityKey(),1024); 
    133133                        memcpy(hashme+1024,sessionkey,8); 
    134                       g_Nepenthes->getUtilities()->hexdump(hashme, 1032); 
     134//                    g_Nepenthes->getUtilities()->hexdump(hashme, 1032); 
    135135 
    136136                        g_Nepenthes->getUtilities()->sha512(hashme, 1032, hash); 
    137                       g_Nepenthes->getUtilities()->hexdump(hash,64); 
     137//                    g_Nepenthes->getUtilities()->hexdump(hash,64); 
    138138 
    139139                        m_Socket->doRespond((char *)hash,64); 
  • nepenthes/trunk/modules/submit-gotek/gotekDATADialogue.cpp

    r515 r836  
    174174                        memset(hashme,0,1032); 
    175175 
    176                       g_Nepenthes->getUtilities()->hexdump(g_GotekSubmitHandler->getCommunityKey(),1024); 
     176//                    g_Nepenthes->getUtilities()->hexdump(g_GotekSubmitHandler->getCommunityKey(),1024); 
    177177                        memcpy(hashme,g_GotekSubmitHandler->getCommunityKey(),1024); 
    178178                        memcpy(hashme+1024,&sessionkey,8); 
  • nepenthes/trunk/modules/vuln-asn1/IISDialogue.cpp

    r332 r836  
    4444#include "Socket.hpp" 
    4545 
     46#include "EventManager.hpp" 
     47#include "SocketEvent.hpp" 
     48 
    4649#ifdef STDTAGS  
    4750#undef STDTAGS  
     
    8083        case IIS_GET: 
    8184                logWarn("Unknown IIS %i bytes State %i\n",m_Buffer->getSize(), m_State);                 
    82                 g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     85                HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    8386                break; 
    8487 
     
    103106{ 
    104107        m_Buffer->add(msg->getMsg(),msg->getSize()); 
    105 //      g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     108//      HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    106109 
    107110        // FIXME this can only recognize urldownloadtofile foobar 
  • nepenthes/trunk/modules/vuln-asn1/SMBDialogue.cpp

    r550 r836  
    4444#include "ShellcodeManager.hpp" 
    4545 
     46#include "EventManager.hpp" 
     47#include "SocketEvent.hpp" 
     48 
    4649#include "vuln-asn1.hpp" 
     50 
     51 
    4752 
    4853#ifdef STDTAGS  
     
    228233{ 
    229234        logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","ASN1_SMB",m_Buffer->getSize(),m_State); 
    230         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    231 } 
     235        HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     236} 
  • nepenthes/trunk/modules/vuln-bagle/BagleDialogue.cpp

    r538 r836  
    125125                 
    126126                logCrit("Unknown Bagle Auth (%i)\n",m_Buffer->getSize()); 
    127               g_Nepenthes->getUtilities()->hexdump(l_crit | STDTAGS ,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     127//            g_Nepenthes->getUtilities()->hexdump(l_crit | STDTAGS ,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    128128                if (m_Buffer->getSize() > 128 ) 
    129129                        return CL_DROP; 
  • nepenthes/trunk/modules/vuln-dameware/DWDialogue.cpp

    r332 r836  
    4848 
    4949#include "Utilities.hpp" 
     50 
     51#include "EventManager.hpp" 
     52#include "SocketEvent.hpp" 
    5053 
    5154#ifdef STDTAGS  
     
    210213{ 
    211214        logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","DameWare",m_Buffer->getSize(),m_State); 
    212         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    213 } 
     215        HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     216} 
  • nepenthes/trunk/modules/vuln-dcom/DCOMDialogue.cpp

    r550 r836  
    4040 
    4141 
     42#include "EventManager.hpp" 
     43#include "SocketEvent.hpp" 
     44 
     45 
    4246#ifdef STDTAGS  
    4347#undef STDTAGS  
     
    235239{ 
    236240        logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","DCOM",m_Buffer->getSize(),m_State); 
    237         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    238 } 
     241        HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     242} 
  • nepenthes/trunk/modules/vuln-ftpd/vuln-ftpd.cpp

    r550 r836  
    5656#include "Utilities.hpp" 
    5757 
     58#include "EventManager.hpp" 
     59#include "SocketEvent.hpp" 
     60 
    5861#ifdef STDTAGS  
    5962        #undef STDTAGS  
     
    221224        bool buffercut=false; 
    222225 
    223       g_Nepenthes->getUtilities()->hexdump((byte *) m_Buffer->getData(),m_Buffer->getSize()); 
     226//    g_Nepenthes->getUtilities()->hexdump((byte *) m_Buffer->getData(),m_Buffer->getSize()); 
    224227        while ( i < m_Buffer->getSize() ) 
    225228        { 
     
    419422{ 
    420423        logWarn("Unknown exploit %i bytes \n",m_Shellcode->getSize()); 
    421         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Shellcode->getData(), m_Shellcode->getSize()); 
     424        HEXDUMP(m_Socket,(byte *) m_Shellcode->getData(), m_Shellcode->getSize()); 
    422425} 
    423426 
  • nepenthes/trunk/modules/vuln-iis/IISDialogue.cpp

    r332 r836  
    5050#include "Message.cpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
     54 
    5255#ifdef STDTAGS  
    5356#undef STDTAGS  
     
    8689        case IIS_SSL: 
    8790                logWarn("Unknown IIS SSL exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    88                 g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     91                HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    8992                break; 
    9093 
  • nepenthes/trunk/modules/vuln-lsass/LSASSDialogue.cpp

    r332 r836  
    4747#include "Buffer.cpp" 
    4848 
     49#include "EventManager.hpp" 
     50#include "SocketEvent.hpp" 
    4951 
    5052#ifdef STDTAGS  
     
    282284{ 
    283285        logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","LSASS",m_Buffer->getSize(),m_State); 
    284         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    285 } 
    286  
     286        HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     287} 
     288 
  • nepenthes/trunk/modules/vuln-msdtc/MSDTCDialogue.cpp

    r339 r836  
    3939#include "Utilities.hpp" 
    4040 
     41#include "EventManager.hpp" 
     42#include "SocketEvent.hpp" 
    4143 
    4244#ifdef STDTAGS  
     
    182184{ 
    183185        logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","MSDTC",m_Buffer->getSize(),m_State); 
    184         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     186        HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    185187} 
  • nepenthes/trunk/modules/vuln-msmq/MSMQDialogue.cpp

    r332 r836  
    4444#include "LogManager.hpp" 
    4545 
     46#include "EventManager.hpp" 
     47#include "SocketEvent.hpp" 
    4648 
    4749using namespace nepenthes; 
     
    7476        case MSMQ_SHELLCODE: 
    7577                logWarn("Unknown MSMQ exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    76                 g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     78                HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    7779                break; 
    7880 
  • nepenthes/trunk/modules/vuln-mssql/MSSQLDialogue.cpp

    r550 r836  
    4141 
    4242#include "Utilities.hpp" 
     43 
     44#include "EventManager.hpp" 
     45#include "SocketEvent.hpp" 
    4346 
    4447#ifdef STDTAGS  
     
    116119        else 
    117120        {       // hexdump it 
    118                 g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte*)msg->getMsg(),msg->getSize()); 
     121                HEXDUMP(m_Socket,(byte*)msg->getMsg(),msg->getSize()); 
    119122 
    120123        } 
  • nepenthes/trunk/modules/vuln-netbiosname/SMBNameDialogue.cpp

    r332 r836  
    5050#include "Utilities.hpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
    5254 
    5355#ifdef STDTAGS  
     
    147149        case SMBName_NULL: 
    148150                logWarn("Unknown SMBName exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    149 //              g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     151//              HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    150152                break; 
    151153 
  • nepenthes/trunk/modules/vuln-netdde/NETDDEDialogue.cpp

    r332 r836  
    5050#include "Utilities.hpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
    5254 
    5355#ifdef STDTAGS  
     
    202204{ 
    203205        logWarn("Unknown NETDDE exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    204         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    205 } 
     206        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     207} 
  • nepenthes/trunk/modules/vuln-optix/OPTIXShellDialogue.cpp

    r332 r836  
    108108                if (m_Buffer->getSize() >= 6) 
    109109                {        
    110                       g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     110//                    g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    111111                        // we could do this with pcre ... 
    112112                if (memcmp(m_Buffer->getData(),"019¬\r\n",6) == 0) 
  • nepenthes/trunk/modules/vuln-pnp/PNPDialogue.cpp

    r332 r836  
    4848#include "Buffer.cpp" 
    4949 
     50#include "EventManager.hpp" 
     51#include "SocketEvent.hpp" 
    5052 
    5153#ifdef STDTAGS  
     
    277279{ 
    278280                logWarn("Unknown %s Shellcode (Buffer %i bytes) (State %i)\n","PNP",m_Buffer->getSize(),m_State); 
    279                 g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    280 } 
     281                HEXDUMP(m_Socket,(byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     282} 
  • nepenthes/trunk/modules/vuln-realvnc/vuln-realvnc.cpp

    r618 r836  
    247247         
    248248                logSpam("VNC_HANDSHAKE\n"); 
    249               g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     249//            g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    250250                if (m_Buffer->getSize() >= strlen(rfb_version_003_008) &&  
    251251                        memcmp(m_Buffer->getData(),rfb_version_003_008,strlen(rfb_version_003_008)) == 0) 
     
    263263        { 
    264264        logSpam("VNC_AUTH\n"); 
    265               g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     265//            g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    266266                if (m_Buffer->getSize() >= 1 ) 
    267267                { 
     
    547547                                case 6: 
    548548                                        logSpam("ClientReq: CutEvent\n"); 
    549                                       g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
     549//                                    g_Nepenthes->getUtilities()->hexdump((byte *)m_Buffer->getData(),m_Buffer->getSize()); 
    550550                                        if (m_Buffer->getSize() >= 8 ) 
    551551                                        { 
  • nepenthes/trunk/modules/vuln-sasserftpd/SasserFTPDDialogue.cpp

    r332 r836  
    5050#include "Utilities.hpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
    5254 
    5355#ifdef STDTAGS  
     
    220222{ 
    221223        logWarn("Unknown SasserFTPD exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    222         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    223 } 
     224        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     225} 
  • nepenthes/trunk/modules/vuln-upnp/UPNPDialogue.cpp

    r332 r836  
    5050#include "Utilities.hpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
    5254 
    5355#ifdef STDTAGS  
     
    191193{ 
    192194        logWarn("Unknown UPNP exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    193         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     195        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    194196} 
  • nepenthes/trunk/modules/vuln-veritas/VERITASDialogue.cpp

    r332 r836  
    5050#include "Utilities.hpp" 
    5151 
     52#include "EventManager.hpp" 
     53#include "SocketEvent.hpp" 
    5254 
    5355#ifdef STDTAGS  
     
    99101 
    100102        logInfo("Traffic for VERITAS (%i bytes)\n",msg->getSize()); 
    101       g_Nepenthes->getUtilities()->hexdump(STDTAGS|l_warn,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     103//    g_Nepenthes->getUtilities()->hexdump(STDTAGS|l_warn,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    102104 
    103105/* 
     
    190192{ 
    191193        logWarn("Unknown VERITAS exploit %i bytes State %i\n",m_Buffer->getSize(), m_State); 
    192         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     194        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    193195} 
  • nepenthes/trunk/modules/vuln-wins/WINSDialogue.cpp

    r332 r836  
    4141 
    4242#include "Socket.hpp" 
     43 
     44#include "EventManager.hpp" 
     45#include "SocketEvent.hpp" 
    4346 
    4447#ifdef STDTAGS  
     
    124127 
    125128        logWarn("WINS unknown shellcode %i bytes State 0\n",m_Buffer->getSize()); 
    126         g_Nepenthes->getUtilities()->hexdump(STDTAGS,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
     129        HEXDUMP(m_Socket,(byte *) m_Buffer->getData(), m_Buffer->getSize()); 
    127130} 
  • nepenthes/trunk/nepenthes-core/include/DNSQuery.hpp

    r332 r836  
    5757 
    5858                virtual DNSCallback *getCallback(); 
     59                virtual void cancelCallback(); 
    5960                virtual string getDNS(); 
    6061                virtual uint16_t getQueryType(); 
  • nepenthes/trunk/nepenthes-core/include/Event.hpp

    r332 r836  
    7272#define EV_SHELLCODE_DONE               24 
    7373 
     74#define EV_HEXDUMP                              25 
     75 
    7476        class Event 
    7577    { 
  • nepenthes/trunk/nepenthes-core/include/SocketEvent.hpp

    r332 r836  
    138138        }; 
    139139 
     140#ifdef HAVE_DEBUG_LOGGING 
     141#define HEXDUMP(socket,data,size)                                                       \ 
     142{                                                                                                                       \ 
     143        HexdumpEvent *he = new HexdumpEvent(socket,data,size);  \ 
     144        g_Nepenthes->getEventMgr()->handleEvent(he);                    \ 
     145        delete he;                                                                                              \ 
     146}                                                                                                                        
     147#else   // HAVE_DEBUG_LOGGING 
     148#define HEXDUMP(socket,data,size) 
     149#endif  // HAVE_DEBUG_LOGGING 
     150 
     151 
     152 
     153        class HexdumpEvent : public Event 
     154        { 
     155        public: 
     156                HexdumpEvent(Socket *s, void *data, uint32_t size) 
     157                { 
     158                        m_EventType = EV_HEXDUMP; 
     159                        m_Socket = s; 
     160                        m_Size = size; 
     161                        m_Data = data; 
     162                } 
     163 
     164                virtual Socket *getSocket() 
     165                { 
     166                        return m_Socket; 
     167                } 
     168 
     169                virtual void *getData() 
     170                { 
     171                        return m_Data; 
     172                } 
     173 
     174                virtual uint32_t getSize() 
     175                { 
     176                        return m_Size; 
     177                } 
     178 
     179        private: 
     180                Socket          *m_Socket; 
     181                void            *m_Data; 
     182                uint32_t        m_Size; 
     183        }; 
     184 
    140185 
    141186} 
  • nepenthes/trunk/nepenthes-core/include/Utilities.hpp

    r332 r836  
    131131                void MD5Update(struct MD5Context *context, unsigned char const *buf,unsigned len); 
    132132                void MD5Final(unsigned char digest[16], struct MD5Context *context); 
    133  
     133/* 
    134134                virtual void hexdump(byte *data, uint32_t len); 
    135135                virtual void hexdump(uint32_t mask, byte *data, uint32_t len); 
    136  
     136*/ 
    137137                virtual unsigned char *b64encode_alloc(unsigned char *in); 
    138138                virtual unsigned char *b64encode_alloc(unsigned char *in, int32_t inlen); 
  • nepenthes/trunk/nepenthes-core/src/DNSQuery.cpp

    r332 r836  
    5555} 
    5656 
     57 
     58/** 
     59 * chancel the callback 
     60 */ 
     61void DNSQuery::cancelCallback() 
     62{ 
     63        m_Callback = NULL; 
     64} 
     65 
    5766/** 
    5867 * get the dns to resolve 
  • nepenthes/trunk/nepenthes-core/src/DNSResult.cpp

    r332 r836  
    9090                        { 
    9191                                m_TXT.append(test->str,test->i); 
    92                               g_Nepenthes->getUtilities()->hexdump((byte *)test->str,test->i); 
     92//                            g_Nepenthes->getUtilities()->hexdump((byte *)test->str,test->i); 
    9393                                test++; 
    9494                        } 
  • nepenthes/trunk/nepenthes-core/src/LogManager.cpp

    r675 r836  
    147147        if ( m_Loggers.size() == 0) 
    148148        { 
    149               printf("%s",message); 
     149//            printf("%s",message); 
    150150                return; 
    151151        } 
  • nepenthes/trunk/nepenthes-core/src/Utilities.cpp

    r550 r836  
    340340// ENDOF MD5Sum 
    341341 
    342  
     342/* 
    343343 
    344344void Utilities::hexdump(byte *data, uint32_t len) 
     
    431431} 
    432432 
    433  
     433*/ 
    434434 
    435435