<commit_before>class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploitdb.git",
      :tag      => "2020-05-30",
      :revision => "326e1cc9df21af6ce7c9a470f6d33fae7e56b0dc"
  version "2020-05-30"
  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
<commit_msg>exploitdb 2020-06-02 (#55664)<commit_after>class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploitdb.git",
      :tag      => "2020-06-02",
      :revision => "b68cd4f38a9dbf2fb16c4398150a0503521fa697"
  version "2020-06-02"
  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

{'fraction_non_alphanumeric': 0.14642857142857144, 'fraction_numerical': 0.04642857142857143, 'mean_word_length': 3.026694045174538, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4697688', 'n_tokens_mistral': 807, 'n_tokens_neox': 702, 'n_words': 122}