update to 2.0.5.

ok niallo@
This commit is contained in:
aanriot 2005-07-29 19:40:44 +00:00
parent 6f18274dca
commit e7aa50a185
8 changed files with 101 additions and 99 deletions

View File

@ -1,12 +1,13 @@
# $OpenBSD: Makefile,v 1.13 2004/12/27 13:28:34 alek Exp $
# $NetBSD: Makefile,v 1.1.1.2 2001/03/26 11:59:15 hubertf Exp $
# $OpenBSD: Makefile,v 1.14 2005/07/29 19:40:44 aanriot Exp $
COMMENT= "passive OS fingerprinting tool"
DISTNAME= p0f-1.8.3
DISTNAME= p0f
EXTRACT_SUFX= .tgz
PKGNAME= p0f-2.0.5
CATEGORIES= security net
HOMEPAGE= http://www.stearns.org/p0f/
HOMEPAGE= http://lcamtuf.coredump.cx/p0f.shtml
# GPL
PERMIT_PACKAGE_CDROM= Yes
@ -15,38 +16,11 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c pcap
MASTER_SITES= ${HOMEPAGE}
EXTRACT_SUFX= .tgz
MASTER_SITES= http://lcamtuf.coredump.cx/
FLAVORS= mysql
FLAVOR?=
MAKE_FILE= ${WRKSRC}/mk/OpenBSD
MAKE_FLAGS= CC=${CC}
EXAMPLES= p0f.fp
.if ${FLAVOR:L} == "mysql"
LIB_DEPENDS= lib/mysql/mysqlclient.10::databases/mysql
ALL_TARGET= p0f-mysql
EXAMPLES+= mysql/db.sql mysql/p0f-mysql.conf
.endif
MAKE_FLAGS= CC='${CC}' \
CFLAGS='${CFLAGS} -DSYSCONFDIR="\"${SYSCONFDIR}\""'
NO_REGRESS= Yes
post-patch:
@perl -i -pe 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/p0f ${PREFIX}/bin/p0f
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/p0f
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/p0f
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/p0f/README
${INSTALL_MAN} ${WRKSRC}/p0f.1 ${PREFIX}/man/man1/p0f.1
.for file in ${EXAMPLES}
.if ${FLAVOR:L} == "mysql"
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/p0f/mysql
.endif
${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/examples/p0f/${file}
.endfor
NO_REGRESS= Yes
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (p0f-1.8.3.tgz) = 532c58affefef5b4e2f4ce4dba30c33b
RMD160 (p0f-1.8.3.tgz) = d1b4a959362e73308bcf164406923d5caebf7006
SHA1 (p0f-1.8.3.tgz) = 1fc476d23ad951d047c3b4f5abbf5078172642c0
SIZE (p0f-1.8.3.tgz) = 29733
MD5 (p0f.tgz) = 78235749e8ada6ad2b16b40fe15081f6
RMD160 (p0f.tgz) = 34ee678aa721ee38959419808ed798aa23228a16
SHA1 (p0f.tgz) = fb11a4138cad903072e3c8ef33316ac22b4ef8f4
SIZE (p0f.tgz) = 130002

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-Makefile,v 1.2 2004/05/03 15:59:36 naddy Exp $
--- Makefile.orig 2003-02-07 04:30:54.000000000 +0100
+++ Makefile 2004-05-03 17:53:51.000000000 +0200
@@ -6,7 +6,7 @@
CC = gcc
CLIBS = -lpcap -I/usr/include/pcap
-MYSQLCLIBS = -L/usr/local/mysql/lib -lmysqlclient -lpcap -I/usr/include/pcap -I/usr/local/mysql/include
+MYSQLCLIBS = -L/usr/local/lib -lmysqlclient -lpcap -I/usr/local/include
SUNLIBS = -lsocket -lnsl -D_SUN_=1
STRIP = strip
CFLAGS = -O3 -Wall

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-mk_OpenBSD,v 1.1 2005/07/29 19:40:44 aanriot Exp $
--- mk/OpenBSD.orig Thu Jul 28 11:01:44 2005
+++ mk/OpenBSD Thu Jul 28 11:01:51 2005
@@ -7,16 +7,15 @@
# (C) Copyright 2000-2004 by Michal Zalewski <lcamtuf@coredump.cx>
#
-CC = gcc
-LIBS = -lpcap -I/usr/include/pcap -I/usr/local/include/pcap
+CC = $(CC)
+LIBS = -lpcap
STRIP = strip
-CFLAGS = -O3 -Wall -fomit-frame-pointer -funroll-loops
+CFLAGS +=
FILE = p0f
-TOOLS = test/sendack test/sendack2 test/sendsyn
+DATAS = p0f.fp p0fa.fp p0fr.fp p0fo.fp README
+TOOLS = test/sendack.c test/sendack2.c test/sendsyn.c
-all: $(FILE) strip
- @echo ">> You can also try 'make p0fq' to compile a sample query"
- @echo ">> client (see README for more information)."
+all: $(FILE)
static: $(FILE)-static
@@ -43,9 +42,10 @@ publish: clean
rm -f /tmp/p0f.tgz
install: $(FILE)
- cp -f $(FILE) /usr/sbin/
- cp -f p0frep /usr/sbin/
- mkdir /etc/p0f || true
- cp -f p0f.fp p0fa.fp p0fr.fp p0fo.fp /etc/p0f/
- cp -f p0f.1 /usr/man/man1/ || cp -f p0f.1 /usr/local/man/man1/
- @echo "You might want to manually install test/ tools now."
+ $(BSD_INSTALL_PROGRAM) $(FILE) $(PREFIX)/sbin/
+ $(BSD_INSTALL_PROGRAM) p0frep $(PREFIX)/sbin/
+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/p0f
+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/p0f
+ $(BSD_INSTALL_DATA) $(DATAS) $(PREFIX)/share/doc/p0f
+ $(BSD_INSTALL_DATA) $(TOOLS) $(PREFIX)/share/examples/p0f
+ $(BSD_INSTALL_MAN) p0f.1 $(PREFIX)/man/man1

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-p0f_1,v 1.1 2004/05/03 15:59:36 naddy Exp $
--- p0f.1.orig 2004-05-03 17:54:34.000000000 +0200
+++ p0f.1 2004-05-03 17:55:02.000000000 +0200
@@ -54,10 +54,10 @@ add timestamps
\fB\-q\fR
quiet mode - do not display banners
.TP
-\fB\-m file\fR
+\fB\-m\fR file
send output to mysql server in 'file'
.TP
-\fb\-g file\fR
+\fB\-g\fR file
insert fprints from 'file' into sql (must be used with -m)
.SH FILES
.TP

View File

@ -1,21 +1,28 @@
$OpenBSD: patch-p0f_c,v 1.7 2004/05/03 19:50:12 naddy Exp $
--- p0f.c.orig 2002-05-13 18:59:40.000000000 +0200
+++ p0f.c 2004-05-03 21:41:00.000000000 +0200
@@ -165,7 +165,7 @@ void set_header_len(int type){
break;
#ifdef DLT_PFLOG
case DLT_PFLOG:
- header_len=28;
+ header_len=48;
break;
#endif
#ifdef DLT_LINUX_SLL
@@ -397,7 +397,7 @@ void load_fprints(char *filename) {
char *p;
//bzero(fips,120000);
x=fopen(filename, "r");
- if (!x) x=fopen("p0f.fp", "r");
+ if (!x) x=fopen(SYSCONFDIR "p0f.fp", "r");
if (!x) {
fprintf(stderr, "No OS fingerprint database (%s) found. Dumb mode on.\n",
filename);
$OpenBSD: patch-p0f_c,v 1.8 2005/07/29 19:40:44 aanriot Exp $
--- p0f.c.orig Mon Sep 13 19:51:36 2004
+++ p0f.c Thu Jul 28 08:25:51 2005
@@ -735,7 +735,7 @@ static _u8* lookup_link(_u16 mss,_u8 txt
unknown:
if (!txt) return 0;
- sprintf(tmp,"unknown-%d",mss);
+ snprintf(tmp, sizeof(tmp), "unknown-%d",mss);
return tmp;
}
@@ -1614,13 +1614,13 @@ int main(int argc,char** argv) {
load_config(config_file);
if (argv[optind] && *(argv[optind])) {
- sprintf(buf,"(%s) and (%3000s)",use_rule,argv[optind]);
+ snprintf(buf, sizeof(buf), "(%s) and (%3000s)",use_rule,argv[optind]);
use_rule = buf;
}
if (use_vlan) {
_u8* x = strdup(use_rule);
- sprintf(buf,"(%1000s) or (vlan and (%1000s))",x,x);
+ snprintf(buf, sizeof(buf), "(%1000s) or (vlan and (%1000s))",x,x);
free(x);
use_rule = buf;
}

View File

@ -1,6 +1,5 @@
Passive OS fingerprinting technique based on information coming
from a remote host when it establishes a connection to our system.
Captured packets contain enough information to determine the remote
OS. Unlike active scanners like Nmap or QueSO, p0f identifies the
remote OS without sending anything to it.
Passive OS fingerprinting technique based on information coming from a
remote host when it establishes a connection to our system. Captured
packets contain enough information to determine the remote OS. Unlike
active scanners like Nmap or QueSO, p0f identifies the remote OS without
sending anything to it.

View File

@ -1,9 +1,16 @@
@comment $OpenBSD: PLIST,v 1.5 2004/09/15 18:36:01 espie Exp $
bin/p0f
@comment $OpenBSD: PLIST,v 1.6 2005/07/29 19:40:44 aanriot Exp $
@man man/man1/p0f.1
sbin/p0f
sbin/p0frep
share/doc/p0f/
share/doc/p0f/README
share/doc/p0f/p0f.fp
@sample ${SYSCONFDIR}/p0f/
@sample ${SYSCONFDIR}/p0f/p0f.fp
share/doc/p0f/p0fa.fp
share/doc/p0f/p0fo.fp
share/doc/p0f/p0fr.fp
share/examples/p0f/
share/examples/p0f/p0f.fp
@sample ${SYSCONFDIR}/p0f.fp
%%mysql%%
share/examples/p0f/sendack.c
share/examples/p0f/sendack2.c
share/examples/p0f/sendsyn.c