Changeset 1584

Show
Ignore:
Timestamp:
02/29/08 21:03:09 (6 months ago)
Author:
till
Message:

nebula
- more useful logging

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nebula/trunk/ChangeLog

    r1581 r1584  
    33- off-by-one error in signature generator input offset fixed 
    44- signature generation triggers when cluster threshold is met instead of exceeded 
     5- flush stdout after each session 
     6- clean up on SIGKILL 
    570.2.0 
    68- daemon version 
  • nebula/trunk/src/classify.c

    r1582 r1584  
    6464        u_char          *tmpbuf; 
    6565        qelem           *cur_cqelem, *tmp_cqelem, *cur_hqelem, *tmp_hqelem; 
    66         double          score
     66        double          score, max_score
    6767        pthread_t       ntid; 
    6868        pthread_attr_t  ptattr; 
    6969 
    70         tmpbuf  = NULL; 
     70        tmpbuf          = NULL; 
     71        max_score       = 0.0; 
    7172 
    7273        if (!s) { 
     
    111112                        exit(EXIT_FAILURE); 
    112113                } 
    113                 if (verbose) printf("    MD5 hash is %s (%u instances)\n", ((hash*)t->data)->md5sum, ((hash*)t->data)->cnt); 
     114                if (verbose > 1) printf("    MD5 hash is %s (%u instances)\n", ((hash*)t->data)->md5sum, ((hash*)t->data)->cnt); 
    114115 
    115116 
     
    130131                                                break; 
    131132                                        } 
    132                                 } 
     133                                } else if (score > max_score) max_score = score; 
    133134                        } 
    134135                } 
     
    190191                                        if (verbose) printf("    New Cluster created.\n"); 
    191192                                } 
    192                         } 
     193                        } else if (score > max_score) max_score = score; 
    193194                        if (!cur_hqelem) break; 
    194195                } 
     
    218219                        queue_ins(outlierq, t->data, outlierq_max); 
    219220 
    220                         if (verbose) printf("    Input added to outlier queue (queue size: %lu).\n", outlierq->size); 
     221                        if (verbose) printf("    Input added to outlier queue (maximum score: %1f, outlier queue size: %lu).\n", 
     222                                max_score, outlierq->size); 
    221223                } 
    222224        } 
  • nebula/trunk/src/session.c

    r1583 r1584  
    202202                                // increase instance counter 
    203203                                ((hash*)t->data)->cnt++; 
    204                                 if (verbose > 1) printf("    MD5 hash is %s (%u instances)\n", ((hash*)t->data)->md5sum, ((hash*)t->data)->cnt); 
    205  
    206                                 if (verbose) printf("[x] Absolute MD5 match found, Rejecting known attack\n"); 
     204                                if (verbose > 2) printf("    MD5 hash is %s (%u instances)\n", ((hash*)t->data)->md5sum, ((hash*)t->data)->cnt); 
     205 
     206                                if (verbose > 2) printf("[x] Absolute MD5 match found, Rejecting known attack\n"); 
    207207                                fflush(stdout); 
    208208                                return(0);