summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD55
-rw-r--r--nemesis-proto_tcp.c.diff46
3 files changed, 31 insertions, 92 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4bb76d06fcb..19db70e8667 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,17 @@
+# Generated by mksrcinfo(replacement shim) v8
+# Sun May 16 09:41:34 PM EDT 2021
pkgbase = nemesis
pkgdesc = command-line network packet crafting and injection utility
- pkgver = 1.4
- pkgrel = 6
- url = http://nemesis.sourceforge.net/
+ pkgver = 1.7
+ pkgrel = 1
+ url = https://github.com/libnet/nemesis
+ arch = i686
arch = x86_64
license = BSD
- source = https://downloads.sourceforge.net/sourceforge/nemesis/nemesis-1.4.tar.gz
- source = https://downloads.sourceforge.net/sourceforge/nemesis/nemesis-1.4.tar.gz.asc
- source = https://arch.p5n.pp.ru/~sergej/dl/2016/libnet-1.0.2a.tar.gz
- source = nemesis-proto_tcp.c.diff
- validpgpkeys = 3CA3CBFF30506B07F036E57712AAFCF86923D3FD
- sha256sums = 803f5cf5c7c4af15128b8cd7f7610730cbed1427f062a31c2f5255790fb1bab4
- sha256sums = SKIP
- sha256sums = 7c7f2e8ccb47bb47072c5cd583fea5e90ab892c75889b625346b60d10464459a
- sha256sums = 47adbf39b5a5e351bc6b0eebaf89d98bb7ad3ab359c04391b782998053ae067d
+ makedepends = autoconf
+ depends = libnet
+ source = nemesis-1.7.tar.gz::https://github.com/libnet/nemesis/archive/v1.7.tar.gz
+ sha256sums = 87d96dcc3d2d0e0b2966ac2cb59a26ae426425ebc7e02720bc56a1849a384f50
pkgname = nemesis
diff --git a/PKGBUILD b/PKGBUILD
index 741bff0e965..9f53e5399df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,30 @@
-# $Id: PKGBUILD 266875 2017-11-15 14:29:11Z foutrelis $
-# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: GI_Jack <GI_Jack@hackermail.com>
+# Contrib: Marsoft <marsoft@ya.ru>
pkgname=nemesis
-pkgver=1.4
-pkgrel=6
+pkgver=1.7
+pkgrel=1
pkgdesc="command-line network packet crafting and injection utility"
-arch=(x86_64)
-url="http://nemesis.sourceforge.net/"
+arch=('i686' 'x86_64')
+url="https://github.com/libnet/nemesis"
license=('BSD')
-depends=()
-validpgpkeys=('3CA3CBFF30506B07F036E57712AAFCF86923D3FD')
-source=(https://downloads.sourceforge.net/sourceforge/nemesis/nemesis-$pkgver.tar.gz{,.asc}
- https://arch.p5n.pp.ru/~sergej/dl/2016/libnet-1.0.2a.tar.gz
- nemesis-proto_tcp.c.diff)
-sha256sums=('803f5cf5c7c4af15128b8cd7f7610730cbed1427f062a31c2f5255790fb1bab4'
- 'SKIP'
- '7c7f2e8ccb47bb47072c5cd583fea5e90ab892c75889b625346b60d10464459a'
- '47adbf39b5a5e351bc6b0eebaf89d98bb7ad3ab359c04391b782998053ae067d')
+depends=('libnet')
+makedepends=('autoconf')
+#validpgpkeys=('3CA3CBFF30506B07F036E57712AAFCF86923D3FD')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/libnet/nemesis/archive/v${pkgver}.tar.gz")
+sha256sums=('87d96dcc3d2d0e0b2966ac2cb59a26ae426425ebc7e02720bc56a1849a384f50')
-package() {
- # build libnet
- cd "$srcdir"/Libnet-1.0.2a
- # very dirty hack
- sed -i 's#malloc(p_size)#malloc(p_size*2)#' src/libnet_packet_mem.c
- [ -f Makefile ] || ./configure --prefix="$srcdir"/libnet
- make
- make MAN_PREFIX="$srcdir"/libnet/usr/man/man3 install
+build() {
+ cd ${pkgname}-${pkgver}
+ ./autogen.sh
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make LDFLAGS="-z muldefs"
+
+ make ${MAKEFLAGS} CFLAGS=diag_supress
+}
- # build nemesis
- cd "$srcdir"/nemesis-$pkgver
- export PATH="$srcdir/libnet/bin:$PATH"
- export CFLAGS="-D__GLIBC__=0 -I"$srcdir"/libnet/include -DLIBNET_LIL_ENDIAN"
- export LDFLAGS="-L"$srcdir"/libnet/lib"
- patch -Np1 <"$srcdir"/nemesis-proto_tcp.c.diff
- [ -f Makefile ] || ./configure --prefix=/usr --mandir=/usr/share/man \
- --with-libnet-includes="$srcdir"/libnet/include \
- --with-libnet-libraries="$srcdir"/libnet/lib
- make
+package() {
+ cd ${pkgname}-${pkgver}
make DESTDIR="$pkgdir" install
install -D -m0644 LICENSE "$pkgdir"/usr/share/licenses/nemesis/LICENSE
}
diff --git a/nemesis-proto_tcp.c.diff b/nemesis-proto_tcp.c.diff
deleted file mode 100644
index d5a921738b8..00000000000
--- a/nemesis-proto_tcp.c.diff
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -wbBur nemesis-1.4/src/nemesis-functions.c nemesis-1.4.my/src/nemesis-functions.c
---- nemesis-1.4/src/nemesis-functions.c 2004-10-07 02:16:50.000000000 +0000
-+++ nemesis-1.4.my/src/nemesis-functions.c 2009-06-19 13:51:30.000000000 +0000
-@@ -8,6 +8,8 @@
- *
- */
-
-+#include <net/ethernet.h>
-+
- #if defined(HAVE_CONFIG_H)
- #include "config.h"
- #endif
-diff -wbBur nemesis-1.4/src/nemesis-proto_tcp.c nemesis-1.4.my/src/nemesis-proto_tcp.c
---- nemesis-1.4/src/nemesis-proto_tcp.c 2003-10-31 21:29:37.000000000 +0000
-+++ nemesis-1.4.my/src/nemesis-proto_tcp.c 2009-06-19 13:51:15.000000000 +0000
-@@ -16,7 +16,7 @@
- FileData *ipod, FileData *tcpod, char *device)
- {
- int n;
-- u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0;
-+ u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0, tcp_headerlen = 0, ip_headerlen = 0;
- static u_int8_t *pkt;
- static int sockfd = -1;
- struct libnet_link_int *l2 = NULL;
-@@ -58,13 +58,20 @@
- #endif
- }
-
-+ ip_headerlen = LIBNET_IP_H + ipod->file_s;
-+ tcp_headerlen = LIBNET_TCP_H + tcpod->file_s;
-+
- tcp_packetlen = link_offset + LIBNET_IP_H + LIBNET_TCP_H + pd->file_s +
- ipod->file_s + tcpod->file_s;
-
-- tcp_meta_packetlen = tcp_packetlen - (link_offset + LIBNET_IP_H);
-+ tcp_meta_packetlen = LIBNET_TCP_H + pd->file_s;
-
- #ifdef DEBUG
-+ printf("DEBUG: link offsetlength %u.\n", link_offset);
-+ printf("DEBUG: IP header length %u.\n", ip_headerlen);
-+ printf("DEBUG: TCP header length %u.\n", tcp_headerlen);
- printf("DEBUG: TCP packet length %u.\n", tcp_packetlen);
-+ printf("DEBUG: TCP meta length %u.\n", tcp_meta_packetlen);
- printf("DEBUG: IP options size %u.\n", ipod->file_s);
- printf("DEBUG: TCP options size %u.\n", tcpod->file_s);
- printf("DEBUG: TCP payload size %u.\n", pd->file_s);