aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDenis Dzyubenko2014-12-22 12:24:15 +0100
committerMike McQuaid2014-12-22 13:20:57 +0000
commita099241f4dcc95ee4b1d76a16b67527586570fa8 (patch)
tree3273f5fdcda1133e6027c83b0b4def6e661bf694 /Library/Formula
parent461a0aebb48f24ccb43c503619b338f088e8c04a (diff)
downloadhomebrew-a099241f4dcc95ee4b1d76a16b67527586570fa8.tar.bz2
new formula: nikto
formula shamelessly stolen from Homebrew/homebrew#28537 and updated which is in turn a formula shamelessly stolen from Homebrew/homebrew#11055 and updated Closes #35182. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/nikto.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/nikto.rb b/Library/Formula/nikto.rb
new file mode 100644
index 000000000..0491d6d93
--- /dev/null
+++ b/Library/Formula/nikto.rb
@@ -0,0 +1,32 @@
+require "formula"
+
+class Nikto < Formula
+ homepage "http://cirt.net/nikto2"
+ url "https://www.cirt.net/nikto/nikto-2.1.5.tar.bz2"
+ sha1 "9fafa51f630ce241aff58b217882e514d577939f"
+
+ def install
+ # adjust default paths in perl script
+ inreplace "nikto.pl", "/etc/nikto.conf", "#{etc}/nikto.conf"
+
+ # adjust default paths in configuration file
+ inreplace "nikto.conf" do |s|
+ s.gsub! "# EXECDIR=/opt/nikto", "EXECDIR=#{prefix}"
+ s.gsub! "# PLUGINDIR=/opt/nikto/plugins", "PLUGINDIR=#{prefix}/plugins"
+ s.gsub! "# DBDIR=/opt/nikto/databases", "DBDIR=#{var}/lib/nikto/databases"
+ s.gsub! "# TEMPLATEDIR=/opt/nikto/templates", "TEMPLATEDIR=#{prefix}/templates"
+ s.gsub! "# DOCDIR=/opt/nikto/docs", "DOCDIR=#{prefix}/docs"
+ end
+
+ bin.install "nikto.pl" => "nikto"
+ etc.install "nikto.conf"
+ man1.install "docs/nikto.1"
+ share.install "docs"
+ prefix.install "plugins", "templates"
+ (var+"lib/nikto/databases").mkpath
+ end
+
+ def post_install
+ system "#{bin}/nikto", "-update"
+ end
+end