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-09-22",
revision: "3d2fa2f00a1814f3cff7664acee8b0cf8569300d"
version "2022-09-22"
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: "2355e303039edda43a9075606d9576b3b73144c73f353c500a29b7aea2892029"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "1e2cbffaf2e4f6744dec01070433b857119d16f7d44126564114f29abe0a6729"
sha256 cellar: :any_skip_relocation, monterey: "a54dc6745d41d94316d06be3ed8759c90af7b643cec8f73668101d8f963cf827"
sha256 cellar: :any_skip_relocation, big_sur: "3c8cf09c98c9fcedd10291cd381ee23a7d46fa9ca242bd15135f2571b45749a0"
sha256 cellar: :any_skip_relocation, catalina: "dade726e26413b9b23e416e6b2d479436b2c2c30161bd64ff017e29b3ff48e2d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4239ea78e1e01ba7339528b8aafb0a9994275dc74a33c970caccc935d0290fb9"
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