lol

photon: init at 1.0.7 (#44269)

authored by

Bignaux Ronan and committed by
xeji
38e582c9 36765069

+62
+40
pkgs/tools/networking/photon/default.nix
··· 1 + { stdenv, pythonPackages, fetchurl, makeWrapper }: 2 + 3 + with pythonPackages; 4 + buildPythonApplication rec { 5 + pname = "photon"; 6 + version = "1.0.7"; 7 + 8 + src = fetchurl { 9 + url = "https://github.com/s0md3v/Photon/archive/v${version}.tar.gz"; 10 + sha256 = "0c5l1sbkkagfxmh8v7yvi6z58mhqbwjyr7fczb5qwxm7la42ah9y"; 11 + }; 12 + 13 + patches = [ ./destdir.patch ]; 14 + postPatch = '' 15 + substituteInPlace photon.py --replace DESTDIR $out/share/photon 16 + ''; 17 + 18 + dontBuild = true; 19 + doCheck = false; 20 + propagatedBuildInputs = [ 21 + requests 22 + urllib3 23 + ]; 24 + 25 + installPhase = '' 26 + mkdir -p "$out"/{bin,share/photon} 27 + cp -R photon.py core plugins $out/share/photon 28 + 29 + makeWrapper ${python.interpreter} $out/bin/photon \ 30 + --set PYTHONPATH "$PYTHONPATH:$out/share/photon" \ 31 + --add-flags "-O $out/share/photon/photon.py" 32 + ''; 33 + 34 + meta = with stdenv.lib; { 35 + description = "a lightning fast web crawler which extracts URLs, files, intel & endpoints from a target"; 36 + homepage = https://github.com/s0md3v/Photon; 37 + license = licenses.gpl3; 38 + maintainers = with maintainers; [ genesis ]; 39 + }; 40 + }
+20
pkgs/tools/networking/photon/destdir.patch
··· 1 + diff --git a/photon.py.old b/photon.py 2 + index 92498e4..f7e2c3d 100644 3 + --- a/photon.py.old 4 + +++ b/photon.py 5 + @@ -185,7 +185,7 @@ if args.user_agent: 6 + user_agents = args.user_agent.split(',') 7 + else: 8 + user_agents = [] 9 + - with open(os.getcwd() + '/core/user-agents.txt', 'r') as uas: 10 + + with open('DESTDIR/core/user-agents.txt', 'r') as uas: 11 + for agent in uas: 12 + user_agents.append(agent.strip('\n')) 13 + 14 + @@ -534,4 +534,4 @@ if args.export: 15 + if not colors: # if colors are disabled 16 + print ('%s Results saved in %s directory' % (good, output_dir)) 17 + else: 18 + - print ('%s Results saved in \033[;1m%s\033[0m directory' % (good, output_dir)) 19 + \ No newline at end of file 20 + + print ('%s Results saved in \033[;1m%s\033[0m directory' % (good, output_dir))
+2
pkgs/top-level/all-packages.nix
··· 1444 1444 1445 1445 pbzx = callPackage ../tools/compression/pbzx { }; 1446 1446 1447 + photon = callPackage ../tools/networking/photon { }; 1448 + 1447 1449 playerctl = callPackage ../tools/audio/playerctl { }; 1448 1450 1449 1451 ps_mem = callPackage ../tools/system/ps_mem { };