Web server fingerprinting tool, used to identify web servers that changed thier banners. 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. How-To-Repeat: N/A
I accept your changes, with one note and one exception: -post-patch: +pre-patch: =20 Besides moving the files to the right locations, we have to accomplish two tasks: 1. remove ^Ms. 2. teach the script about the new location of the server signatures. The first is accomplished with the ${TR} -d "\r" line, and the second with the patch and ${REINPLACE_CMD} -e line. In the original shar, the patch contains ^Ms and that is why ${TR} needs to be in post-patch. It's trivial to remove the ^Ms from the patch and run the ${TR} in pre-patch. I have no preference. note: The use of "@comment $FreeBSD$" in pkg-plist is unclear to me. I don't know why its there in the first place, and why isn't it constant in different ports. It would be best to decide on a policy, drop a note to ports@ and update the docs.
On Tue, Jun 24, 2003 at 10:50:53AM +0300, Yonatan Bokovza wrote: > I accept your changes, with one note and one exception: > -post-patch: > +pre-patch: > > Besides moving the files to the right locations, we have > to accomplish two tasks: > 1. remove ^Ms. > 2. teach the script about the new location of the server > signatures. > > The first is accomplished with the > ${TR} -d "\r" > line, and the second with the patch and > ${REINPLACE_CMD} -e > line. > > In the original shar, the patch contains ^Ms and that > is why ${TR} needs to be in post-patch. > It's trivial to remove the ^Ms from the patch and run > the ${TR} in pre-patch. > I have no preference. > > note: > The use of "@comment $FreeBSD$" in pkg-plist is unclear > to me. I don't know why its there in the first place, > and why isn't it constant in different ports. > It would be best to decide on a policy, drop a note to > ports@ and update the docs. Hmm, but it's impossible to apply the patch if I use pre-patch; =============================================================== ===> Extracting for hmap-0.1 >> Checksum OK for hmap.tar.gz. ===> Patching for hmap-0.1 ===> Applying FreeBSD patches for hmap-0.1 1 out of 1 hunks failed--saving rejects to hmap.py.rej >> Patch patch-hmap.py failed to apply cleanly. *** Error code 1 =============================================================== foxfair
Another go. Homepage moved, patch fixed, comment removed from plist, DOCSDIR is used in plist. Thanks for your patience. # 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=3D hmap XPORTVERSION=3D 0.1 XCATEGORIES=3D security XMASTER_SITES=3D http://ujeni.murkyroc.com/hmap/code/current/ \ X http://wwwcsif.cs.ucdavis.edu/~leed/hmap/code/current/ XDISTNAME=3D ${PORTNAME} X XMAINTAINER=3D Yonatan@xpert.com XCOMMENT=3D Web server fingerprinting utility X XRUN_DEPENDS=3D python:${PORTSDIR}/lang/python X XNO_WRKSUBDIR=3D yes XNO_BUILD=3D yes XUSE_REINPLACE=3D yes X Xpre-patch: X ${CP} ${WRKSRC}/hmap.py ${WRKSRC}/hmap.py.old X ${TR} -d "\r" < ${WRKSRC}/hmap.py.old > ${WRKSRC}/hmap.py X Xpost-patch: 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) =3D 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://ujeni.murkyroc.com/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=20 X known_servers =3D [] X-for f in glob.glob('known.servers/*'): X+for f in glob.glob('PREFIX/share/hmap/*'): X ksf =3D file(f) X ks =3D 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' 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%%%%DOCSDIR%%/README X%%PORTDOCS%%%%DOCSDIR%%/BUGS X%%PORTDOCS%%%%DOCSDIR%%/GPL X%%PORTDOCS%%%%DOCSDIR%%/FAQS X%%PORTDOCS%%%%DOCSDIR%%/HIDING_GUIDE X%%PORTDOCS%%%%DOCSDIR%%/KNOWN_TESTS X%%PORTDOCS%%@dirrm share/doc/hmap X@dirrm share/hmap END-of-./pkg-plist exit
State Changed From-To: open->closed Commited, thanks! programmers these days... [~/ports/net/xprobe/files] edwin@ref5>hmap.py Traceback (most recent call last): File "/home/edwin/local-5/bin/hmap.py", line 839, in ? target_url = args[0] IndexError: list index out of range