<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-09-16",
      revision: "723d6685ec889bb59b0704113686c66f5addecf8"
  version "2021-09-16"
  license "GPL-2.0-or-later"
  head "https://github.com/offensive-security/exploitdb.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "8ebc58bbd86e6858c75ec46646600641d3a331063278713adeed2f5f2b809e39"
    sha256 cellar: :any_skip_relocation, big_sur:       "ddb39a0977e646a368565e7e70edc32e9a1f4bb384a785c0644560f00e348d9a"
    sha256 cellar: :any_skip_relocation, catalina:      "560fb338ffaa04916d0ce271b32d94cc83ba3eac8afa647ab175d429133720c9"
    sha256 cellar: :any_skip_relocation, mojave:        "0ab2358cc751e44e2f592e19105ff8162ed006a5b8bbc0e3365f9e8c16dd3362"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "356f3788229671f7515be36af45cad61017fce058190713388a72ab8cdde7763"
  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]<commit_msg>exploitdb 2021-09-18<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-09-18",
      revision: "769a5959a9647800a3f7221611a260881ce4ac6e"
  version "2021-09-18"
  license "GPL-2.0-or-later"
  head "https://github.com/offensive-security/exploitdb.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "8ebc58bbd86e6858c75ec46646600641d3a331063278713adeed2f5f2b809e39"
    sha256 cellar: :any_skip_relocation, big_sur:       "ddb39a0977e646a368565e7e70edc32e9a1f4bb384a785c0644560f00e348d9a"
    sha256 cellar: :any_skip_relocation, catalina:      "560fb338ffaa04916d0ce271b32d94cc83ba3eac8afa647ab175d429133720c9"
    sha256 cellar: :any_skip_relocation, mojave:        "0ab2358cc751e44e2f592e19105ff8162ed006a5b8bbc0e3365f9e8c16dd3362"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "356f3788229671f7515be36af45cad61017fce058190713388a72ab8cdde7763"
  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]
{'fraction_non_alphanumeric': 0.10409393843224374, 'fraction_numerical': 0.1783560774357347, 'mean_word_length': 4.270903010033445, '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': '726362', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1253, 'n_words': 168}