[20881] trunk/dports/net/p0f
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 7 11:06:33 PST 2006
Revision: 20881
http://trac.macosforge.org/projects/macports/changeset/20881
Author: pmq at macports.org
Date: 2006-12-07 11:06:32 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
Closes #11104. Thanks to macports at rohanl.com for the patches.
Also removes an outdated/unused patch.
Modified Paths:
--------------
trunk/dports/net/p0f/Portfile
Added Paths:
-----------
trunk/dports/net/p0f/files/p0f.c.patch
trunk/dports/net/p0f/files/p0fq.c.patch
Removed Paths:
-------------
trunk/dports/net/p0f/files/patch-mk__Linux
Modified: trunk/dports/net/p0f/Portfile
===================================================================
--- trunk/dports/net/p0f/Portfile 2006-12-07 08:34:38 UTC (rev 20880)
+++ trunk/dports/net/p0f/Portfile 2006-12-07 19:06:32 UTC (rev 20881)
@@ -2,28 +2,28 @@
PortSystem 1.0
-name p0f
-version 2.0.8
-categories net security
-platforms darwin
-maintainers mww at opendarwin.org
-description versatile passive OS fingerprinting, masquerade detection tool
-long_description p0f is a versatile passive OS fingerprinting and \
- masquerade detection utility, to be used for evidence or \
- information gathering on servers, firewalls, IDSes, and \
- honeypots, for pen-testing, or just for the fun of it.
+name p0f
+version 2.0.8
+categories net security
+platforms darwin
+maintainers mww at opendarwin.org
+description versatile passive OS fingerprinting, masquerade detection tool
+long_description p0f is a versatile passive OS fingerprinting and \
+ masquerade detection utility, to be used for evidence or \
+ information gathering on servers, firewalls, IDSes, and \
+ honeypots, for pen-testing, or just for the fun of it.
-homepage http://lcamtuf.coredump.cx/p0f.shtml
-master_sites http://lcamtuf.coredump.cx/p0f/
-extract.suffix .tgz
-checksums sha1 7b4d5b2f24af4b5a299979134bc7f6d7b1eaf875 \
- rmd160 87d5b30d2d5e156b9fdcb026160155f413ce13d3
+homepage http://lcamtuf.coredump.cx/p0f.shtml
+master_sites http://lcamtuf.coredump.cx/p0f/
+extract.suffix .tgz
+checksums sha1 7b4d5b2f24af4b5a299979134bc7f6d7b1eaf875 \
+ rmd160 87d5b30d2d5e156b9fdcb026160155f413ce13d3
-depends_build port:gmake
+depends_build port:gmake
-worksrcdir p0f
+worksrcdir ${name}
+patchfiles p0f.c.patch p0fq.c.patch
-
configure {
reinplace "s|/etc/p0f|${prefix}/share/p0f|g" ${worksrcpath}/config.h
}
Added: trunk/dports/net/p0f/files/p0f.c.patch
===================================================================
--- trunk/dports/net/p0f/files/p0f.c.patch (rev 0)
+++ trunk/dports/net/p0f/files/p0f.c.patch 2006-12-07 19:06:32 UTC (rev 20881)
@@ -0,0 +1,37 @@
+diff -Naur p0f.c.orig p0f.c
+--- p0f.c.orig 2006-08-22 00:16:00.000000000 +1000
++++ p0f.c 2006-11-05 21:36:45.000000000 +1100
+@@ -1813,12 +1813,19 @@
+
+ if (use_cache) {
+
++ char errbuf[PCAP_ERRBUF_SIZE];
++ if(pcap_setnonblock(pt, 1, errbuf) == -1) {
++ debug("[!] Failed to set non blocking mode on device: %s", errbuf);
++ }
++
+ _s32 mfd,max;
+
+ mfd = pcap_fileno(pt);
+
+ max = 1 + (mfd > lsock ? mfd : lsock);
+
++ struct timeval timeout;
++
+ while (1) {
+ fd_set f,e;
+
+@@ -1835,9 +1842,11 @@
+ raw socket, even with no SA_RESTART, it's a mess... select()
+ is rather neutral. */
+
+- select(max,&f,0,&e,0);
++ timeout.tv_sec = 1;
++ timeout.tv_usec = 0;
++ select(max,&f,0,&e,&timeout);
+
+- if (FD_ISSET(mfd, &f) || FD_ISSET(mfd,&e))
++ // if (FD_ISSET(mfd, &f) || FD_ISSET(mfd,&e))
+ if (pcap_dispatch(pt,-1,(pcap_handler)&parse,0) < 0) break;
+
+ if (FD_ISSET(lsock,&f)) {
Added: trunk/dports/net/p0f/files/p0fq.c.patch
===================================================================
--- trunk/dports/net/p0f/files/p0fq.c.patch (rev 0)
+++ trunk/dports/net/p0f/files/p0fq.c.patch 2006-12-07 19:06:32 UTC (rev 20881)
@@ -0,0 +1,13 @@
+diff -Naur test/p0fq.c.orig test/p0fq.c
+--- test/p0fq.c.orig 2006-08-21 22:29:49.000000000 +1000
++++ test/p0fq.c 2006-11-04 10:40:01.000000000 +1100
+@@ -52,7 +52,7 @@
+ d = inet_addr(argv[4]);
+ dp = atoi(argv[5]);
+
+- if (!sp || !dp || s == INADDR_NONE || d == INADDR_NONE)
++ if (!dp || s == INADDR_NONE || d == INADDR_NONE)
+ fatal("Bad IP/port values.\n");
+
+ sock = socket(PF_UNIX,SOCK_STREAM,0);
+
Deleted: trunk/dports/net/p0f/files/patch-mk__Linux
===================================================================
--- trunk/dports/net/p0f/files/patch-mk__Linux 2006-12-07 08:34:38 UTC (rev 20880)
+++ trunk/dports/net/p0f/files/patch-mk__Linux 2006-12-07 19:06:32 UTC (rev 20881)
@@ -1,11 +0,0 @@
---- mk/Linux.orig 2005-04-08 12:30:07.000000000 -0400
-+++ mk/Linux 2005-04-08 12:30:08.000000000 -0400
-@@ -10,7 +10,7 @@
- CC = gcc
- LIBS = -lpcap -I/usr/include/pcap -I/usr/local/include/pcap
- STRIP = strip
--CFLAGS = -O3 -Wall -fomit-frame-pointer -funroll-loops
-+CFLAGS = -O3 -Wall -fomit-frame-pointer -funroll-loops -DPCAP_DONT_INCLUDE_PCAP_BPF_H
- FILE = p0f
- TOOLS = test/sendack test/sendack2 test/sendsyn
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20061207/ed85f804/attachment.html
More information about the macports-changes
mailing list