nixos-config/pkgs/security-wordlists.nix

38 lines
977 B
Nix
Raw Normal View History

2021-11-18 05:17:43 +00:00
{ lib
2022-04-08 14:33:43 +00:00
, curl
2021-11-18 05:17:43 +00:00
, fetchFromGitHub
, nmap
, runCommand
, wfuzz
}:
let
seclists = fetchFromGitHub {
owner = "danielmiessler";
repo = "SecLists";
2022-07-24 16:18:18 +00:00
rev = "2022.2";
sha256 = "Xi4FsrVYioR5HBVJzo0bug5ETgV2mCtulPOpBXm+Y1s=";
2021-11-18 05:17:43 +00:00
};
2022-04-08 14:33:43 +00:00
dirbuster = runCommand "dirbuster"
2021-11-18 05:17:43 +00:00
{
2022-04-08 14:33:43 +00:00
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0l2sgagdxahqi7zqqw9v9v9g2gmqbdl2cyz0rvlmc4di6crdn36s";
2021-11-18 05:17:43 +00:00
}
2022-04-08 14:33:43 +00:00
''
url="https://gitlab.com/kalilinux/packages/dirbuster/-/archive/upstream/1.0/dirbuster-upstream-1.0.tar.gz"
mkdir $out
${curl}/bin/curl --insecure "$url" |
tar -C$out -xvz --strip-components=1 --wildcards '*.txt'
'';
2021-11-18 05:17:43 +00:00
in
runCommand "wordlists" { } ''
mkdir -p $out/share/wordlists
ln -s ${wfuzz.src}/wordlist $out/share/wordlists/wfuzz
2022-07-24 16:18:18 +00:00
ln -s ${nmap}/share/nmap/nselib/data $out/share/wordlists/nmap
2021-11-18 05:17:43 +00:00
ln -s ${seclists} $out/share/wordlists/seclists
ln -s ${dirbuster} $out/share/wordlists/dirbuster
''