diff --git a/pkgs/tools/security/smbscan/default.nix b/pkgs/tools/security/smbscan/default.nix new file mode 100644 index 00000000000..a3a2257c065 --- /dev/null +++ b/pkgs/tools/security/smbscan/default.nix @@ -0,0 +1,41 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "smbscan"; + version = "unstable-2022-05-26"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "jeffhacks"; + repo = pname; + rev = "1b19d6040cab279b97bf002934bf6f8b34d6a8b4"; + hash = "sha256-cL1mnyzIbHB/X4c7sZKVv295LNnjqwR8TZBMe9s/peg="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + impacket + python-slugify + ]; + + installPhase = '' + runHook preInstall + + install -vD smbscan.py $out/bin/smbscan + install -vd $out/${python3.sitePackages}/ + cp {scan_internals,scan,setup,local_logging,arg_parser}.py $out/${python3.sitePackages} + install -vd $out/${python3.sitePackages}/wordlists/ + cp wordlists/pattern* $out/${python3.sitePackages}/wordlists + + runHook postInstall + ''; + + meta = with lib; { + description = "Tool to enumerate file shares"; + homepage = "https://github.com/jeffhacks/smbscan"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 280a79821a3..e32dd78d869 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1209,6 +1209,8 @@ with pkgs; sdlookup = callPackage ../tools/security/sdlookup { }; + smbscan = callPackage ../tools/security/smbscan { }; + spectre-cli = callPackage ../tools/security/spectre-cli { }; sx-go = callPackage ../tools/security/sx-go { };