Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchFromGitHub, python3Packages, makeWrapper, metasploit }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "social-engineer-toolkit";
5 version = "8.0.3";
6 format = "other";
7
8 src = fetchFromGitHub {
9 owner = "trustedsec";
10 repo = pname;
11 rev = version;
12 sha256 = "ePbmUvnzLO0Wfuhym3bNSPV1x8rcCPqKMeWSRcbJGAo=";
13 };
14
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 '';
22
23 nativeBuildInputs = [
24 makeWrapper
25 ];
26
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 ];
39
40 installPhase = ''
41 runHook preInstall
42
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/
46
47 runHook postInstall
48 '';
49
50 makeWrapperArgs = [
51 "--chdir ${placeholder "out"}/share/social-engineer-toolkit"
52 "--prefix PYTHONPATH : \"${placeholder "out"}/share/social-engineer-toolkit\""
53 ];
54
55 # Project has no tests
56 doCheck = false;
57
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 };
70}