1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5}:
6
7python3Packages.buildPythonApplication rec {
8 pname = "photon";
9 version = "1.3.0";
10 format = "other";
11
12 src = fetchFromGitHub {
13 owner = "s0md3v";
14 repo = "Photon";
15 rev = "v${version}";
16 sha256 = "02z1xj72bq35dilr4b6njry4kixz6j2a3ag02nla98q0fvgmgnvy";
17 };
18
19 dontBuild = true;
20 doCheck = false;
21
22 propagatedBuildInputs = with python3Packages; [
23 requests
24 urllib3
25 tld
26 ];
27
28 installPhase = ''
29 mkdir -p "$out"/{bin,share/photon}
30 cp -R photon.py core plugins $out/share/photon
31
32 makeWrapper ${python3Packages.python.interpreter} $out/bin/photon \
33 --set PYTHONPATH "$PYTHONPATH:$out/share/photon" \
34 --add-flags "-O $out/share/photon/photon.py"
35 '';
36
37 meta = with lib; {
38 description = "Lightning fast web crawler which extracts URLs, files, intel & endpoints from a target";
39 homepage = "https://github.com/s0md3v/Photon";
40 license = licenses.gpl3;
41 maintainers = [ ];
42 mainProgram = "photon";
43 };
44}