about summary refs log tree commit diff
path: root/pkgs/tools/security/whatweb
diff options
context:
space:
mode:
authorP. R. d. O <d.ol.rod@tutanota.com>2022-04-05 06:53:40 -0600
committerP. R. d. O <d.ol.rod@tutanota.com>2022-04-05 06:53:40 -0600
commit9b09e3f7ad53aee821b5b119ffb65060b4c33aea (patch)
tree4e9b670b574b8d25fe309a11079efbff72b65974 /pkgs/tools/security/whatweb
parent63f0c334f0f3c6a584422454c90465101327d03e (diff)
whatweb: init at 0.5.5
Diffstat (limited to 'pkgs/tools/security/whatweb')
-rw-r--r--pkgs/tools/security/whatweb/Gemfile6
-rw-r--r--pkgs/tools/security/whatweb/Gemfile.lock25
-rw-r--r--pkgs/tools/security/whatweb/default.nix50
-rw-r--r--pkgs/tools/security/whatweb/gemset.nix74
4 files changed, 155 insertions, 0 deletions
diff --git a/pkgs/tools/security/whatweb/Gemfile b/pkgs/tools/security/whatweb/Gemfile
new file mode 100644
index 0000000000000..a376a3baae36d
--- /dev/null
+++ b/pkgs/tools/security/whatweb/Gemfile
@@ -0,0 +1,6 @@
+source 'https://rubygems.org'
+gem 'ipaddr'
+gem 'addressable'
+gem 'json'
+gem 'mongo'
+gem 'rchardet'
diff --git a/pkgs/tools/security/whatweb/Gemfile.lock b/pkgs/tools/security/whatweb/Gemfile.lock
new file mode 100644
index 0000000000000..7bfd24112b1ac
--- /dev/null
+++ b/pkgs/tools/security/whatweb/Gemfile.lock
@@ -0,0 +1,25 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.8.0)
+      public_suffix (>= 2.0.2, < 5.0)
+    bson (4.14.1)
+    ipaddr (1.2.4)
+    json (2.6.1)
+    mongo (2.17.1)
+      bson (>= 4.8.2, < 5.0.0)
+    public_suffix (4.0.6)
+    rchardet (1.8.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  addressable
+  ipaddr
+  json
+  mongo
+  rchardet
+
+BUNDLED WITH
+   2.1.4
diff --git a/pkgs/tools/security/whatweb/default.nix b/pkgs/tools/security/whatweb/default.nix
new file mode 100644
index 0000000000000..30d866da869af
--- /dev/null
+++ b/pkgs/tools/security/whatweb/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, bundlerEnv, ruby }:
+
+let
+  gems = bundlerEnv {
+    name = "whatweb-env";
+    inherit ruby;
+    gemdir = ./.;
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "whatweb";
+  version = "0.5.5";
+
+  src = fetchFromGitHub {
+    owner = "urbanadventurer";
+    repo = "whatweb";
+    rev = "v${version}";
+    sha256 = "sha256-HLF55x4C8n8aPO4SI0d6Z9wZe80krtUaGUFmMaYRBIE=";
+  };
+
+  prePatch = ''
+    substituteInPlace Makefile \
+      --replace "/usr/local" "$out" \
+      --replace "/usr" "$out"
+  '';
+
+  buildInputs = [ gems ];
+
+  installPhase = ''
+    runHook preInstall
+
+    raw=$out/share/whatweb/whatweb
+    rm $out/bin/whatweb
+    cat << EOF >> $out/bin/whatweb
+    #!/bin/sh -e
+    exec ${gems}/bin/bundle exec ${ruby}/bin/ruby "$raw" "\$@"
+    EOF
+    chmod +x $out/bin/whatweb
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Next generation web scanner";
+    homepage = "https://github.com/urbanadventurer/whatweb";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ wolfangaukang ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/security/whatweb/gemset.nix b/pkgs/tools/security/whatweb/gemset.nix
new file mode 100644
index 0000000000000..22d469b53e27d
--- /dev/null
+++ b/pkgs/tools/security/whatweb/gemset.nix
@@ -0,0 +1,74 @@
+{
+  addressable = {
+    dependencies = ["public_suffix"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp";
+      type = "gem";
+    };
+    version = "2.8.0";
+  };
+  bson = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "03n3w96vpblaxvk1qk8hq7sbsmg4nv7qdkdr8f7nfvalgpakp5i5";
+      type = "gem";
+    };
+    version = "4.14.1";
+  };
+  ipaddr = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "13qd34nzpgp3fxfjbvaqg3dcnfr0cgl5vjvcqy0hfllbvfcklnbq";
+      type = "gem";
+    };
+    version = "1.2.4";
+  };
+  json = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz";
+      type = "gem";
+    };
+    version = "2.6.1";
+  };
+  mongo = {
+    dependencies = ["bson"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "19sihy8ihi3hmdg3gxbf4qvzmjnzx8xygg9534012j9z0wmhs7h1";
+      type = "gem";
+    };
+    version = "2.17.1";
+  };
+  public_suffix = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9";
+      type = "gem";
+    };
+    version = "4.0.6";
+  };
+  rchardet = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1isj1b3ywgg2m1vdlnr41lpvpm3dbyarf1lla4dfibfmad9csfk9";
+      type = "gem";
+    };
+    version = "1.8.0";
+  };
+}