<commit_before>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-11-12",
      revision: "5310d503ac341baefb8993308dfcab09636abaa3"
  version "2021-11-12"
  license "GPL-2.0-or-later"
  head "https://github.com/offensive-security/exploitdb.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "09ce755a1db76215e921a044dd0715d1e7461d51638b7caef7cbacf51dbccf5e"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "577dd4481f69c104cf9c565859248b397abae270b15d56068d28dc4a2344e120"
    sha256 cellar: :any_skip_relocation, monterey:       "1907c8c40d014ca10c9a831d26bdc1ed5d0c14752caa834f2c841e3fc56acfe8"
    sha256 cellar: :any_skip_relocation, big_sur:        "82db9329bce5c1db923ba39b76c4a714034ca0878571c49ac6359c0edf19d7c4"
    sha256 cellar: :any_skip_relocation, catalina:       "870c73442bb8b8708c7977c14f390a19dc95e9f34122c12924eb84f8a26f3a6e"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "03b0e2f68ce416ec8153a812c7ef92fb3b7628ea2d1ae3869fe78a5a242e1a8b"
  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
<commit_msg>exploitdb 2021-11-13<commit_after>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-11-13",
      revision: "a7e24bac978cb6807ab86db5b72f39d7b85afe22"
  version "2021-11-13"
  license "GPL-2.0-or-later"
  head "https://github.com/offensive-security/exploitdb.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "09ce755a1db76215e921a044dd0715d1e7461d51638b7caef7cbacf51dbccf5e"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "577dd4481f69c104cf9c565859248b397abae270b15d56068d28dc4a2344e120"
    sha256 cellar: :any_skip_relocation, monterey:       "1907c8c40d014ca10c9a831d26bdc1ed5d0c14752caa834f2c841e3fc56acfe8"
    sha256 cellar: :any_skip_relocation, big_sur:        "82db9329bce5c1db923ba39b76c4a714034ca0878571c49ac6359c0edf19d7c4"
    sha256 cellar: :any_skip_relocation, catalina:       "870c73442bb8b8708c7977c14f390a19dc95e9f34122c12924eb84f8a26f3a6e"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "03b0e2f68ce416ec8153a812c7ef92fb3b7628ea2d1ae3869fe78a5a242e1a8b"
  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

{'fraction_non_alphanumeric': 0.10192147034252297, 'fraction_numerical': 0.17293233082706766, 'mean_word_length': 4.377245508982036, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7179289', 'n_tokens_mistral': 1839, 'n_tokens_neox': 1473, 'n_words': 199}