aboutsummaryrefslogtreecommitdiffstats
path: root/security/nikto
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2005-12-14 18:06:32 +0800
committergarga <garga@FreeBSD.org>2005-12-14 18:06:32 +0800
commitb7020e8e2c2607ac4e66bfe658d3dbabca59dcc0 (patch)
treed28f3510c32f4146d40e0596e2426983437e37fa /security/nikto
parentd4f1b1f9f0593e12afdc8d12c146e920907523f9 (diff)
downloadfreebsd-ports-gnome-b7020e8e2c2607ac4e66bfe658d3dbabca59dcc0.tar.gz
freebsd-ports-gnome-b7020e8e2c2607ac4e66bfe658d3dbabca59dcc0.tar.zst
freebsd-ports-gnome-b7020e8e2c2607ac4e66bfe658d3dbabca59dcc0.zip
- Un-BREAK by using version-ed file-name for DISTFILES
- Add MASTER_SITES mirrors - Use USE_PERL and reinplace hardcoded path for perl - OPTIONally run-depend on security/p5-Net-SSLeay and security/nmap - Install config.txt as nikto.conf (and replace references to config.txt in all appropriate places) - Use INSTALL_DATA for plugins - Bump PORTREVISION - Pass maintainership to submitter - Make some changes to preserve nikto.conf when it's changed and install nikto.conf.sample [1] PR: 90344 Submitted by: Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com> Reviewed by: garga [1]
Diffstat (limited to 'security/nikto')
-rw-r--r--security/nikto/Makefile58
-rw-r--r--security/nikto/distinfo5
-rw-r--r--security/nikto/pkg-plist5
3 files changed, 47 insertions, 21 deletions
diff --git a/security/nikto/Makefile b/security/nikto/Makefile
index a753a8ad5e59..c72caf2ac423 100644
--- a/security/nikto/Makefile
+++ b/security/nikto/Makefile
@@ -4,43 +4,67 @@
#
# $FreeBSD$
#
+# $Tecnik: ports/security/nikto/Makefile,v 1.7 2005/12/13 16:26:20 itetcu Exp $
+#
PORTNAME= nikto
PORTVERSION= 1.35
+PORTREVISION= 1
CATEGORIES= security www
-MASTER_SITES= http://www.cirt.net/nikto/ \
- ftp://ftp.bay13.net/pub/wiretapped/vulnerability-assessment/nikto/ \
- http://mirror1.internap.com/pub/localareasecurity/wiretapped/vulnerability-assessment/nikto/ \
- ftp://ftp.localareasecurity.com/pub/wiretapped/vulnerability-assessment/nikto/ \
- http://www.mirrors.wiretapped.net/security/vulnerability-assessment/nikto/
+MASTER_SITES= http://www.cirt.net/${PORTNAME}/ \
+ http://www.mirrors.wiretapped.net/security/vulnerability-assessment/${PORTNAME}/ \
+ http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sources/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= itetcu@people.tecnik93.com
COMMENT= Web and CGI vulnerability scanner with SSL support
-BROKEN= Size mismatch
-
+USE_BZIP2= yes
+USE_PERL5_RUN= yes
NO_BUILD= yes
USE_REINPLACE= yes
-PORTDOCS= nikto_usage.txt nikto_usage.html CHANGES.txt README_plugins.txt
+PORTDOCS= CHANGES.txt README_plugins.txt nikto_usage.html nikto_usage.txt
+MAN1= ${PORTNAME}.1
+
+OPTIONS+= SSLEAY "Use NET::SSLeay for ssl scanning" on
+OPTIONS+= NMAP "Use security/nmap for port scanning" on
+
+.include <bsd.port.pre.mk>
+
+.ifdef(WITH_SSLEAY)
+RUN_DEPENEDS+= p5-Net-SSLeay>0:${PORTSDIR}/security/p5-Net-SSLeay
+.endif
+
+.ifdef(WITH_NMAP)
+RUN_DEPENEDS+= nmap:${PORTSDIR}/security/nmap
+.endif
post-patch:
- @${REINPLACE_CMD} -Ee 's,(config.txt),${PREFIX}/etc/nikto/\1,g' ${WRKSRC}/nikto.pl
+ @${REINPLACE_CMD} -e "s|/usr/local/bin/perl|${PERL}|" ${WRKSRC}/nikto.pl
+ @${REINPLACE_CMD} -Ee "s,(config.txt),${PREFIX}/etc/nikto.conf," ${WRKSRC}/nikto.pl
@${REINPLACE_CMD} -Ee "s|/usr/bin/nmap|${PREFIX}/bin/nmap|g" \
-e "s|# (PLUGINDIR=)/usr/local/nikto/plugins|\1${DATADIR}|g" \
${WRKSRC}/config.txt
+ @${REINPLACE_CMD} "s/config.txt/nikto.conf/g" ${WRKSRC}/plugins/* ${WRKSRC}/docs/*
+ @${MV} ${WRKSRC}/docs/nikto-1.34.man ${WRKSRC}/docs/nikto.1
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/nikto.pl ${PREFIX}/bin/nikto
- @${MKDIR} ${PREFIX}/etc/nikto
- ${INSTALL_DATA} ${WRKSRC}/config.txt ${PREFIX}/etc/nikto
+ ${INSTALL_DATA} ${WRKSRC}/config.txt ${PREFIX}/etc/nikto.conf.sample
+ [ -f ${PREFIX}/etc/nikto.conf ] || \
+ ${INSTALL_DATA} ${WRKSRC}/config.txt ${PREFIX}/etc/nikto.conf
@${MKDIR} ${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/plugins/* ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/plugins/LW.pm ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/plugins/*.db ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/plugins/nikto_plugin_order.txt ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/plugins/*.plugin ${DATADIR}
+
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for i in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR}
-.endfor
+. for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR}
+. endfor
.endif
+ ${INSTALL_MAN} ${WRKSRC}/docs/${MAN1} ${MAN1PREFIX}/man/man1
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/security/nikto/distinfo b/security/nikto/distinfo
index 954fcea6fd64..ce075505d7f5 100644
--- a/security/nikto/distinfo
+++ b/security/nikto/distinfo
@@ -1,2 +1,3 @@
-MD5 (nikto-1.35.tar.gz) = 908f6b5c670434324633db48bd4537cd
-SIZE (nikto-1.35.tar.gz) = 190033
+MD5 (nikto-1.35.tar.bz2) = 50d9c671a5285365bd93bcea7577950b
+SHA256 (nikto-1.35.tar.bz2) = b73d54e9b364f08b2e92753c7e53549a864f24bee13658efa47d201a298e404d
+SIZE (nikto-1.35.tar.bz2) = 166897
diff --git a/security/nikto/pkg-plist b/security/nikto/pkg-plist
index f0ef23857ef6..bd3fb3d67120 100644
--- a/security/nikto/pkg-plist
+++ b/security/nikto/pkg-plist
@@ -1,5 +1,7 @@
bin/nikto
-etc/nikto/config.txt
+@unexec if cmp -s %D/etc/nikto.conf %D/etc/nikto.conf.sample; then rm -f %D/etc/nikto.conf; fi
+etc/nikto.conf.sample
+@exec [ -f %B/nikto.conf ] || cp %B/%f %B/nikto.conf
%%DATADIR%%/nikto_mutate.plugin
%%DATADIR%%/nikto_outdated.plugin
%%DATADIR%%/nikto_apacheusers.plugin
@@ -20,4 +22,3 @@ etc/nikto/config.txt
%%DATADIR%%/servers.db
%%DATADIR%%/LW.pm
@dirrm %%DATADIR%%
-@dirrm etc/nikto