Skip to content

Commit

Permalink
Pkgs/dirb/copy wordlists (#31652)
Browse files Browse the repository at this point in the history
* dirb: copy wordlists

also overwrite the hardcoded path to common.txt wordlist

* dirb: nitpicks
  • Loading branch information
makefu authored and Mic92 committed Nov 14, 2017
1 parent 33b7ff9 commit 615a374
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pkgs/tools/networking/dirb/default.nix
@@ -1,24 +1,34 @@
{ fetchurl, stdenv, automake, autoconf, curl, autoreconfHook }:
{ fetchurl, stdenv, autoreconfHook, curl }:

let
major = "2";
minor = "22";
in stdenv.mkDerivation rec {
name = "dirb-${version}";
version = "${major}.${minor}";

src = fetchurl {
url = "mirror://sourceforge/dirb/${version}/dirb${major}${minor}.tar.gz";
sha256 = "0b7wc2gvgnyp54rxf1n9arn6ymrvdb633v6b3ah138hw4gg8lx7k";
};

nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ curl ];

unpackPhase = ''
tar -xf $src
find . -exec chmod +x "{}" ";"
export sourceRoot="dirb222"
'';

buildInputs = [ automake autoconf curl ];
preConfigure = "chmod +x configure";
postPatch = ''
sed -i "s#/usr#$out#" src/dirb.c
'';

postInstall = ''
mkdir -p $out/share/dirb/
cp -r wordlists/ $out/share/dirb/
'';

meta = {
description = "A web content scanner";
Expand Down

0 comments on commit 615a374

Please sign in to comment.