33 lines
1,017 B
Ruby
33 lines
1,017 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-08-18",
|
|
:revision => "16744756bc5f01071041e2a03a30732cde65efc4"
|
|
version "2018-08-18"
|
|
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
|