about summary refs log tree commit diff
path: root/pkgs/tools/security/knockpy
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2021-04-01 20:13:15 +0200
committerGitHub <noreply@github.com>2021-04-01 20:13:15 +0200
commite3645c05ed592121c191611f228b19befcf6ebb4 (patch)
treef1d7cd9ac86e9a82da76e43051421221725abf73 /pkgs/tools/security/knockpy
parent9091767fbaf14dae8388eee87be6177698c21a2a (diff)
python3Packages.callPackage (#117406)
Diffstat (limited to 'pkgs/tools/security/knockpy')
-rw-r--r--pkgs/tools/security/knockpy/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/security/knockpy/default.nix b/pkgs/tools/security/knockpy/default.nix
new file mode 100644
index 0000000000000..89eda45322c7f
--- /dev/null
+++ b/pkgs/tools/security/knockpy/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "knockpy";
+  version = "5.0.0";
+  disabled = python3.pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "guelfoweb";
+    repo = "knock";
+    rev = version;
+    sha256 = "1h7sibdxx8y53xm1wydyng418n4j6baiys257msq03cs04jlm7h9";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [
+    beautifulsoup4
+    colorama
+    requests
+  ];
+
+  postPatch = ''
+    # https://github.com/guelfoweb/knock/pull/95
+    substituteInPlace setup.py \
+      --replace "bs4" "beautifulsoup4"
+  '';
+
+  # Project has no tests
+  doCheck = false;
+  pythonImportsCheck = [ "knockpy" ];
+
+  meta = with lib; {
+    description = "Tool to scan subdomains";
+    homepage = "https://github.com/guelfoweb/knock";
+    license = with licenses; [ gpl3Only ];
+    maintainers = with maintainers; [ fab ];
+  };
+}