From 00ba65b25420b9b45cbb84b9ef17ebb6580783b0 Mon Sep 17 00:00:00 2001 From: infosecconsultant <48705722+infosecconsultant@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:23:07 +1100 Subject: [PATCH 1/2] Update INSTALL --- INSTALL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 5a31810..60183bb 100644 --- a/INSTALL +++ b/INSTALL @@ -23,8 +23,9 @@ If the sources have been obtained from the CVS/SVN repository you will need the autotools and automake packages. Autoconf must be at least version 2.52 and automake must be at least version 1.6. -To install Yersinia: +To install Yersinia on Kali Linux 2024 'Everything' install: +sudo apt update && sudo apt upgrade && sudo apt install autoconf automake autotools-dev libnet1-dev libgtk2.0-dev libpcap-dev ./autogen.sh ./configure make From 2f5ee698cf98f3ee3667880c5827ca6acc0fd3f3 Mon Sep 17 00:00:00 2001 From: infosecconsultant <48705722+infosecconsultant@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:24:53 +1100 Subject: [PATCH 2/2] Update admin.c For pthread_create in line 235 Use (void *)(intptr_t) to cast the integer sock2 to a pointer For term_add_node in line 333 Cast sock from void * back to int32_t using (int32_t)(intptr_t) For admin_th_network_peer_exit in lines 339, 349, 380, and 387 Cast sock from void * to int using (int)(intptr_t) --- src/admin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/admin.c b/src/admin.c index d007b22..5052897 100644 --- a/src/admin.c +++ b/src/admin.c @@ -232,7 +232,7 @@ admin_th_listen(void *arg) else { write_log(0,"\n Connection accepted for %s\n", inet_ntoa(*ip_addr)); - if ( pthread_create( &tid, NULL, &admin_th_network_peer, (void *)sock2 ) < 0) + if (pthread_create(&tid, NULL, &admin_th_network_peer, (void *)(intptr_t)sock2) < 0) { n=errno; thread_error("pthread_create admin_th_listen",n); @@ -330,13 +330,13 @@ admin_th_network_peer(void *sock) if (pthread_mutex_lock(&terms->mutex) != 0) thread_error("th_network_peer pthread_mutex_lock",errno); - fail = term_add_node(&term_node, TERM_VTY, sock, pthread_self()); + fail = term_add_node(&term_node, TERM_VTY, (int32_t)(intptr_t)sock, pthread_self()); if (fail == -1) { if (pthread_mutex_unlock(&terms->mutex) != 0) thread_error("th_network_peer pthread_mutex_unlock",errno); - admin_th_network_peer_exit(term_node, sock); + admin_th_network_peer_exit(term_node, (int)(intptr_t)sock); } if (term_node == NULL) @@ -346,7 +346,7 @@ admin_th_network_peer(void *sock) if (pthread_mutex_unlock(&terms->mutex) != 0) thread_error("th_network_peer pthread_mutex_unlock",errno); - admin_th_network_peer_exit(term_node, sock); + admin_th_network_peer_exit(term_node, (int)(intptr_t)sock); } pthread_mutex_lock(&term_node->thread.finished); @@ -377,14 +377,14 @@ admin_th_network_peer(void *sock) thread_error("getpeername",errno); if (pthread_mutex_unlock(&terms->mutex) != 0) thread_error("th_vty_peer pthread_mutex_unlock",errno); - admin_th_network_peer_exit(term_node, sock); + admin_th_network_peer_exit(term_node, (int)(intptr_t)sock); } if (init_attribs(term_node) < 0) { if (pthread_mutex_unlock(&terms->mutex) != 0) thread_error("th_vty_peer pthread_mutex_unlock",errno); - admin_th_network_peer_exit(term_node, sock); + admin_th_network_peer_exit(term_node, (int)(intptr_t)sock); } term_node->from_port = ntohs(name.sin_port);