From bob2@april.org  Sat Apr 30 18:28:11 2005
Return-Path: <bob2@april.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ECA4316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 18:28:11 +0000 (GMT)
Received: from april.org (APlessis-Bouchard-152-1-28-60.w83-114.abo.wanadoo.fr [83.114.74.60])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9930343D31
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 18:28:10 +0000 (GMT)
	(envelope-from bob2@april.org)
Received: from april.org (localhost [127.0.0.1])
	by april.org (8.13.1/8.13.1) with ESMTP id j3UIS83K002915
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 20:28:08 +0200 (CEST)
	(envelope-from bob2@april.org)
Received: (from bob2@localhost)
	by april.org (8.13.1/8.13.1/Submit) id j3UIS8HN002914;
	Sat, 30 Apr 2005 20:28:08 +0200 (CEST)
	(envelope-from bob2)
Message-Id: <200504301828.j3UIS8HN002914@april.org>
Date: Sat, 30 Apr 2005 20:28:08 +0200 (CEST)
From: Jean-Pierre FORCIOLI <bob2@april.org>
Reply-To: Jean-Pierre FORCIOLI <bob2@april.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New port: security/synscan flexible, scriptable TCP/IP test tool for network testing and active OS fingerprinting
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         80484
>Category:       ports
>Synopsis:       New port: security/synscan flexible, scriptable TCP/IP test tool for network testing and active OS fingerprinting
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    thierry
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 30 18:30:03 GMT 2005
>Closed-Date:    Tue Dec 20 21:48:37 GMT 2005
>Last-Modified:  Tue Dec 20 21:48:37 GMT 2005
>Originator:     Jean-Pierre FORCIOLI
>Release:        FreeBSD 5.3-RELEASE-p8 i386
>Organization:
-
>Environment:
System: FreeBSD vulgus.cyber-networks.fr 5.3-RELEASE-p8 FreeBSD 5.3-RELEASE-p8 #7: Sat Apr 9 08:13:25 CEST 2005 root@vulgus.cyber-networks.fr:/usr/obj/usr/src/sys/VULGUS i386

>Description:

   -
     	
>How-To-Repeat:

   -

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	synscan
#	synscan/pkg-descr
#	synscan/Makefile
#	synscan/pkg-install
#	synscan/pkg-message
#	synscan/distinfo
#	synscan/pkg-plist
#	synscan/pkg-deinstall
#
echo c - synscan
mkdir -p synscan > /dev/null 2>&1
echo x - synscan/pkg-descr
sed 's/^X//' >synscan/pkg-descr << 'END-of-synscan/pkg-descr'
Xsynscan is a flexible, scriptable TCP/IP test tool for network testing
Xand active OS fingerprinting.
X
XMore verbosely, synscan is a userland TCP/IP stack that can be used to
Xtest many aspects and edge-conditions of a remote TCP implementation
Xand identify the operating system. By modifying certain directives in
Xthe scripts, one can extract different behavior from the remote
Ximplementation and use this to identify it. 
X
XPlease read the paper (linked below) for complete information.
X
XWWW: http://synscan.sourceforge.net/
XPAPER: http://synscan.sourceforge.net/taleck-synscan-2004.pdf
X
X- bob2
Xbob2@april.org
END-of-synscan/pkg-descr
echo x - synscan/Makefile
sed 's/^X//' >synscan/Makefile << 'END-of-synscan/Makefile'
X# New ports collection makefile for:   synscan
X# Date created:        12 March 2005
X# Whom:                bob2
X#
X# $FreeBSD$
X#
X
XPORTNAME=	synscan
XPORTVERSION=	0.1
XCATEGORIES=	security
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
XMASTER_SITE_SUBDIR=	synscan
X
XMAINTAINER=	bob2@april.org
XCOMMENT=	Synscan is a flexible, scriptable TCP/IP test tool for network \
X		testing and active OS fingerprinting.
X
XMAN8=		synscan.8
XMAN5=		synscan.conf.5 synscan.services.5
XMANCOMPRESSED=	no
X
XGNU_CONFIGURE=	yes
XCONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
X
XCONFIGURE_ARGS=	--with-libdnet=${LOCALBASE}/bin
X
XLIB_DEPENDS=	dnet.1:${PORTSDIR}/net/libdnet
XBUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent
X
Xpost-install:
X	@${ECHO} "===>   Stripping ${PREFIX}/bin/synscan"
X	${STRIP_CMD} ${PREFIX}/bin/synscan
X	@${ECHO} ""
X	@${ECHO} "To use this port, make sure that you have loaded the PF kernel
X	@${ECHO} "module, by doing"
X	@${ECHO} ""
X	@${ECHO} "  # kldload pf"
X	@${ECHO} ""
X	@${ECHO} "or adding"
X	@${ECHO} ""
X	@${ECHO} "  pf_load=\"YES\""
X	@${ECHO} ""
X	@${ECHO} "to your /boot/loader.conf (normally done automatically whom installing"
X	@${ECHO} "the port)."
X	@${ECHO} ""
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
Xpost-deinstall:
X	@${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 503000
XIGNORE=		You have to use FreeBSD 5.3 or more. This port uses PF (Packet Filter) which was introduced with FreeBSD 5.3-RELEASE.
X.endif
X
X.include <bsd.port.post.mk>
END-of-synscan/Makefile
echo x - synscan/pkg-install
sed 's/^X//' >synscan/pkg-install << 'END-of-synscan/pkg-install'
X#! /bin/sh
X# $FreeBSD$
X
XBOOT_LOADER_CONF=/boot/loader.conf
XPF_LOAD="pf_load"
X
XCP=/bin/cp
XDATE=/bin/date
XDIALOG=/usr/bin/dialog
XECHO=/bin/echo
XGREP=/usr/bin/grep
X
XTODAY=`${DATE} +%Y%m%d-%H%M%S`
X
Xif [ x"${2}" = xPOST-INSTALL ]; then
X
X    # Backup the original BOOT_LOADER_CONF file.
X    if [ -e ${BOOT_LOADER_CONF} ]; then
X	${CP} ${BOOT_LOADER_CONF} ${BOOT_LOADER_CONF}.before_synscan.${TODAY}
X    fi
X
X    # Check if PF is already used in the BOOT_LOADER_CONF file.
X    ${ECHO} "===> Checking if PF is used in your ${BOOT_LOADER_CONF}"
X    RESULT=`${GREP} ${PF_LOAD} ${BOOT_LOADER_CONF}`
X    
X    if [ x"${RESULT}" = x ]; then
X	${ECHO} "===> PF isn't used in your ${BOOT_LOADER_CONF}"
X
X	${DIALOG} --yesno "Would you like to enable PF in the ${BOOT_LOADER_CONF} file?" 7 50
X	
X	if [ $? -eq 0 ]; then
X	    ${ECHO} >> ${BOOT_LOADER_CONF}
X	    ${ECHO} "# ${TODAY} - Updated by pkg_add for synscan." >> ${BOOT_LOADER_CONF}
X	    ${ECHO} "pf_load=\"YES\"" >> ${BOOT_LOADER_CONF}
X	else
X	    ${ECHO} 
X	    ${ECHO} "*******************************************************************************"
X	    ${ECHO} "===> OK. So please make sure loading PF kernel module before launching synscan."
X	    ${ECHO} "*******************************************************************************"
X	    ${ECHO} 
X	fi
X    else
X	${ECHO}
X	${ECHO} "===>  PF is already used in your ${BOOT_LOADER_CONF} file."
X	${ECHO} "      It's current value usage is:"
X	${ECHO} "      ${RESULT}"
X	${ECHO}
X	
X    fi
Xfi
END-of-synscan/pkg-install
echo x - synscan/pkg-message
sed 's/^X//' >synscan/pkg-message << 'END-of-synscan/pkg-message'
X
XTo use this port, make sure that you have loaded the PF kernel 
Xmodule, by doing
X
X	# kldload pf
X
Xor adding
X
X	pf_load="YES"
X
Xto your /boot/loader.conf (normally done automatically when installing
Xthe port or the package).
END-of-synscan/pkg-message
echo x - synscan/distinfo
sed 's/^X//' >synscan/distinfo << 'END-of-synscan/distinfo'
XMD5 (synscan-0.1.tar.gz) = 144cfc268673c3e1f64820240ee89078
XSIZE (synscan-0.1.tar.gz) = 100138
END-of-synscan/distinfo
echo x - synscan/pkg-plist
sed 's/^X//' >synscan/pkg-plist << 'END-of-synscan/pkg-plist'
Xbin/synscan
Xshare/synscan-0.1/synscan.conf
Xshare/synscan-0.1/synscan.fingerprints
Xshare/synscan-0.1/synscan.services
X@dirrm share/synscan-0.1
END-of-synscan/pkg-plist
echo x - synscan/pkg-deinstall
sed 's/^X//' >synscan/pkg-deinstall << 'END-of-synscan/pkg-deinstall'
X#! /bin/sh
X# $FreeBSD$
X
XBOOT_LOADER_CONF=/boot/loader.conf
XPF_LOAD="pf_load"
X
XECHO=/bin/echo
XGREP=/usr/bin/grep
X
Xif [ x"${2}" = xPOST-DEINSTALL ]; then
X    
X    RESULT=`${GREP} ${PF_LOAD} ${BOOT_LOADER_CONF}`
X
X    if [ ! x"${RESULT}" = x ]; then
X	${ECHO} "===> PF was required by synscan."
X	${ECHO} "     PF is used in your ${BOOT_LOADER_CONF} file."
X	${ECHO} "     Maybe it was added by synscan install program."
X	${ECHO} "     It's current value is:"
X	${ECHO} "     ${RESULT}"
X	${ECHO} "     This reminder will give you an opportunity to disable/comment/delete"
X	${ECHO} "     the line from your ${BOOT_LOADER_CONF} file".
X    fi
Xfi
END-of-synscan/pkg-deinstall
exit

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: thierry 
State-Changed-When: Fri May 6 20:06:28 GMT 2005 
State-Changed-Why:  

`portlint -A' reports: 

- COMMENT should begin with a capital, and end without a period 
- COMMENT exceeds 70 characters limit. 

What do you think of this comment? 
COMMENT=	A TCP/IP tool for network testing and active OS fingerprinting 

Since I'm there, I suggest the following patch: 

--- synscan.diff begins here --- 
diff -urN security/synscan.orig/Makefile security/synscan/Makefile 
--- security/synscan.orig/Makefile	Fri May  6 21:16:08 2005 
+++ security/synscan/Makefile	Fri May  6 21:53:13 2005 
@@ -12,8 +12,10 @@ 
MASTER_SITE_SUBDIR=	synscan 

MAINTAINER=	bob2@april.org 
-COMMENT=	Synscan is a flexible, scriptable TCP/IP test tool for network  
-		testing and active OS fingerprinting. 
+COMMENT=	A TCP/IP tool for network testing and active OS fingerprinting 
+ 
+LIB_DEPENDS=	dnet.1:${PORTSDIR}/net/libdnet 
+BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent 

MAN8=		synscan.8 
MAN5=		synscan.conf.5 synscan.services.5 
@@ -24,29 +26,13 @@ 

CONFIGURE_ARGS=	--with-libdnet=${LOCALBASE}/bin 

-LIB_DEPENDS=	dnet.1:${PORTSDIR}/net/libdnet 
-BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent 
+PLIST_SUB=	VER=${PORTVERSION} 

post-install: 
@${ECHO} "===>   Stripping ${PREFIX}/bin/synscan" 
${STRIP_CMD} ${PREFIX}/bin/synscan 
-	@${ECHO} "" 
-	@${ECHO} "To use this port, make sure that you have loaded the PF kernel 
-	@${ECHO} "module, by doing" 
-	@${ECHO} "" 
-	@${ECHO} "  # kldload pf" 
-	@${ECHO} "" 
-	@${ECHO} "or adding" 
-	@${ECHO} "" 
-	@${ECHO} "  pf_load="YES"" 
-	@${ECHO} "" 
-	@${ECHO} "to your /boot/loader.conf (normally done automatically whom installing" 
-	@${ECHO} "the port)." 
-	@${ECHO} "" 
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL 
- 
-post-deinstall: 
-	@${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL 
+	@${CAT} ${PKGMESSAGE} 

.include <bsd.port.pre.mk> 

diff -urN security/synscan.orig/pkg-deinstall security/synscan/pkg-deinstall 
--- security/synscan.orig/pkg-deinstall	Fri May  6 21:16:08 2005 
+++ security/synscan/pkg-deinstall	Fri May  6 21:24:44 2005 
@@ -8,7 +8,7 @@ 
GREP=/usr/bin/grep 

if [ x"${2}" = xPOST-DEINSTALL ]; then 
-     
+ 
RESULT=`${GREP} ${PF_LOAD} ${BOOT_LOADER_CONF}` 

if [ ! x"${RESULT}" = x ]; then 
diff -urN security/synscan.orig/pkg-install security/synscan/pkg-install 
--- security/synscan.orig/pkg-install	Fri May  6 21:16:08 2005 
+++ security/synscan/pkg-install	Fri May  6 21:24:09 2005 
@@ -22,22 +22,22 @@ 
# Check if PF is already used in the BOOT_LOADER_CONF file. 
${ECHO} "===> Checking if PF is used in your ${BOOT_LOADER_CONF}" 
RESULT=`${GREP} ${PF_LOAD} ${BOOT_LOADER_CONF}` 
-     
+ 
if [ x"${RESULT}" = x ]; then 
${ECHO} "===> PF isn't used in your ${BOOT_LOADER_CONF}" 

${DIALOG} --yesno "Would you like to enable PF in the ${BOOT_LOADER_CONF} file?" 7 50 
-	 
+ 
if [ $? -eq 0 ]; then 
${ECHO} >> ${BOOT_LOADER_CONF} 
${ECHO} "# ${TODAY} - Updated by pkg_add for synscan." >> ${BOOT_LOADER_CONF} 
${ECHO} "pf_load="YES"" >> ${BOOT_LOADER_CONF} 
else 
-	    ${ECHO}  
+	    ${ECHO} 
${ECHO} "*******************************************************************************" 
${ECHO} "===> OK. So please make sure loading PF kernel module before launching synscan." 
${ECHO} "*******************************************************************************" 
-	    ${ECHO}  
+	    ${ECHO} 
fi 
else 
${ECHO} 
@@ -45,6 +45,6 @@ 
${ECHO} "      It's current value usage is:" 
${ECHO} "      ${RESULT}" 
${ECHO} 
-	 
+ 
fi 
fi 
diff -urN security/synscan.orig/pkg-plist security/synscan/pkg-plist 
--- security/synscan.orig/pkg-plist	Fri May  6 21:16:08 2005 
+++ security/synscan/pkg-plist	Fri May  6 21:31:28 2005 
@@ -1,5 +1,5 @@ 
bin/synscan 
-share/synscan-0.1/synscan.conf 
-share/synscan-0.1/synscan.fingerprints 
-share/synscan-0.1/synscan.services 
-@dirrm share/synscan-0.1 
+share/synscan-%%VER%%/synscan.conf 
+share/synscan-%%VER%%/synscan.fingerprints 
+share/synscan-%%VER%%/synscan.services 
+@dirrm share/synscan-%%VER%% 
--- synscan.diff ends here --- 

Moreover, it does not respect CFLAGS, and configure should 
probably be patched. 



Responsible-Changed-From-To: freebsd-ports-bugs->thierry 
Responsible-Changed-By: thierry 
Responsible-Changed-When: Fri May 6 20:06:28 GMT 2005 
Responsible-Changed-Why:  

Take it. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80484 

From: Thierry Thomas <thierry@FreeBSD.org>
To: Jean-Pierre FORCIOLI <bob2@april.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org, Pav Lucistnik <pav@FreeBSD.org>
Subject: Re: ports/80484: New port: security/synscan flexible, scriptable TCP/IP test tool for network testing and active OS fingerprinting
Date: Sat, 3 Dec 2005 00:23:52 +0100

 --wLAMOaPNJ0fu1fTG
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Fri  6 may 05 at 22:15:34 +0200, Thierry Thomas <thierry@FreeBSD.org>
  wrote:
 > Synopsis: New port: security/synscan flexible, scriptable TCP/IP test too=
 l for network testing and active OS fingerprinting
 >=20
 > State-Changed-From-To: open->feedback
 > State-Changed-By: thierry
 > State-Changed-When: Fri May 6 20:06:28 GMT 2005
 > State-Changed-Why:=20
 >=20
 > `portlint -A' reports:
 >=20
 > - COMMENT should begin with a capital, and end without a period
 > - COMMENT exceeds 70 characters limit.
 >=20
 > What do you think of this comment?
 > COMMENT=3D	A TCP/IP tool for network testing and active OS fingerprinting
 >=20
 > Since I'm there, I suggest the following patch:
 
 8<   8<   8<
 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D80484
 
 Hello Jean-Pierre,
 
 You have submitted this PR ports/80484 and it is waiting for your
 feedback since May 6 2005; have you made any progress?
 
 Truly yours,
 --=20
 Th. Thomas.
 
 --wLAMOaPNJ0fu1fTG
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (FreeBSD)
 
 iD8DBQFDkNeIc95pjMcUBaIRApQjAKDXwG72pusamOozoiaHLRjea0qOVgCcDnbd
 gnztWBeAB8cOi9ekPi7LfqE=
 =3AX8
 -----END PGP SIGNATURE-----
 
 --wLAMOaPNJ0fu1fTG--
State-Changed-From-To: feedback->closed 
State-Changed-By: thierry 
State-Changed-When: Tue Dec 20 21:46:20 UTC 2005 
State-Changed-Why:  

Feedback time-out. 

Anyway, thanks for your submission, and don't hesitate to submit it 
again when you'll find some time. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80484 
>Unformatted:
