From c0bc0b3a444959dd05c3dc9b76a9808a5a4cb337 Mon Sep 17 00:00:00 2001 From: etmatrix Date: Mon, 1 Nov 2021 10:56:02 +0100 Subject: [PATCH] update to version 2.32.0 now it's require library libnetfilter_queue --- root-packages/bettercap/build.sh | 6 +- root-packages/bettercap/fix-home-path.patch | 62 +++++++++++---------- root-packages/bettercap/fix-paths.patch | 26 +++++---- 3 files changed, 49 insertions(+), 45 deletions(-) diff --git a/root-packages/bettercap/build.sh b/root-packages/bettercap/build.sh index 5d6e88c5d..9655402ac 100644 --- a/root-packages/bettercap/build.sh +++ b/root-packages/bettercap/build.sh @@ -2,11 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://www.bettercap.org TERMUX_PKG_DESCRIPTION="The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=2.29 +TERMUX_PKG_VERSION=2.32.0 TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/bettercap/bettercap/archive/v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=c414be98a48d9f279460b325dddaef8479132a1470c6f305790d79e04dac1297 -TERMUX_PKG_DEPENDS="libpcap, libusb" +TERMUX_PKG_SHA256=ea28d4d533776a328a54723a74101d1720016ffe7d434bf1d7ab222adb397ac6 +TERMUX_PKG_DEPENDS="libpcap, libusb, libnetfilter_queue" # x86_64 seem to depend on libnetfilter_queue TERMUX_PKG_BLACKLISTED_ARCHES="x86_64" diff --git a/root-packages/bettercap/fix-home-path.patch b/root-packages/bettercap/fix-home-path.patch index 097453198..306e7e9e2 100644 --- a/root-packages/bettercap/fix-home-path.patch +++ b/root-packages/bettercap/fix-home-path.patch @@ -1,36 +1,38 @@ -diff -u -r ../modules.orig/https_proxy/https_proxy.go ./modules/https_proxy/https_proxy.go ---- ../modules.orig/https_proxy/https_proxy.go 2019-07-19 21:29:31.672237775 +0200 -+++ ./modules/https_proxy/https_proxy.go 2019-07-19 21:26:42.776456311 +0200 -@@ -43,12 +43,12 @@ - "URL, path or javascript code to inject into every HTML page.")) +diff --git a/modules/https_proxy/https_proxy.go b/modules/https_proxy/https_proxy.go +index 06bc1e0..127bb39 100644 +--- a/modules/https_proxy/https_proxy.go ++++ b/modules/https_proxy/https_proxy.go +@@ -47,12 +47,12 @@ func NewHttpsProxy(s *session.Session) *HttpsProxy { + "URL, path or javascript code to inject into every HTML page.")) - mod.AddParam(session.NewStringParameter("https.proxy.certificate", -- "~/.bettercap-ca.cert.pem", -+ "@TERMUX_HOME@/.bettercap-ca.cert.pem", - "", - "HTTPS proxy certification authority TLS certificate file.")) + mod.AddParam(session.NewStringParameter("https.proxy.certificate", +- "~/.bettercap-ca.cert.pem", ++ "@TERMUX_HOME@/.bettercap-ca.cert.pem", + "", + "HTTPS proxy certification authority TLS certificate file.")) - mod.AddParam(session.NewStringParameter("https.proxy.key", -- "~/.bettercap-ca.key.pem", -+ "@TERMUX_HOME@/.bettercap-ca.key.pem", - "", - "HTTPS proxy certification authority TLS key file.")) + mod.AddParam(session.NewStringParameter("https.proxy.key", +- "~/.bettercap-ca.key.pem", ++ "@TERMUX_HOME@/.bettercap-ca.key.pem", + "", + "HTTPS proxy certification authority TLS key file.")) -diff -u -r ../modules.orig/https_server/https_server.go ./modules/https_server/https_server.go ---- ../modules.orig/https_server/https_server.go 2019-07-19 21:29:41.980474175 +0200 -+++ ./modules/https_server/https_server.go 2019-07-19 21:28:13.267671735 +0200 -@@ -42,12 +42,12 @@ - "Port to bind the http server to.")) +diff --git a/modules/https_server/https_server.go b/modules/https_server/https_server.go +index 0d9ff80..3e49996 100644 +--- a/modules/https_server/https_server.go ++++ b/modules/https_server/https_server.go +@@ -42,12 +42,12 @@ func NewHttpsServer(s *session.Session) *HttpsServer { + "Port to bind the http server to.")) - mod.AddParam(session.NewStringParameter("https.server.certificate", -- "~/.bettercap-httpd.cert.pem", -+ "@TERMUX_HOME@/.bettercap-httpd.cert.pem", - "", - "TLS certificate file (will be auto generated if filled but not existing).")) + mod.AddParam(session.NewStringParameter("https.server.certificate", +- "~/.bettercap-httpd.cert.pem", ++ "@TERMUX_HOME@/.bettercap-httpd.cert.pem", + "", + "TLS certificate file (will be auto generated if filled but not existing).")) - mod.AddParam(session.NewStringParameter("https.server.key", -- "~/.bettercap-httpd.key.pem", -+ "@TERMUX_HOME@/.bettercap-httpd.key.pem", - "", - "TLS key file (will be auto generated if filled but not existing).")) + mod.AddParam(session.NewStringParameter("https.server.key", +- "~/.bettercap-httpd.key.pem", ++ "@TERMUX_HOME@/.bettercap-httpd.key.pem", + "", + "TLS key file (will be auto generated if filled but not existing).")) diff --git a/root-packages/bettercap/fix-paths.patch b/root-packages/bettercap/fix-paths.patch index 49a6fc94a..372c6a91f 100644 --- a/root-packages/bettercap/fix-paths.patch +++ b/root-packages/bettercap/fix-paths.patch @@ -1,24 +1,26 @@ ---- ./caplets/env.go.orig 2019-10-03 21:17:37.044291360 +0200 -+++ ./caplets/env.go 2019-10-03 21:18:21.894201252 +0200 -@@ -19,7 +19,7 @@ +diff --git a/caplets/env.go b/caplets/env.go +index 9ba8706..fd12078 100644 +--- a/caplets/env.go ++++ b/caplets/env.go +@@ -19,7 +19,7 @@ func getDefaultInstallBase() string { if runtime.GOOS == "windows" { return filepath.Join(os.Getenv("ALLUSERSPROFILE"), "bettercap") } - return "/usr/local/share/bettercap/" -+ return "@TERMUX_PREFIX@/local/share/bettercap/" ++ return "@TERMUX_PREFIX@/share/bettercap/" } func getUserHomeDir() string { diff --git a/modules/ui/ui.go b/modules/ui/ui.go -index f5d6950..4059c6c 100644 +index 7bc5270..9a5476a 100644 --- a/modules/ui/ui.go +++ b/modules/ui/ui.go -@@ -36,7 +36,7 @@ func NewUIModule(s *session.Session) *UIModule { +@@ -34,7 +34,7 @@ func getDefaultInstallBase() string { + if runtime.GOOS == "windows" { + return filepath.Join(os.Getenv("ALLUSERSPROFILE"), "bettercap") } +- return "/usr/local/share/bettercap/" ++ return "@TERMUX_PREFIX@/share/bettercap/" + } - mod.AddParam(session.NewStringParameter("ui.basepath", -- "/usr/local/share/bettercap/", -+ "@TERMUX_PREFIX@/local/share/bettercap/", - "", - "UI base installation path.")) - + func NewUIModule(s *session.Session) *UIModule {