homebrew-core/Formula/exploitdb.rb

40 lines
1.6 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: "2021-10-09",
revision: "caf7ab9c86e80ee65c0ad51e730d05b7c56f12b7"
version "2021-10-09"
license "GPL-2.0-or-later"
head "https://github.com/offensive-security/exploitdb.git"
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "399c90910ff3aa5c48b714a8805f0bd85f9a6d9d14ed2c661cf063168fe37e38"
sha256 cellar: :any_skip_relocation, big_sur: "b63e3b832003f7df45857b2ef263e52ad59046d9b682cca37268b807000e9c27"
sha256 cellar: :any_skip_relocation, catalina: "de32d14fdbdd2089c94836fac2acd0f9d42f061780c179c3ca113d0a17763682"
sha256 cellar: :any_skip_relocation, mojave: "179b31483ef65997ab1d55a570c279c6b01d633b7dcd81f7a1660f3b24903327"
sha256 cellar: :any_skip_relocation, x86_64_linux: "99fa7e651d4be81b9ad993967573cf0b4d735816bd4dd8e38d8e50ed0e268827"
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