Changeset 1536

Show
Ignore:
Timestamp:
01/23/08 22:15:12 (7 months ago)
Author:
till
Message:

honeytrap
- local/remote socket endpoint confusions corrected

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeytrap/trunk/src/attack.c

    r1490 r1536  
    3636 
    3737 
    38 Attack *new_virtattack(struct in_addr l_addr, struct in_addr r_addr, uint16_t l_port, uint16_t r_port, uint16_t proto) { 
     38Attack *new_virtattack(struct in_addr r_addr, struct in_addr l_addr, uint16_t r_port, uint16_t l_port, uint16_t proto) { 
    3939        Attack *a; 
    4040 
    41         if ((a = new_attack(l_addr, r_addr, l_port, r_port, proto)) == NULL) return(NULL); 
     41        if ((a = new_attack(r_addr, l_addr, r_port, l_port, proto)) == NULL) return(NULL); 
    4242 
    4343        a->virtual = 1; 
     
    4747 
    4848 
    49 Attack *new_attack(struct in_addr l_addr, struct in_addr r_addr, uint16_t l_port, uint16_t r_port, uint16_t proto) { 
     49Attack *new_attack(struct in_addr r_addr, struct in_addr l_addr, uint16_t r_port, uint16_t l_port, uint16_t proto) { 
    5050        Attack *a; 
    5151 
     
    102102 
    103103        if (!a_size) { 
    104                 addr = (struct in_addr *) &(a->a_conn.l_addr); 
     104                addr = (struct in_addr *) &(a->a_conn.r_addr); 
    105105                logmsg(LOG_NOTICE, 1, " * %u/%s\t  No bytes received from %s:%u.\n", 
    106106                        (uint16_t) a->a_conn.l_port, PROTO(a->a_conn.protocol), 
    107107                        inet_ntoa(*addr), a->a_conn.r_port); 
    108108        } else { 
    109                 addr = (struct in_addr *) &(a->a_conn.l_addr); 
     109                addr = (struct in_addr *) &(a->a_conn.r_addr); 
    110110                logmsg(LOG_NOTICE, 1, " * %u/%s\t  %d bytes attack string from %s:%u.\n", 
    111111                        (uint16_t) a->a_conn.l_port, PROTO(a->a_conn.protocol), a_size, 
  • honeytrap/trunk/src/dynsrv.c

    r1490 r1536  
    291291 
    292292                                        /* initialize attack record */ 
    293                                         if ((attack = new_attack(cliaddr.sin_addr, srvaddr.sin_addr, ntohs(srvaddr.sin_port), 0, proto)) == NULL) { 
     293                                        if ((attack = new_attack(cliaddr.sin_addr, srvaddr.sin_addr, 0, ntohs(srvaddr.sin_port), proto)) == NULL) { 
    294294                                                logmsg(LOG_ERR, 1, "Error - Could not initialize attack record.\n"); 
    295295                                                free(attack);