homebrew-core/Formula/exploitdb.rb

43 lines
2.0 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: "2022-11-22",
revision: "225f9878ca58fc0ef8d954ed16a8997af514662b"
version "2022-11-22"
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: "4f203676d5ff835f64ed7fdbb636a4a03ba2e5176a7cf27a4208d25eb16960f0"
sha256 cellar: :any_skip_relocation, arm64_monterey: "f09a70cf4c27fbafb66a3fe28ec9e7e92d009fd3669da43c5d1090fbaae8cd2b"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "41bf06973173ea0f1702dbce7afe07f32b8270d621bf09f07f3f616ab3dc6457"
sha256 cellar: :any_skip_relocation, ventura: "f9be9fbce7cb487d3beea83348f7e6fd4a5f24f38453b5ebf0fd9afa3b739922"
sha256 cellar: :any_skip_relocation, monterey: "640b0eff9bb83faa375291ea9cd0d5c7797159b693a9cdf9c4b4e6823e63c14d"
sha256 cellar: :any_skip_relocation, big_sur: "f11dfbbca5a0a680f54ca2feb7f62e70901d868001f8377ce9bea4404e367334"
sha256 cellar: :any_skip_relocation, catalina: "6abed5399584b4119b060d34831752821b33a43d24a50661d17dbaa5313dfa77"
sha256 cellar: :any_skip_relocation, x86_64_linux: "769cc1d14c21ee6930531ae1be47ff92494da246b92223070ee5a6ca67c3b015"
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