homebrew-core/Formula/exploitdb.rb

42 lines
1.8 KiB
Ruby

class Exploitdb < Formula
desc "Database of public exploits and corresponding vulnerable software"
homepage "https://www.exploit-db.com/"
url "https://gitlab.com/exploit-database/exploitdb.git",
tag: "2023-02-14",
revision: "80ff1acba5e95f9bcf11658472d48a177b035bcf"
version "2023-02-14"
license "GPL-2.0-or-later"
head "https://gitlab.com/exploit-database/exploitdb.git", branch: "main"
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "bd562d715972ed2db8c025117e8c85bc1501932a3566de843c3e877f1ab115e3"
sha256 cellar: :any_skip_relocation, arm64_monterey: "afd7322a8655f5c98b139aef960062a3117a43d590b52dcd1d4d005c4bf5455c"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "cd021547810218fc4b2806f31bd5214c339811342c5a7854c242683ae4defbf4"
sha256 cellar: :any_skip_relocation, ventura: "449876dc46d81576452c1a11133d72e68205502414f655f9535617c0aaec974a"
sha256 cellar: :any_skip_relocation, monterey: "cb5ebdf8e85aa06595548bc24f20e5d6564deeee631587f9091ebe46c1628754"
sha256 cellar: :any_skip_relocation, big_sur: "1f5ed0156a9ee0e45ec745042edb820dbc4f4bbcb38bcadb57385d82004c3c34"
sha256 cellar: :any_skip_relocation, x86_64_linux: "ff8add5424d64ecb441ae783fa511ff6713f2eb864aba7b24758f4c716aa3ce9"
end
def install
inreplace "searchsploit",
"rc_file=\"\"", "rc_file=\"#{etc}/searchsploit_rc\""
optpath = opt_share/"exploitdb"
inreplace ".searchsploit_rc" do |s|
s.gsub! "\"/opt/exploitdb\"", optpath
s.gsub! "\"/opt/exploitdb-papers\"", "#{optpath}-papers"
end
bin.install "searchsploit"
etc.install ".searchsploit_rc" => "searchsploit_rc"
pkgshare.install %w[.git exploits files_exploits.csv files_shellcodes.csv
shellcodes]
end
test do
system "#{bin}/searchsploit", "sendpage"
end
end