homebrew-core/Formula/exploitdb.rb

41 lines
1.7 KiB
Ruby

class Exploitdb < Formula
desc "Database of public exploits and corresponding vulnerable software"
homepage "https://www.exploit-db.com/"
url "https://github.com/offensive-security/exploitdb.git",
tag: "2022-10-07",
revision: "4d6a64eb6bd39cb2ce182dc0eca03d69a490a6f2"
version "2022-10-07"
license "GPL-2.0-or-later"
head "https://github.com/offensive-security/exploitdb.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "0e70a802cbf33a5478a4902277fdc55a4c402571f6fa9c7aca63f1e95559be45"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "489efde481f0d09a245ff9557e8f430b2ffe342f03b000d71bfc11a4267ef280"
sha256 cellar: :any_skip_relocation, monterey: "d0950e380acf5b2f3bfe528be0ea403f2dd4b87980919582a3f63f576c10f6ab"
sha256 cellar: :any_skip_relocation, big_sur: "02df76216d0cc143e74173aec0558bf76147954b83ef0585d6b7e63632316f92"
sha256 cellar: :any_skip_relocation, catalina: "da860d2edd29ff2e6f62f8f35d3594c710431b2afa40a829a2c4971210251ebe"
sha256 cellar: :any_skip_relocation, x86_64_linux: "852603ef1a7beef98017f2afbcc566c6fb903e129f234ed375f66dd89b7e25c0"
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