new package: ipv6toolkit
This commit is contained in:
parent
532e999b74
commit
a2a95a2139
31
packages/ipv6toolkit/GNUmakefile.patch
Normal file
31
packages/ipv6toolkit/GNUmakefile.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- a/GNUmakefile
|
||||
+++ b/GNUmakefile
|
||||
@@ -18,7 +18,7 @@
|
||||
# typically employed by package developers.
|
||||
|
||||
|
||||
-CC= gcc
|
||||
+CC?= gcc
|
||||
CFLAGS+= -Wall -Wno-address-of-packed-member -Wno-missing-braces
|
||||
LDFLAGS+= -lpcap -lm
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
endif
|
||||
else
|
||||
ifndef MANPREFIX
|
||||
- MANPREFIX=/usr/share
|
||||
+ MANPREFIX=$(PREFIX)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
-ETCPATH= $(DESTDIR)/etc
|
||||
+ETCPATH= $(DESTDIR)$(PREFIX)/etc
|
||||
MANPATH= $(DESTDIR)$(MANPREFIX)/man
|
||||
DATAPATH= $(DESTDIR)$(PREFIX)/share/ipv6toolkit
|
||||
BINPATH= $(DESTDIR)$(PREFIX)/bin
|
||||
-SBINPATH= $(DESTDIR)$(PREFIX)/sbin
|
||||
+SBINPATH= $(DESTDIR)$(PREFIX)/bin
|
||||
SRCPATH= tools
|
||||
|
||||
|
28
packages/ipv6toolkit/build.sh
Normal file
28
packages/ipv6toolkit/build.sh
Normal file
@ -0,0 +1,28 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.si6networks.com/research/tools/ipv6toolkit/
|
||||
TERMUX_PKG_DESCRIPTION="SI6 Networks IPv6 Toolkit"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=babee5e172f680ff18354d9d9918c3f7356d48d3
|
||||
TERMUX_PKG_VERSION=2021.03.30
|
||||
TERMUX_PKG_SRCURL=https://github.com/fgont/ipv6toolkit.git
|
||||
TERMUX_PKG_GIT_BRANCH=master
|
||||
TERMUX_PKG_DEPENDS="libpcap"
|
||||
TERMUX_PKG_RECOMMENDS="curl, perl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX"
|
||||
|
||||
termux_step_post_get_source() {
|
||||
git fetch --unshallow
|
||||
git checkout $_COMMIT
|
||||
|
||||
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
|
||||
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
|
||||
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
|
||||
echo " is different from what is expected to be: \"$version\""
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
rm -f Makefile
|
||||
}
|
37
packages/ipv6toolkit/tools-libipv6.h.patch
Normal file
37
packages/ipv6toolkit/tools-libipv6.h.patch
Normal file
@ -0,0 +1,37 @@
|
||||
--- a/tools/libipv6.h
|
||||
+++ b/tools/libipv6.h
|
||||
@@ -721,6 +721,8 @@
|
||||
#include <netinet/icmp6.h>
|
||||
#endif
|
||||
|
||||
+ #ifndef __ANDROID__
|
||||
+
|
||||
#define ICMP6_NI_QUERY 139 /* node information request */
|
||||
#define ICMP6_NI_REPLY 140 /* node information reply */
|
||||
/*
|
||||
@@ -747,12 +749,16 @@
|
||||
/* could be followed by reply data */
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
+ #endif /* __ANDROID__ */
|
||||
+
|
||||
#define ni_type icmp6_ni_hdr.icmp6_type
|
||||
#define ni_code icmp6_ni_hdr.icmp6_code
|
||||
#define ni_cksum icmp6_ni_hdr.icmp6_cksum
|
||||
#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
|
||||
#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
|
||||
|
||||
+ #ifndef __ANDROID__
|
||||
+
|
||||
#define NI_QTYPE_NOOP 0 /* NOOP */
|
||||
#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
|
||||
#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
|
||||
@@ -792,6 +798,8 @@
|
||||
uint8_t ni_fqdn_name[3]; /* XXX: alignment */
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
+ #endif /* __ANDROID__ */
|
||||
+
|
||||
#endif
|
||||
|
||||
|
28
packages/ipv6toolkit/tools-scan6.c.patch
Normal file
28
packages/ipv6toolkit/tools-scan6.c.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/tools/scan6.c
|
||||
+++ b/tools/scan6.c
|
||||
@@ -1604,7 +1604,7 @@
|
||||
|
||||
|
||||
if(!configfile_f){
|
||||
- strncpy(configfile, "/etc/ipv6toolkit.conf", MAX_FILENAME_SIZE);
|
||||
+ strncpy(configfile, "@TERMUX_PREFIX@/etc/ipv6toolkit.conf", MAX_FILENAME_SIZE);
|
||||
}
|
||||
|
||||
if(tgt_vendor_f || portscan_f){
|
||||
@@ -5854,13 +5854,13 @@
|
||||
fclose(fp);
|
||||
|
||||
if(!fname_f)
|
||||
- strncpy(fname, "/usr/local/share/ipv6toolkit/oui.txt", MAX_FILENAME_SIZE-1);
|
||||
+ strncpy(fname, "@TERMUX_PREFIX@/share/ipv6toolkit/oui.txt", MAX_FILENAME_SIZE-1);
|
||||
|
||||
if(!portsfname_f)
|
||||
- strncpy(portsfname, "/usr/local/share/ipv6toolkit/service-names-port-numbers.csv", MAX_FILENAME_SIZE-1);
|
||||
+ strncpy(portsfname, "@TERMUX_PREFIX@/share/ipv6toolkit/service-names-port-numbers.csv", MAX_FILENAME_SIZE-1);
|
||||
|
||||
if(!topportsfname_f)
|
||||
- strncpy(topportsfname, "/usr/local/share/ipv6toolkit/top-port-numbers.csv", MAX_FILENAME_SIZE-1);
|
||||
+ strncpy(topportsfname, "@TERMUX_PREFIX@/share/ipv6toolkit/top-port-numbers.csv", MAX_FILENAME_SIZE-1);
|
||||
|
||||
return(1);
|
||||
}
|
29
packages/ipv6toolkit/tools-script6.patch
Normal file
29
packages/ipv6toolkit/tools-script6.patch
Normal file
@ -0,0 +1,29 @@
|
||||
--- a/tools/script6
|
||||
+++ b/tools/script6
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
|
||||
sub ParseConfigFile{
|
||||
- $configfile="/etc/ipv6toolkit.conf";
|
||||
+ $configfile="@TERMUX_PREFIX@/etc/ipv6toolkit.conf";
|
||||
|
||||
open FILE, "$configfile" or die $!;
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
$wwwclient_hdr=" -S --max-redirect 0 -q --timeout=10 ";
|
||||
}
|
||||
elsif($wwwclient=~ m/^\s*$/){
|
||||
- print "ERROR: 'WWW-client' option not set in configuration file (/etc/ipv6toolkit.conf).\n";
|
||||
+ print "ERROR: 'WWW-client' option not set in configuration file (@TERMUX_PREFIX@/etc/ipv6toolkit.conf).\n";
|
||||
exit(1);
|
||||
}
|
||||
else{
|
||||
@@ -7586,7 +7586,7 @@
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq "get-dns6-rev-batch" || $ARGV[0] eq "get-dns6-rev-batch"){
|
||||
- $resolverfile="/etc/resolv.conf";
|
||||
+ $resolverfile="@TERMUX_PREFIX@/etc/resolv.conf";
|
||||
|
||||
if($#ARGV == 0){
|
||||
open FILE, "$resolverfile" or die $!;
|
Loading…
Reference in New Issue
Block a user