<commit_before>{ lib
, stdenv
, python3
, fetchFromGitHub
, makeWrapper
, medusa
}:

stdenv.mkDerivation rec {
  pname = "brutespray";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "x90skysn3k";
    repo = pname;
    rev = "${pname}-${version}";
    sha256 = "0lkm3fvx35ml5jh4ykjr2srq8qfajkmxwp4qfcn9xi58khk3asq3";
  };

  postPatch = ''
    substituteInPlace brutespray.py \
      --replace "/usr/share/brutespray" "$out/share/brutespray"
  '';

  dontBuild = true;
  nativeBuildInputs = [ python3.pkgs.wrapPython makeWrapper ];
  buildInputs = [ python3 ];

  installPhase = ''
    install -Dm0755 brutespray.py $out/bin/brutespray
    patchShebangs $out/bin
    patchPythonScript $out/bin/brutespray
    wrapProgram $out/bin/brutespray \
      --prefix PATH : ${lib.makeBinPath [ medusa ]}

    mkdir -p $out/share/brutespray
    cp -r wordlist/ $out/share/brutespray/wordlist
  '';

  meta = with lib; {
    homepage = "https://github.com/x90skysn3k/brutespray";
    description = "Tool to do brute-forcing from Nmap output";
    longDescription = ''
      This tool automatically attempts default credentials on found services
      directly from Nmap output.
    '';
    license = licenses.mit;
    maintainers = with maintainers; [ ma27 ];
  };
}
<commit_msg>brutespray: 1.7.0 -> 1.8<commit_after>{ lib
, stdenv
, python3
, fetchFromGitHub
, makeWrapper
, medusa
}:

stdenv.mkDerivation rec {
  pname = "brutespray";
  version = "1.8";

  src = fetchFromGitHub {
    owner = "x90skysn3k";
    repo = pname;
    rev = "${pname}-${version}";
    sha256 = "sha256-hlFp2ZQnoydxF2NBCjSKtmNzMj9V14AKrNYKMF/8m70=";
  };

  postPatch = ''
    substituteInPlace brutespray.py \
      --replace "/usr/share/brutespray" "$out/share/brutespray"
  '';

  dontBuild = true;
  nativeBuildInputs = [ python3.pkgs.wrapPython makeWrapper ];
  buildInputs = [ python3 ];

  installPhase = ''
    install -Dm0755 brutespray.py $out/bin/brutespray
    patchShebangs $out/bin
    patchPythonScript $out/bin/brutespray
    wrapProgram $out/bin/brutespray \
      --prefix PATH : ${lib.makeBinPath [ medusa ]}

    mkdir -p $out/share/brutespray
    cp -r wordlist/ $out/share/brutespray/wordlist
  '';

  meta = with lib; {
    homepage = "https://github.com/x90skysn3k/brutespray";
    description = "Tool to do brute-forcing from Nmap output";
    longDescription = ''
      This tool automatically attempts default credentials on found services
      directly from Nmap output.
    '';
    license = licenses.mit;
    maintainers = with maintainers; [ ma27 ];
  };
}

{'fraction_non_alphanumeric': 0.12383177570093458, 'fraction_numerical': 0.02764797507788162, 'mean_word_length': 3.1235955056179776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '4658116', 'n_tokens_mistral': 983, 'n_tokens_neox': 943, 'n_words': 184}