Add wordlists

mistress
bad 2 years ago
parent 2b80fceac4
commit d9df670492

@ -17,7 +17,7 @@
flake-utils.lib.eachDefaultSystem
(system:
let
nixpkgs = import self.inputs.nixpkgs { system = system; };
nixpkgs = import self.inputs.nixpkgs { system = system; config.allowUnfree = true; };
in
rec {
packages.jwt-tool = (import ./jwt-tool.nix { inherit nixpkgs jwt-tool; });
@ -30,6 +30,7 @@
type = "app";
program = "${packages.pycdc}/bin/pycdc";
};
packages.wordlists = (nixpkgs.callPackage ./wordlists/default.nix {} );
}
);
}

@ -0,0 +1,53 @@
{ callPackage
, lib
, pkgs
, runtimeShell
, symlinkJoin
, tree
, wfuzz
}:
let
scopedWordlists = lib.makeScope pkgs.newScope (_:
{
dirbuster = callPackage ./dirbuster.nix { };
nmap = callPackage ./nmap.nix { };
rockyou = callPackage ./rockyou.nix { };
seclists = callPackage ./seclists.nix { };
wfuzz = wfuzz.wordlists;
}
);
in
{
pkgs = scopedWordlists;
withLists = f: symlinkJoin rec {
pname = "security-wordlists";
version = "unstable-2020-11-23";
name = "${pname}-${version}";
paths = f scopedWordlists;
postBuild = ''
# Create a command to show the location of the links.
mkdir -p $out/bin
cat >> $out/bin/wordlists << __EOF__
#!${runtimeShell}
${tree}/bin/tree $out/share
__EOF__
chmod +x $out/bin/wordlists
# Create a handy command for easy access to the wordlists.
# e.g.: `cat "$(wordlists_path)/rockyou.txt"`, or `ls "$(wordlists_path)/dirbuster"`
cat >> $out/bin/wordlists_path << __EOF__
#!${runtimeShell}
echo $out/share
__EOF__
chmod +x $out/bin/wordlists_path
'';
meta = with lib; {
description = "A collection of wordlists useful for security testing";
maintainers = with maintainers; [ pamplemousse ];
};
};
}

@ -0,0 +1,23 @@
{ fetchzip, lib }:
let
version = "1.0-RC1";
in
fetchzip rec {
name = "DirBuster-${version}";
url = "mirror://sourceforge/dirbuster/DirBuster%20%28jar%20%2B%20lists%29/${version}/${name}.zip";
sha256 = "nByEKfhJ5TsZjvL4dTcgrSw0kUUPPVQNJOywdlZwiTo=";
postFetch = ''
mkdir -p $out/share/dirbuster
unzip -j $downloadedFile ${name}/directory-list-\*.txt -d $out/share/dirbuster
'';
meta = with lib; {
homepage = "https://sourceforge.net/projects/dirbuster/";
license = licenses.cc-by-nc-sa-30;
maintainers = with maintainers; [ pamplemousse ];
};
}

@ -0,0 +1,29 @@
{ fetchFromGitHub
, lib
, nmap
, stdenvNoCC
}:
stdenvNoCC.mkDerivation {
pname = "nmap";
version = "unstable-2020-10-19";
src = fetchFromGitHub
{
owner = "nmap";
repo = "nmap";
rev = "0b49f7f933577a1904f232bfc2d347553ed22860";
sha256 = "sha256-rA6cd9K2uX8EfByTJ2u2/48U4SqD9IGs+3CLlfgxHE0=";
} + "/nselib/data/passwords.lst";
dontUnpack = true;
installPhase = ''
install -m 444 -D $src $out/share/nmap.lst
'';
meta = with lib; {
inherit (nmap.meta) homepage license;
maintainers = with maintainers; [ pamplemousse ];
};
}

@ -0,0 +1,32 @@
{ fetchFromGitLab
, lib
, stdenvNoCC
}:
stdenvNoCC.mkDerivation rec {
pname = "rockyou";
version = "0.3-1kali3";
src = fetchFromGitLab
{
group = "kalilinux";
owner = "packages";
repo = "wordlists";
rev = "debian/${version}";
sha256 = "sha256-viOd8iKLTiHrPF0azICp/F16JrPUfo4kbcGUPD2/cRs=";
} + "/rockyou.txt.gz";
unpackCmd = ''
mkdir src
gzip -dc ${src} > src/rockyou.txt
'';
installPhase = ''
install -m 444 -D rockyou.txt $out/share/rockyou.txt
'';
meta = with lib; {
license = "unknown";
maintainers = with maintainers; [ pamplemousse ];
};
}

@ -0,0 +1,29 @@
{ fetchFromGitHub
, lib
, stdenvNoCC
}:
stdenvNoCC.mkDerivation rec {
pname = "SecLists";
version = "unstable-2020-11-11";
src = fetchFromGitHub {
owner = "danielmiessler";
repo = pname;
rev = "9f4d672e98a837fb1f3d59095df36b63af6987d1";
sha256 = "EoLX4LmftkUZXbwGHLigbgC5bj23UL72k4li42YRzSs=";
};
installPhase = ''
mkdir -p $out/share/SecLists
cp -R Discovery Fuzzing IOCs Miscellaneous Passwords Pattern-Matching Payloads Usernames Web-Shells \
$out/share/SecLists
find $out/share/SecLists -name "*.md" -delete
'';
meta = with lib; {
homepage = "https://github.com/danielmiessler/SecLists";
license = licenses.mit;
maintainers = with maintainers; [ pamplemousse ];
};
}
Loading…
Cancel
Save