homebrew-core/Formula/exploitdb.rb
2018-07-16 09:26:55 +10:00

33 lines
1,012 B
Ruby

class Exploitdb < Formula
desc "The official Exploit Database"
homepage "https://www.exploit-db.com/"
url "https://github.com/offensive-security/exploit-database.git",
:tag => "2018-07-14",
:revision => "b374aca9a36d0410c46d773f941382ad896c98df"
version "2018-07-14"
head "https://github.com/offensive-security/exploit-database.git"
bottle :unneeded
def install
inreplace "searchsploit",
"rc_file=\"\"", "rc_file=\"#{etc}/searchsploit_rc\""
optpath = opt_share/"exploit-database"
inreplace ".searchsploit_rc" do |s|
s.gsub! "\"/opt/exploit-database\"", optpath
s.gsub! "\"/opt/exploit-database-papers\"", "#{optpath}-papers"
end
bin.install "searchsploit"
etc.install ".searchsploit_rc" => "searchsploit_rc"
upshare = share/"exploit-database"
upshare.install %w[.git exploits files_exploits.csv files_shellcodes.csv
shellcodes]
end
test do
system "#{bin}/searchsploit", "sendpage"
end
end