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-03-03", revision: "b35005d47b1caaea03ca2bb5f7df7ac716139ee0" version "2021-03-03" license "GPL-2.0-or-later" head "https://github.com/offensive-security/exploitdb.git" bottle :unneeded 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