class Exploitdb < Formula desc "The official Exploit Database" homepage "https://www.exploit-db.com/" url "https://github.com/offensive-security/exploit-database.git", :tag => "2018-04-05", :revision => "541446d964f236c0fd5ac5abf319009399e1aa9b" version "2018-04-05" head "https://github.com/offensive-security/exploit-database.git" bottle :unneeded def install inreplace "searchsploit", "rc_file=\"\"", "rc_file=\"#{etc}/searchsploit_rc\"" optpath = opt_share/"exploit-database" inreplace ".searchsploit_rc" do |s| s.gsub! "\"/opt/exploit-database\"", optpath s.gsub! "\"/opt/exploit-database-papers\"", "#{optpath}-papers" end bin.install "searchsploit" etc.install ".searchsploit_rc" => "searchsploit_rc" upshare = share/"exploit-database" upshare.install %w[.git exploits files_exploits.csv files_shellcodes.csv shellcodes] end test do system "#{bin}/searchsploit", "sendpage" end end