<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-12-04",
      revision: "34c9d56d78fe575bd409ab4b959b55a1ba0837f1"
  version "2021-12-04"
  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: "ca81e2b5596e14fef39a72de37238aa0eb3265644597419c20d308e56389b78d"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "6c27825b8cc870b25ed8fcfff77c521f85f6ba184f46f01b1c8864a6017a7c1a"
    sha256 cellar: :any_skip_relocation, monterey:       "d11311311158a60f4798ae415312d0069b6a3fc2a37c239ac1da6a87413b5871"
    sha256 cellar: :any_skip_relocation, big_sur:        "27fd435e848baaead841c30e0e2527d5270c94b0460332520da9ce43dd006d36"
    sha256 cellar: :any_skip_relocation, catalina:       "3b8482f04676f51ccba2c7a2c74206252bb0b323f86a3d96744b9b3bc6e7a37a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "8c172e4456544e0c081489a2224b8fa14899e938fd025fb43dbfdeb95a40b4dc"
  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<commit_msg>exploitdb 2021-12-07<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-12-07",
      revision: "0990eb4d3813bf2cecaf310920140eb40192c56d"
  version "2021-12-07"
  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: "ca81e2b5596e14fef39a72de37238aa0eb3265644597419c20d308e56389b78d"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "6c27825b8cc870b25ed8fcfff77c521f85f6ba184f46f01b1c8864a6017a7c1a"
    sha256 cellar: :any_skip_relocation, monterey:       "d11311311158a60f4798ae415312d0069b6a3fc2a37c239ac1da6a87413b5871"
    sha256 cellar: :any_skip_relocation, big_sur:        "27fd435e848baaead841c30e0e2527d5270c94b0460332520da9ce43dd006d36"
    sha256 cellar: :any_skip_relocation, catalina:       "3b8482f04676f51ccba2c7a2c74206252bb0b323f86a3d96744b9b3bc6e7a37a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "8c172e4456544e0c081489a2224b8fa14899e938fd025fb43dbfdeb95a40b4dc"
  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
{'fraction_non_alphanumeric': 0.10257930625555885, 'fraction_numerical': 0.1935962051586125, 'mean_word_length': 4.857638888888889, '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': '5482463', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1397, 'n_words': 180}