<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:      "2022-07-22",
      revision: "46346f8944f5d01e09a8ed3d78e34cf759697b47"
  version "2022-07-22"
  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: "4bbdc5da9debf0818863a79d4f0466edcc68e9df461ee1f902182111ef71089a"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "ba3acef2219101f29cdeeea81807b09a7c28ca14ff9e9823bcf72ad380109ddd"
    sha256 cellar: :any_skip_relocation, monterey:       "2bb73d348c5b5d2c86e66a5abaa97639ff4b3f7ad32be0452a4e53ba74afad66"
    sha256 cellar: :any_skip_relocation, big_sur:        "f2c74549d3d2dec18279ac6357d8577a6594df9998e0e656cbd47f9a42651b49"
    sha256 cellar: :any_skip_relocation, catalina:       "eb22f98b9a7608fb400db8bd3d489c9974eb47f293a9f34d0efebc166fd0e48d"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f25d9a9d56eb40f841942729e64ee51107f77a5c77bf011cbe265feeaa527c58"
  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: update 2022-07-22 bottle.<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:      "2022-07-22",
      revision: "46346f8944f5d01e09a8ed3d78e34cf759697b47"
  version "2022-07-22"
  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: "5d0fdf21f012adc449c1e93e8b6bd487abd5f6fcac7301ed99effb16beddb5e4"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "d0efa552cf646f819f5b72f8e6b34e341fd9281b8c8b6c8b86683a2630023996"
    sha256 cellar: :any_skip_relocation, monterey:       "7743ccaedcf3b5f501dd24f586d7fbd1f05898623751a1e3852ae1d82cc8b427"
    sha256 cellar: :any_skip_relocation, big_sur:        "506f2d695d052bcf2eb36563fdcfa34108b10a0440bf5059c5f7490700eebaad"
    sha256 cellar: :any_skip_relocation, catalina:       "70109c76b40f61eb104cd3f21b1a45ac6c2290b712bf5f90b2e07f2a49c1ef40"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "783a0165614a9f279176dfa2ed308a35855cf0231d82d6dd352854250c6975f4"
  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.10208044382801665, 'fraction_numerical': 0.17115117891816922, 'mean_word_length': 4.390134529147982, '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': '6497525', 'n_tokens_mistral': 1836, 'n_tokens_neox': 1468, 'n_words': 200}