<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-05-18",
      revision: "cbee98ca482d81e3f88311a561cce55fba9fa72d"
  version "2022-05-18"
  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: "394dda15d21f72a7ac27d9954bc7778d2c8eae453bb8b5b7ca5a249f2e9be400"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "52117ea6619e388e0613d17dd6d92e018935142f0c3af9e3bb768a6b5fa5bafa"
    sha256 cellar: :any_skip_relocation, monterey:       "3f022b53891a7016b310f40eeae3c0049aaadd8313948cf94f28223a723f27c5"
    sha256 cellar: :any_skip_relocation, big_sur:        "8ff8d31b2a5393d23f873736a6b0cde63e52ff4f74eb37280b309364c9041c00"
    sha256 cellar: :any_skip_relocation, catalina:       "50aa7b1de123b0006caa23ac87f9943c6a444e0bdacfc99e8e1a9bda4d876664"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "cb0ddb9e44d13e5f30299dfdc952ba1bba170b051af548106466317ade092dcc"
  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<commit_msg>exploitdb: update 2022-05-18 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-05-18",
      revision: "cbee98ca482d81e3f88311a561cce55fba9fa72d"
  version "2022-05-18"
  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: "838f926a90ea3ebe08feb6bcdce8d8b41a3bdd33dc53aea3d5790a358362f52e"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "777018427285e3d02f9a36dc553700f207a40353fca29e9d64acfa187236469a"
    sha256 cellar: :any_skip_relocation, monterey:       "bd9a6eba220ffc93165000ff8b2000a324f8487e6421f7e0d1a5a53cc990887f"
    sha256 cellar: :any_skip_relocation, big_sur:        "66501ca6cd9103979ed738dd6af25b91453763501d31988eb10cbed49a9532eb"
    sha256 cellar: :any_skip_relocation, catalina:       "e95e02b03817c4b809d7c1428cfd057681e348aa0b04ccda84f2a529b91437e6"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f21077b02df92d436261d75c8dba2c829534d4731b989da163113b02a9876295"
  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
{'fraction_non_alphanumeric': 0.10230747845426745, 'fraction_numerical': 0.1743119266055046, 'mean_word_length': 4.3943028485757125, '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': '1314900', 'n_tokens_mistral': 1838, 'n_tokens_neox': 1455, 'n_words': 198}