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-02",
revision: "24da8dd701cd2beb7e26ef46220fad60bc70cecc"
version "2023-02-02"
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: "fe0a0d03ab8095fb760c1c867c02f764d5b0710d982ddc92583a89739c6baa04"
sha256 cellar: :any_skip_relocation, arm64_monterey: "9878a0b457832576ab77cdaec7b48b5ab47d2b3eee0952e8f32448c34645eb72"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "0b8f5ea473ce893f5e127ed964cf4d7962d43652bd6f4548256dc00593daf744"
sha256 cellar: :any_skip_relocation, ventura: "3e221787a13f70951912e9d7031699759591583b8b8af82a76feebee8e6fdbaf"
sha256 cellar: :any_skip_relocation, monterey: "d439c9b12cd3a074a946409d59de5e3a3338421aed3afd7965f6f74ae8e39cf2"
sha256 cellar: :any_skip_relocation, big_sur: "d7885d6d76bd6f52ef0d078fe3948a918a33042e8b36c8ae47a59484b7a39f57"
sha256 cellar: :any_skip_relocation, x86_64_linux: "fc62cee4862a7485be868e2cea4192ffb64724da4fa5cb97fdae27e11eac1eda"
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