mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
apache-users: init at 2.1
This commit is contained in:
parent
5d50cc4fd5
commit
9f8b5add5f
24
pkgs/by-name/ap/apache-users/optional-args.patch
Normal file
24
pkgs/by-name/ap/apache-users/optional-args.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- a/apache2.1.pl
|
||||
+++ b/apache2.1.pl
|
||||
@@ -63,10 +63,10 @@ getopt ("h: l: p: e: s: t:" ,\%opts);
|
||||
use LWP;
|
||||
|
||||
|
||||
-if (!(exists $opts{h})||!(exists $opts{p})||!(exists $opts{l})||!(exists $opts{e})){ &usage;}
|
||||
+if (!(exists $opts{h})){ &usage;}
|
||||
|
||||
sub usage{
|
||||
-print "\nUSAGE: apache.pl [-h 1.2.3.4] [-l names] [-p 80] [-s (SSL Support 1=true 0=false)] [-e 403 (http code)] [-t threads]\n\n ";
|
||||
+print "\nUSAGE: apache-users -h 1.2.3.4 [-l names] [-p 80] [-s (SSL Support 1=true 0=false)] [-e 403 (http code)] [-t threads]\n\n ";
|
||||
exit 1;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ if (exists $opts{h}){
|
||||
}
|
||||
if (exists $opts{l}){
|
||||
$list=$opts{l};
|
||||
-}else {$list="names";}
|
||||
+}else {$list="@out@/share/apache-users/names";}
|
||||
if (exists $opts{p}){
|
||||
$port=$opts{p};
|
||||
}else{$port=80;}
|
43
pkgs/by-name/ap/apache-users/package.nix
Normal file
43
pkgs/by-name/ap/apache-users/package.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, perl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "apache-users";
|
||||
version = "2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://labs.portcullis.co.uk/download/apache_users-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-rylW4F8Si6KKYxaxEJlVFnbLqfqS6ytMPfHpc8MgriA=";
|
||||
};
|
||||
|
||||
# Allow optional arguments where defaults are provided
|
||||
patches = [ ./optional-args.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteAllInPlace apache${finalAttrs.version}.pl
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
(perl.withPackages (p: [ p.ParallelForkManager p.LWP ]))
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D apache${finalAttrs.version}.pl $out/bin/apache-users
|
||||
install -Dm444 names $out/share/apache-users/names
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Username Enumeration through Apache UserDir";
|
||||
homepage = "https://labs.portcullis.co.uk/downloads/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ emilytrau ];
|
||||
mainProgram = "apache-users";
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user