diff options
author | atatat <atatat@pkgsrc.org> | 2002-04-04 17:02:30 +0000 |
---|---|---|
committer | atatat <atatat@pkgsrc.org> | 2002-04-04 17:02:30 +0000 |
commit | 0fc5d6b01c1b853df6e8fe699b6f270cd4d6c866 (patch) | |
tree | fbe13b4313967b393bfb0d7617d154ade2ba22af /net/hping | |
parent | 97bd97796e4657412b02aa8f53c7bef0adbd4fc6 (diff) | |
download | pkgsrc-0fc5d6b01c1b853df6e8fe699b6f270cd4d6c866.tar.gz |
Add a pkg for hping (aka hping2). Sort of an amalgam of ping,
traceroute, and nmap, hping can be used to traceroute through packet
filtering routers. Among other things.
Diffstat (limited to 'net/hping')
-rw-r--r-- | net/hping/DESCR | 8 | ||||
-rw-r--r-- | net/hping/MESSAGE | 6 | ||||
-rw-r--r-- | net/hping/Makefile | 27 | ||||
-rw-r--r-- | net/hping/PLIST | 5 | ||||
-rw-r--r-- | net/hping/distinfo | 5 | ||||
-rw-r--r-- | net/hping/patches/patch-aa | 39 |
6 files changed, 90 insertions, 0 deletions
diff --git a/net/hping/DESCR b/net/hping/DESCR new file mode 100644 index 00000000000..ae42640df02 --- /dev/null +++ b/net/hping/DESCR @@ -0,0 +1,8 @@ +hping is a command-line oriented TCP/IP packet assembler/analyzer. +The interface is inspired by the ping(8) unix command, but hping +isn't only able to send ICMP echo requests. It supports TCP, UDP, +ICMP and RAW-IP protocols, has a traceroute mode, the ability to +send files between a covert channel, and many other features. +While hping was mainly used as a security tool in the past, it can +be used in many ways by people that don't care about security to +test networks and hosts. diff --git a/net/hping/MESSAGE b/net/hping/MESSAGE new file mode 100644 index 00000000000..e04c0af397b --- /dev/null +++ b/net/hping/MESSAGE @@ -0,0 +1,6 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $ + + NOTE: ${PREFIX}/sbin/hping (and hping2) are setuid "root". + +=========================================================================== diff --git a/net/hping/Makefile b/net/hping/Makefile new file mode 100644 index 00000000000..0f148c47aae --- /dev/null +++ b/net/hping/Makefile @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $ +# + +DISTNAME= hping2.0.0-rc1 +PKGNAME= hping-2.0.0.1 +WRKSRC= ${WRKDIR}/hping2 +CATEGORIES= net +MASTER_SITES= http://www.hping.org/ + +MAINTAINER= atatat@netbsd.org +HOMEPAGE= http://www.hping.org/ +COMMENT= Traceroute and ping using TCP and UDP as well as ICMP + +HAS_CONFIGURE= YES +MANPATH= ${PREFIX}/man +CONFIGURE_ENV+= MANPATH="${MANPATH}" +NOT_FOR_PLATFORM= NetBSD-0.* NetBSD-1.[0-4]* + +BINMODE= 4755 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/hping2 ${PREFIX}/sbin + ${LN} -s ../sbin/hping2 ${PREFIX}/sbin/hping + ${INSTALL_MAN} ${WRKSRC}/docs/hping2.8 ${PREFIX}/man/man8 + ${LN} -s ../../man/man8/hping2.8 ${PREFIX}/man/man8/hping.8 + +.include "../../mk/bsd.pkg.mk" diff --git a/net/hping/PLIST b/net/hping/PLIST new file mode 100644 index 00000000000..f9a2788458f --- /dev/null +++ b/net/hping/PLIST @@ -0,0 +1,5 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $ +sbin/hping2 +sbin/hping +man/man8/hping2.8 +man/man8/hping.8 diff --git a/net/hping/distinfo b/net/hping/distinfo new file mode 100644 index 00000000000..14ebfce0f6e --- /dev/null +++ b/net/hping/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $ + +SHA1 (hping2.0.0-rc1.tar.gz) = 710dbc77b04399cc8979a910aa03e805c17bd01c +Size (hping2.0.0-rc1.tar.gz) = 90496 bytes +SHA1 (patch-aa) = 9bc0ba438d29191247d61c0b9a4e71d09e4c60a0 diff --git a/net/hping/patches/patch-aa b/net/hping/patches/patch-aa new file mode 100644 index 00000000000..6bdda51a232 --- /dev/null +++ b/net/hping/patches/patch-aa @@ -0,0 +1,39 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/04/04 17:02:30 atatat Exp $ + +Do *ALL* the root stuff right up front and then completely lose +privileges. + +--- main.c.orig Mon Aug 13 20:07:33 2001 ++++ main.c Fri Mar 29 23:46:01 2002 +@@ -150,6 +150,17 @@ + char setflags[1024] = {'\0'}; + int c, hdr_size; + ++ /* open raw socket */ ++ sockraw = open_sockraw(); ++ if (sockraw == -1) { ++ printf("[main] can't open raw socket\n"); ++ exit(1); ++ } ++ if (getuid() && setuid(getuid()) == -1) { ++ printf("[main] can't drop privs\n"); ++ exit(1); ++ } ++ + if ( parse_options(argc, argv) == -1 ) + { + printf("hping2: missing host argument\n" +@@ -187,13 +199,6 @@ + { + printf("using %s, addr: %s, MTU: %d\n", + ifname, ifstraddr, h_if_mtu); +- } +- +- /* open raw socket */ +- sockraw = open_sockraw(); +- if (sockraw == -1) { +- printf("[main] can't open raw socket\n"); +- exit(1); + } + + /* set SO_BROADCAST option */ |