Changeset 697

Show
Ignore:
Timestamp:
11/11/06 10:17:19 (2 years ago)
Author:
common
Message:

nepenthes

  • ((Ring)File|Console)Logger
    • include time.h (uclibc fix)
  • EventHandler?
    • include time.h (uclibc fix)
  • submit-postgres
    • fix unused vars
  • module-honeytrap
    • PCAPSocket
      • fix includes (uclibc fix)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/module-honeytrap/PCAPSocket.cpp

    r691 r697  
    2828/* $Id$ */ 
    2929 
    30  
     30#include <unistd.h> 
     31#include <time.h> 
    3132#include <sys/types.h> 
    3233#include <sys/socket.h> 
    3334#include <netinet/in.h> 
    3435#include <arpa/inet.h> 
     36#include <errno.h> 
    3537 
    3638#include "LogManager.hpp" 
     
    6567        g_ModuleHoneytrap->socketDel(this); 
    6668 
    67  
    68         bool drop_file = false; 
    69  
    70         /* the connection was never accepted */ 
    71         if ( m_TimeoutIntervall == 0 ) 
    72                 drop_file = true; 
    73  
    74         /* remove dump if there was no packet with data 
    75            the minimum of packets is 3 
    76                  [SYN] ACK SYN|ACK (RST|FIN) */ 
    77  
    78         if ( m_PacketCount < g_ModuleHoneytrap->getPcapMinPackets() ) 
    79                 drop_file = true; 
    80  
    81         if ( drop_file == true ) 
    82                 unlink(m_DumpFilePath.c_str()); 
     69        if ( m_DumpFilePath != "" ) 
     70        { 
     71 
     72                bool drop_file = false; 
     73 
     74                /* the connection was never accepted */ 
     75                if ( m_TimeoutIntervall != 0 ) 
     76                        drop_file = true; 
     77 
     78                /* remove dump if there was no packet with data 
     79                   the minimum of packets is 3 
     80                         [SYN] ACK SYN|ACK (RST|FIN) */ 
     81 
     82                if ( m_PacketCount < g_ModuleHoneytrap->getPcapMinPackets() ) 
     83                        drop_file = true; 
     84 
     85                if ( drop_file == true ) 
     86                        if (unlink(m_DumpFilePath.c_str()) != 0) 
     87                                logWarn("Could not unlink file %s '%s'\n",m_DumpFilePath.c_str(),strerror(errno)); 
     88        } 
    8389#endif // HAVE_PCAP 
    8490} 
  • nepenthes/trunk/modules/submit-postgres/submit-postgres.cpp

    r667 r697  
    298298        vector< map<string,string> > resvec = *result->getResult(); 
    299299 
    300  
     300/* 
    301301        vector< map<string,string> >::iterator it = resvec.begin(); 
    302302        map<string,string>::iterator jt; 
    303303 
    304 /* 
     304 
    305305        //      this is my reply debugger  
    306306         
  • nepenthes/trunk/nepenthes-core/src/ConsoleLogger.cpp

    r375 r697  
    3434#include "LogManager.hpp" 
    3535 
    36 #ifdef WIN32 
    3736#include <time.h> 
    38 #endif 
    3937 
    4038using namespace nepenthes; 
  • nepenthes/trunk/nepenthes-core/src/EventHandler.cpp

    r332 r697  
    3030#include "Event.hpp" 
    3131#include "EventHandler.hpp" 
     32#include <time.h> 
     33 
    3234 
    3335using namespace nepenthes; 
  • nepenthes/trunk/nepenthes-core/src/FileLogger.cpp

    r664 r697  
    2828/* $Id$ */ 
    2929 
    30 #ifdef WIN32 
    3130#include <time.h> 
    32 #endif 
    3331 
    3432 
  • nepenthes/trunk/nepenthes-core/src/RingFileLogger.cpp

    r664 r697  
    2828/* $Id$ */ 
    2929 
    30 #ifdef WIN32 
    3130#include <time.h> 
    32 #endif 
    3331 
    3432#include <sys/types.h>