envision-unwrapped: 0-unstable-2024-10-20 -> 1.1.1 (#360652)
[NixPkgs.git] / pkgs / by-name / so / social-engineer-toolkit / package.nix
blob4f2d5895cc789baae70aeae4be9bc4e3f8adaa06
1 { lib, fetchFromGitHub, python3Packages, makeWrapper, metasploit }:
3 python3Packages.buildPythonApplication rec {
4   pname = "social-engineer-toolkit";
5   version = "8.0.3";
6   format = "other";
8   src = fetchFromGitHub {
9     owner = "trustedsec";
10     repo = pname;
11     rev = version;
12     sha256 = "ePbmUvnzLO0Wfuhym3bNSPV1x8rcCPqKMeWSRcbJGAo=";
13   };
15   postPatch = ''
16     substituteInPlace setoolkit \
17       --replace "src/core/config.baseline" "$out/share/social-engineer-toolkit/src/core/config.baseline"
18     substituteInPlace src/core/setcore.py \
19       --replace '"src/core/set.version"' "\"$out/share/social-engineer-toolkit/src/core/set.version\"" \
20       --replace "/opt/metasploit-framework" "${metasploit}/bin"
21   '';
23   nativeBuildInputs = [
24     makeWrapper
25   ];
27   propagatedBuildInputs = with python3Packages; [
28     pexpect
29     pycrypto
30     requests
31     pyopenssl
32     pefile
33     impacket
34     qrcode
35     pillow
36     # Has been abandoned upstream. Features using this library are broken
37     # pymssql
38   ];
40   installPhase = ''
41     runHook preInstall
43     install -Dt $out/bin setoolkit seautomate seproxy
44     mkdir -p $out/share/social-engineer-toolkit
45     cp -r modules readme src $out/share/social-engineer-toolkit/
47     runHook postInstall
48   '';
50   makeWrapperArgs = [
51     "--chdir ${placeholder "out"}/share/social-engineer-toolkit"
52     "--prefix PYTHONPATH : \"${placeholder "out"}/share/social-engineer-toolkit\""
53   ];
55   # Project has no tests
56   doCheck = false;
58   meta = with lib; {
59     description = "Open-source penetration testing framework designed for social engineering";
60     longDescription = ''
61       The Social-Engineer Toolkit is an open-source penetration testing framework
62       designed for social engineering. SET has a number of custom attack vectors
63       that allow you to make a believable attack quickly.
64     '';
65     homepage = "https://github.com/trustedsec/social-engineer-toolkit";
66     mainProgram = "setoolkit";
67     license = licenses.bsd3;
68     maintainers = with maintainers; [ emilytrau ];
69   };