diff --git a/root-packages/tshark/build.sh b/root-packages/tshark/build.sh new file mode 100644 index 000000000..0be2e63dc --- /dev/null +++ b/root-packages/tshark/build.sh @@ -0,0 +1,14 @@ +TERMUX_PKG_HOMEPAGE=https://www.aircrack-ng.org +TERMUX_PKG_DESCRIPTION="network protocol analyzer and sniffer" +TERMUX_PKG_VERSION=2.4.2 +TERMUX_PKG_SRCURL=https://github.com/wireshark/wireshark/archive/wireshark-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=b9b60b3a23e2f24f0f9a75d67364b8eef649960c9d1926697739825a3a7a9861 +TERMUX_PKG_MAINTAINER="Auxilus @Auxilus" +TERMUX_PKG_DEPENDS="libnl, openssl, libpcap, libpcap-dev, libcrypt, libgcrypt-dev, glib" +# As GUI is not supported by termux we need to disable wireshark +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-qt=no --disable-wireshark" + +termux_step_pre_configure () { + ./autogen.sh + LDFLAGS+=" -L$TERMUX_PKG_BUILDDIR/wsutil/.libs -L$TERMUX_PKG_BUILDDIR/epan/.libs" #A bit hacky.. +} diff --git a/root-packages/tshark/caputils-ws80211.c.patch b/root-packages/tshark/caputils-ws80211.c.patch new file mode 100644 index 000000000..257cfbaba --- /dev/null +++ b/root-packages/tshark/caputils-ws80211.c.patch @@ -0,0 +1,11 @@ +--- ./caputils/ws80211_utils.c 2017-10-10 17:50:57.000000000 +0000 ++++ ../ws80211_utils.c 2017-10-18 08:19:26.903580180 +0000 +@@ -671,7 +671,7 @@ + + /* Update names of user created monitor interfaces */ + while(fgets(line, sizeof(line), fh)) { +- t = index(line, ':'); ++ t = strchr(line, ':'); + if (!t) + continue; + *t = 0; diff --git a/root-packages/tshark/epan-dissectors-packet-gtp.c.patch b/root-packages/tshark/epan-dissectors-packet-gtp.c.patch new file mode 100644 index 000000000..11dc7fd84 --- /dev/null +++ b/root-packages/tshark/epan-dissectors-packet-gtp.c.patch @@ -0,0 +1,11 @@ +--- ./epan/dissectors/packet-gtp.c 2017-10-10 17:50:57.000000000 +0000 ++++ ../packet-gtp.c 2017-10-18 14:55:54.098432467 +0000 +@@ -2364,7 +2364,7 @@ + /* Next definitions and function check_field_presence checks if given field + * in GTP packet is compliant with ETSI + */ +-typedef struct _header { ++typedef struct _hehethaerhyaader { + guint8 code; + guint8 presence; + } ext_header; diff --git a/root-packages/tshark/plugins-Makefile.am.inc.patch b/root-packages/tshark/plugins-Makefile.am.inc.patch new file mode 100644 index 000000000..5252635e0 --- /dev/null +++ b/root-packages/tshark/plugins-Makefile.am.inc.patch @@ -0,0 +1,11 @@ +--- ./plugins/Makefile.am.inc 2017-10-10 17:50:57.000000000 +0000 ++++ Makefile.am.inc 2017-10-18 13:00:13.821739287 +0000 +@@ -26,7 +26,7 @@ + + PLUGIN_CFLAGS = + +-PLUGIN_LDFLAGS = -module -avoid-version ++PLUGIN_LDFLAGS = -module -avoid-version -lwireshark -lglib-2.0 -lwsutil + + # + # Source files are divided up along several axes: