41 lines
1.7 KiB
Ruby
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-02-05",
|
|
revision: "30be17345377c401be67f7e91a93e9f1484edf8a"
|
|
version "2022-02-05"
|
|
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: "baa98c9185d603e7e0fa42dfdbb8b5a38ebd4d9089e4d7c877776c012a29f905"
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "4efda49aba04cc1e233a074fe8d9a9db9e762a774c7dfec81695b0b83a0d62c8"
|
|
sha256 cellar: :any_skip_relocation, monterey: "57c1c712658b992cbd39fdeaf4ad7cb6c9fe78bf55d6b34e73382e90cae26ded"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "a815bf4ad24b8ffe02880871b858a934739af974ec40d8d9405a8420b231929d"
|
|
sha256 cellar: :any_skip_relocation, catalina: "4f9b47040eee92054c385264b4e1c2b57c31191af6d9fc80e3cb23ae28885369"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "4c414281033b807992e13ecb447d69997c6b2b970f990ab26cfef4f118bf38e8"
|
|
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
|