2011-03-10 05:11:03 +00:00
|
|
|
class Hping < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Command-line oriented TCP/IP packet assembler/analyzer"
|
2014-11-04 04:57:14 +00:00
|
|
|
homepage "http://www.hping.org/"
|
|
|
|
url "http://www.hping.org/hping3-20051105.tar.gz"
|
|
|
|
mirror "https://raw.githubusercontent.com/DomT4/LibreMirror/master/Hping/hping3-20051105.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "f5a671a62a11dc8114fa98eade19542ed1c3aa3c832b0e572ca0eb1a5a4faee8"
|
2014-11-04 04:57:14 +00:00
|
|
|
version "3.20051105"
|
2010-07-27 15:55:13 +00:00
|
|
|
|
2014-03-17 00:35:08 +00:00
|
|
|
patch :DATA
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-libpcap_stuff.c.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "56d3af80a6385bf93257080233e971726283d6555cc244ebe886ea21133e83ad"
|
2014-03-17 00:35:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-ars.c.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "02138051414e48b9f057a2dd8134c01ccd374aff65593833a799a5aaa36193c4"
|
2014-03-17 00:35:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-sendip.c.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "e7befff6dd546cdb38b59d9e6d3ef4a4dc09c79af2982f4609b2ea5dadf1a360"
|
2014-03-17 00:35:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-Makefile.in.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "18ceb30104bdb906b540bb5f6316678ce85fb55f5c086d2d74417416de3792f8"
|
2014-03-17 00:35:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-bytesex.h.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "7bad5e8b4b5441f72f85d50fa3461857a398b87e2d0cb63bb30985c9457be21d"
|
2010-07-27 15:55:13 +00:00
|
|
|
end
|
2010-06-14 03:27:50 +00:00
|
|
|
|
|
|
|
def install
|
2010-07-27 15:55:13 +00:00
|
|
|
# Compile fails with tcl support; TCL on OS X is 32-bit only
|
|
|
|
system "./configure", "--no-tcl"
|
|
|
|
|
|
|
|
# Target folders need to exist before installing
|
|
|
|
sbin.mkpath
|
2010-04-07 05:58:35 +00:00
|
|
|
man8.mkpath
|
2012-02-10 04:12:16 +00:00
|
|
|
system "make", "CC=#{ENV.cc}",
|
|
|
|
"COMPILE_TIME=#{ENV.cflags}",
|
|
|
|
"INSTALL_PATH=#{prefix}",
|
|
|
|
"INSTALL_MANPATH=#{man}",
|
|
|
|
"install"
|
2010-06-14 03:27:50 +00:00
|
|
|
end
|
|
|
|
end
|
2013-12-12 20:00:36 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/gethostname.c b/gethostname.c
|
|
|
|
index 3d0ea58..a8a9699 100644
|
|
|
|
--- a/gethostname.c
|
|
|
|
+++ b/gethostname.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
-size_t strlcpy(char *dst, const char *src, size_t siz);
|
|
|
|
-
|
|
|
|
char *get_hostname(char* addr)
|
|
|
|
{
|
|
|
|
static char answer[1024];
|