Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2003 15:47:50 GMT
From:      Yonatan@xpert.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/50754: New port: security/hmap - web server fingerprinting tool
Message-ID:  <200304091547.h39FloM02950@node-110.xpert.com>
Resent-Message-ID: <200304091250.h39CoMW7045394@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         50754
>Category:       ports
>Synopsis:       New port: security/hmap - web server fingerprinting tool
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 09 05:50:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yonatan@xpert.com
>Release:        FreeBSD 4.8-RC i386
>Organization:
>Environment:
System: FreeBSD Temujin 4.8-RC FreeBSD 4.8-RC #4: Tue Mar 11 17:44:31 GMT 2003 root@Temujin:/usr/obj/usr/src/sys/TEMUJIN i386

>Description:
	Web server fingerprinting tool, used to identify web servers that
changed thier banners.
>How-To-Repeat:
	N/A
>Fix:
	Please note the silly thing I did with tr to remove ^M from EOLs.
I'm also not at ease about the PORTDOCS handling, even though my testing shows
it's working correctly. Please verify my work.

--- hmap.shar begins here ---
# 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:
#
#	.
#	./Makefile
#	./distinfo
#	./pkg-descr
#	./files
#	./files/patch-hmap.py
#	./pkg-plist
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo x - ./Makefile
sed 's/^X//' >./Makefile << 'END-of-./Makefile'
X# Ports collection makefile for:  hmap
X# Date created:			  29 Apr 2003
X# Whom:				  Yonatan <Yonatan@xpert.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	hmap
XPORTVERSION=	0.1
XCATEGORIES=	security
XMASTER_SITES=	http://wwwcsif.cs.ucdavis.edu/~leed/hmap/code/current/
XDISTNAME=	${PORTNAME}
X
XMAINTAINER=	Yonatan@xpert.com
XCOMMENT=	Web server fingerprinting utility
X
XRUN_DEPENDS=	python:${PORTSDIR}/lang/python
X
XNO_WRKSUBDIR=	yes
XNO_BUILD=	yes
XUSE_REINPLACE=	yes
X
Xpost-patch:
X	${CP} ${WRKSRC}/hmap.py ${WRKSRC}/hmap.py.old
X	${TR} -d "\r" < ${WRKSRC}/hmap.py.old > ${WRKSRC}/hmap.py
X	${REINPLACE_CMD} -e 's|PREFIX|${PREFIX}|' ${WRKSRC}/hmap.py
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/hmap.py ${PREFIX}/bin/
X	${MKDIR} ${PREFIX}/share/hmap/
X.	for i in apache.1.3.12.win32 apache.2.0.44.win32 apache.1.3.14.win32 badblue.2.1.win32 apache.1.3.17.win32 dwhttpd.4.1a6.solaris.8 apache.1.3.22.win32 hpws.2.00.1454.solaris.8 apache.1.3.23.rhl.7.3 ibm_http_server.2.0.42.win32 apache.1.3.26.freebsd.4.6.2.r iis.5.0.win32 apache.1.3.26.solaris.8 jigsaw.2.0.5.win32 apache.1.3.27.freebsd.4.7 jigsaw.2.2.0.win32 apache.1.3.27.freebsd.5.0 jigsaw.2.2.2.solaris.8 apache.1.3.27.mac.10.1.5 ncsa.1.3.ultrix.4.4 apache.1.3.27.mac.10.2.4 thttpd.2.23beta1.freebsd.4.6.st apache.1.3.27.rhl.8.0 thttpd.2.23beta1.rhl.7.3 apache.1.3.9.win32 zope.2.6.0.solaris.8 apache.2.0.40.rhl.8.0
X		${INSTALL_DATA} ${WRKSRC}/known.servers/$i ${PREFIX}/share/hmap/
X.	endfor
X.	if !defined(NOPORTDOCS)
X		${MKDIR} ${DOCSDIR}
X.		for i in README BUGS GPL FAQS HIDING_GUIDE KNOWN_TESTS
X			${INSTALL_DATA} ${WRKSRC}/$i ${DOCSDIR}
X.		endfor
X.	endif
X
X.include <bsd.port.mk>
END-of-./Makefile
echo x - ./distinfo
sed 's/^X//' >./distinfo << 'END-of-./distinfo'
XMD5 (hmap.tar.gz) = 83db5c76e7f466d0901a37616fc215f6
END-of-./distinfo
echo x - ./pkg-descr
sed 's/^X//' >./pkg-descr << 'END-of-./pkg-descr'
X"hmap" is a tool for fingerprinting web servers.  Basically, it collects
Xa number of characteristics and compares them with known profiles to find
Xa closest match.  The closest match is its best guess for the identity of
Xthe server.
X
XWWW: http://wwwcsif.cs.ucadvis.edu/~leed/hmap/
END-of-./pkg-descr
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/patch-hmap.py
sed 's/^X//' >./files/patch-hmap.py << 'END-of-./files/patch-hmap.py'
X--- hmap.py.orig	Wed Apr  9 14:47:16 2003
X+++ hmap.py	Wed Apr  9 14:50:45 2003
X@@ -859,7 +859,7 @@
X     sys.exit()
X 
X known_servers = []
X-for f in glob.glob('known.servers/*'):
X+for f in glob.glob('PREFIX/share/hmap/*'):
X     ksf = file(f)
X     ks = eval(ksf.read())
X     known_servers.append(ks)
END-of-./files/patch-hmap.py
echo x - ./pkg-plist
sed 's/^X//' >./pkg-plist << 'END-of-./pkg-plist'
X@comment $FreeBSD$
Xbin/hmap.py
Xshare/hmap/apache.1.3.12.win32
Xshare/hmap/apache.2.0.44.win32
Xshare/hmap/apache.1.3.14.win32
Xshare/hmap/badblue.2.1.win32
Xshare/hmap/apache.1.3.17.win32
Xshare/hmap/dwhttpd.4.1a6.solaris.8
Xshare/hmap/apache.1.3.22.win32
Xshare/hmap/hpws.2.00.1454.solaris.8
Xshare/hmap/apache.1.3.23.rhl.7.3
Xshare/hmap/ibm_http_server.2.0.42.win32
Xshare/hmap/apache.1.3.26.freebsd.4.6.2.r
Xshare/hmap/iis.5.0.win32
Xshare/hmap/apache.1.3.26.solaris.8
Xshare/hmap/jigsaw.2.0.5.win32
Xshare/hmap/apache.1.3.27.freebsd.4.7
Xshare/hmap/jigsaw.2.2.0.win32
Xshare/hmap/apache.1.3.27.freebsd.5.0
Xshare/hmap/jigsaw.2.2.2.solaris.8
Xshare/hmap/apache.1.3.27.mac.10.1.5
Xshare/hmap/ncsa.1.3.ultrix.4.4
Xshare/hmap/apache.1.3.27.mac.10.2.4
Xshare/hmap/thttpd.2.23beta1.freebsd.4.6.st
Xshare/hmap/apache.1.3.27.rhl.8.0
Xshare/hmap/thttpd.2.23beta1.rhl.7.3
Xshare/hmap/apache.1.3.9.win32
Xshare/hmap/zope.2.6.0.solaris.8
Xshare/hmap/apache.2.0.40.rhl.8.0
X%%PORTDOCS%%share/doc/hmap/README
X%%PORTDOCS%%share/doc/hmap/BUGS
X%%PORTDOCS%%share/doc/hmap/GPL
X%%PORTDOCS%%share/doc/hmap/FAQS
X%%PORTDOCS%%share/doc/hmap/HIDING_GUIDE
X%%PORTDOCS%%share/doc/hmap/KNOWN_TESTS
X%%PORTDOCS%%@dirrm share/doc/hmap
END-of-./pkg-plist
exit
--- hmap.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304091547.h39FloM02950>