nikto: init at 2.2.0

+92
+26
pkgs/tools/networking/nikto/NIKTODIR-nix-wrapper-fix.patch
··· 1 + diff --color -ur a/program/nikto.pl b/program/nikto.pl 2 + --- a/program/nikto.pl 2021-01-30 12:05:54.915072538 +0100 3 + +++ b/program/nikto.pl 2021-01-30 12:36:42.877729231 +0100 4 + @@ -223,7 +223,8 @@ 5 + # Guess Nikto current directory 6 + my $NIKTODIR = abs_path($0); 7 + chomp($NIKTODIR); 8 + - $NIKTODIR =~ s#[\\/]nikto.pl$##; 9 + + $NIKTODIR =~ s#[\\/]bin[\\/]\.nikto-wrapped$##; 10 + + 11 + 12 + # Guess user's home directory -- to support Windows 13 + foreach my $var (split(/ /, "HOME USERPROFILE")) { 14 + @@ -231,10 +232,10 @@ 15 + } 16 + 17 + # Read the conf files in order (previous values are over-written with each, if multiple found) 18 + - push(@CF,"$NIKTODIR/nikto.conf.default"); 19 + + push(@CF,"$NIKTODIR/etc/nikto.conf.default"); 20 + push(@CF,"/etc/nikto.conf"); 21 + push(@CF,"$home/nikto.conf"); 22 + - push(@CF,"$NIKTODIR/nikto.conf"); 23 + + push(@CF,"$NIKTODIR/etc/nikto.conf"); 24 + push(@CF,"nikto.conf"); 25 + push(@CF,"$VARIABLES{'configfile'}"); 26 +
+64
pkgs/tools/networking/nikto/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , perlPackages 5 + , makeWrapper 6 + , installShellFiles 7 + }: 8 + 9 + stdenv.mkDerivation rec { 10 + pname = "nikto"; 11 + version = "2.2.0"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "sullo"; 15 + repo = "nikto"; 16 + rev = "c83d0461edd75c02677dea53da2896644f35ecab"; 17 + sha256 = "0vwq2zdxir67cn78ls11qf1smd54nppy266v7ajm5rqdc47q7fy2"; 18 + }; 19 + 20 + # Nikto searches its configuration file based on its current path 21 + # This fixes the current path regex for the wrapped executable. 22 + patches = [ ./NIKTODIR-nix-wrapper-fix.patch ]; 23 + 24 + postPatch = '' 25 + # EXECDIR needs to be changed to the path where we copy the programs stuff 26 + # Forcing SSLeay is needed for SSL support (the auto mode doesn't seem to work otherwise) 27 + substituteInPlace program/nikto.conf.default \ 28 + --replace "# EXECDIR=/opt/nikto" "EXECDIR=$out/share" \ 29 + --replace "LW_SSL_ENGINE=auto" "LW_SSL_ENGINE=SSLeay" 30 + ''; 31 + 32 + nativeBuildInputs = [ makeWrapper installShellFiles ]; 33 + 34 + propagatedBuildInputs = [ perlPackages.NetSSLeay ]; 35 + 36 + buildInputs = [ 37 + perlPackages.perl 38 + ]; 39 + 40 + installPhase = '' 41 + runHook preInstall 42 + install -d "$out/share" 43 + cp -a program/* "$out/share" 44 + install -Dm 755 "program/nikto.pl" "$out/bin/nikto" 45 + install -Dm 644 program/nikto.conf.default "$out/etc/nikto.conf" 46 + installManPage documentation/nikto.1 47 + install -Dm 644 program/docs/nikto_manual.html "$out/share/doc/${pname}/manual.html" 48 + install -Dm 644 README.md "$out/share/doc/${pname}/README" 49 + runHook postInstall 50 + ''; 51 + 52 + postInstall = '' 53 + wrapProgram $out/bin/nikto \ 54 + --prefix PERL5LIB : $PERL5LIB 55 + ''; 56 + 57 + meta = with lib; { 58 + description = "Web server scanner"; 59 + license = licenses.gpl2Plus; 60 + homepage = "https://cirt.net/Nikto2"; 61 + maintainers = with maintainers; [ shamilton ]; 62 + platforms = platforms.unix; 63 + }; 64 + }
+2
pkgs/top-level/all-packages.nix
··· 15834 15834 15835 15835 nika-fonts = callPackage ../data/fonts/nika-fonts { }; 15836 15836 15837 + nikto = callPackage ../tools/networking/nikto { }; 15838 + 15837 15839 nlohmann_json = callPackage ../development/libraries/nlohmann_json { }; 15838 15840 15839 15841 nntp-proxy = callPackage ../applications/networking/nntp-proxy { };