From 42a4bf892700353993a4e4a220caa1d90b723066 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Thu, 4 Aug 2022 07:42:26 +1000 Subject: [PATCH] social-engineer-toolkit: init at 8.0.3 --- .../social-engineer-toolkit/default.nix | 70 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/tools/security/social-engineer-toolkit/default.nix diff --git a/pkgs/tools/security/social-engineer-toolkit/default.nix b/pkgs/tools/security/social-engineer-toolkit/default.nix new file mode 100644 index 000000000000..4f2d5895cc78 --- /dev/null +++ b/pkgs/tools/security/social-engineer-toolkit/default.nix @@ -0,0 +1,70 @@ +{ lib, fetchFromGitHub, python3Packages, makeWrapper, metasploit }: + +python3Packages.buildPythonApplication rec { + pname = "social-engineer-toolkit"; + version = "8.0.3"; + format = "other"; + + src = fetchFromGitHub { + owner = "trustedsec"; + repo = pname; + rev = version; + sha256 = "ePbmUvnzLO0Wfuhym3bNSPV1x8rcCPqKMeWSRcbJGAo="; + }; + + postPatch = '' + substituteInPlace setoolkit \ + --replace "src/core/config.baseline" "$out/share/social-engineer-toolkit/src/core/config.baseline" + substituteInPlace src/core/setcore.py \ + --replace '"src/core/set.version"' "\"$out/share/social-engineer-toolkit/src/core/set.version\"" \ + --replace "/opt/metasploit-framework" "${metasploit}/bin" + ''; + + nativeBuildInputs = [ + makeWrapper + ]; + + propagatedBuildInputs = with python3Packages; [ + pexpect + pycrypto + requests + pyopenssl + pefile + impacket + qrcode + pillow + # Has been abandoned upstream. Features using this library are broken + # pymssql + ]; + + installPhase = '' + runHook preInstall + + install -Dt $out/bin setoolkit seautomate seproxy + mkdir -p $out/share/social-engineer-toolkit + cp -r modules readme src $out/share/social-engineer-toolkit/ + + runHook postInstall + ''; + + makeWrapperArgs = [ + "--chdir ${placeholder "out"}/share/social-engineer-toolkit" + "--prefix PYTHONPATH : \"${placeholder "out"}/share/social-engineer-toolkit\"" + ]; + + # Project has no tests + doCheck = false; + + meta = with lib; { + description = "Open-source penetration testing framework designed for social engineering"; + longDescription = '' + The Social-Engineer Toolkit is an open-source penetration testing framework + designed for social engineering. SET has a number of custom attack vectors + that allow you to make a believable attack quickly. + ''; + homepage = "https://github.com/trustedsec/social-engineer-toolkit"; + mainProgram = "setoolkit"; + license = licenses.bsd3; + maintainers = with maintainers; [ emilytrau ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b942c9368456..14707d2568b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21198,6 +21198,8 @@ with pkgs; soapyuhd = callPackage ../applications/radio/soapyuhd { }; + social-engineer-toolkit = callPackage ../tools/security/social-engineer-toolkit { }; + socket_wrapper = callPackage ../development/libraries/socket_wrapper { }; soco-cli = callPackage ../tools/audio/soco-cli { };