ettercap: add package

This commit is contained in:
Henrik Grimler 2019-08-27 20:42:37 +02:00 committed by Yaksh Bariya
parent 83ffd6d700
commit c1e7c2a10b
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
7 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- ../CMakeLists.txt.orig 2019-08-27 20:30:33.670343601 +0200
+++ ./CMakeLists.txt 2019-08-27 20:29:32.497096038 +0200
@@ -107,7 +107,7 @@
include(EttercapVariableCheck)
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix")
-set(INSTALL_SYSCONFDIR /etc CACHE PATH "System configuration directory")
+set(INSTALL_SYSCONFDIR @TERMUX_PREFIX@/etc CACHE PATH "System configuration directory")
set(INSTALL_LIBDIR ${INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "Library installation directory")
set(INSTALL_DATADIR ${INSTALL_PREFIX}/share CACHE PATH "Data installation directory")
set(INSTALL_EXECPREFIX ${INSTALL_PREFIX} CACHE PATH "")

View File

@ -0,0 +1,15 @@
--- ../EttercapLibCheck.cmake.orig 2019-08-27 19:47:07.065638380 +0200
+++ ./cmake/Modules/EttercapLibCheck.cmake 2019-08-27 19:48:04.867210840 +0200
@@ -261,10 +261,8 @@
set(EC_LIBS ${EC_LIBS} ${HAVE_RESOLV})
set(HAVE_DN_EXPAND 1 CACHE PATH "Found dn_expand")
else()
- if(OS_BSD)
- # FreeBSD has dn_expand built in libc
- check_function_exists(dn_expand HAVE_DN_EXPAND)
- endif()
+ # FreeBSD and Android has dn_expand built in libc
+ check_function_exists(dn_expand HAVE_DN_EXPAND)
endif()
find_package(PCRE)

View File

@ -0,0 +1,10 @@
--- ../EttercapOSTest.cmake.orig 2019-08-27 19:01:04.600920329 +0200
+++ ./cmake/Modules/EttercapOSTest.cmake 2019-08-27 19:57:48.826678789 +0200
@@ -1,5 +1,7 @@
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(OS_LINUX 1)
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
+ set(OS_LINUX 1)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(OS_BSD 1)
set(OS_BSD_FREE 1)

View File

@ -0,0 +1,12 @@
TERMUX_PKG_HOMEPAGE=https://www.ettercap-project.org
TERMUX_PKG_DESCRIPTION="Comprehensive suite for MITM attacks, can sniff live connections, do content filtering on the fly and much more"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.8.3
TERMUX_PKG_SRCURL=https://github.com/Ettercap/ettercap/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d561a554562e447f4d7387a9878ba745e1aa8c4690cc4e9faaa779cfdaa61fbb
TERMUX_PKG_DEPENDS="libpcap, openssl, zlib, curl, pcre, ncurses, libiconv, libnet, libltdl, ethtool"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DCMAKE_BUILD_TYPE=Release
-DENABLE_GTK=off
-DENABLE_GEOIP=off
"

View File

@ -0,0 +1,34 @@
--- ../ec_threads.c.orig 2019-08-27 20:09:25.304142288 +0200
+++ ./src/ec_threads.c 2019-08-27 20:14:11.753262944 +0200
@@ -233,13 +233,6 @@
DEBUG_MSG("ec_thread_init -- %lu", PTHREAD_ID(id));
INIT_LOCK;
-
- /*
- * allow a thread to be cancelled as soon as the
- * cancellation request is received
- */
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
/* sync with the creator */
if ((e = pthread_cond_signal(&init_cond)))
@@ -263,7 +256,7 @@
/* send the cancel signal to the thread */
- pthread_cancel((pthread_t)id);
+ pthread_kill((pthread_t)id, 0);
DEBUG_MSG("ec_thread_destroy -- [%s] terminated", ec_thread_getname(id));
@@ -319,7 +312,7 @@
DEBUG_MSG("ec_thread_kill_all -- terminating %lu [%s]", PTHREAD_ID(current->t.id), current->t.name);
/* send the cancel signal to the thread */
- pthread_cancel((pthread_t)current->t.id);
+ pthread_kill((pthread_t)current->t.id, 0);
#ifndef BROKEN_PTHREAD_JOIN
if (!current->t.detached) {

View File

@ -0,0 +1,11 @@
--- ../ec_threads.h.orig 2019-08-27 20:14:48.025423828 +0200
+++ ./include/ec_threads.h 2019-08-27 20:18:58.102432737 +0200
@@ -33,7 +33,7 @@
#define RETURN_IF_NOT_MAIN() do{ if (strcmp(ec_thread_getname(EC_PTHREAD_SELF), EC_GBL_PROGRAM)) return; }while(0)
-#define CANCELLATION_POINT() pthread_testcancel()
+#define CANCELLATION_POINT()
#if defined(OS_DARWIN) || defined(OS_WINDOWS) || defined(OS_CYGWIN)
/* XXX - darwin and windows are broken, pthread_join hangs up forever */

View File

@ -0,0 +1,21 @@
--- ../ec_ui.c.orig 2019-08-27 20:07:21.158532026 +0200
+++ ./src/ec_ui.c 2019-08-27 20:07:36.117841510 +0200
@@ -256,9 +256,6 @@
if (STAILQ_EMPTY(&messages_queue))
return 0;
- // don't allow the thread to cancel while holding the ui mutex
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old);
-
/* the queue is updated by other threads */
UI_MSG_LOCK;
@@ -280,8 +277,6 @@
UI_MSG_UNLOCK;
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old);
-
/* returns the number of displayed messages */
return i;