<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      => "2019-10-24",
      :revision => "afafb6c641f562b99795844ea3565b23232a297b"
  version "2019-10-24"
  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 2019-10-25 (#45806)<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      => "2019-10-25",
      :revision => "52e6461f47ae3285f90c49f00901daabeb4bc755"
  version "2019-10-25"
  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.14657814096016344, 'fraction_numerical': 0.04954034729315628, 'mean_word_length': 3.0391752577319586, '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': '767621', 'n_tokens_mistral': 807, 'n_tokens_neox': 693, 'n_words': 121}