{"action":"created","issue":{"url":"https://api.github.com/repos/s0md3v/Photon/issues/23","repository_url":"https://api.github.com/repos/s0md3v/Photon","labels_url":"https://api.github.com/repos/s0md3v/Photon/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/s0md3v/Photon/issues/23/comments","events_url":"https://api.github.com/repos/s0md3v/Photon/issues/23/events","html_url":"https://github.com/s0md3v/Photon/pull/23","id":344495326,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODc3NDE1","number":23,"title":"Added two new options: -o/--output and --stdout","user":{"login":"sethsec","id":1268152,"node_id":"MDQ6VXNlcjEyNjgxNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1268152?v=4","gravatar_id":"","url":"https://api.github.com/users/sethsec","html_url":"https://github.com/sethsec","followers_url":"https://api.github.com/users/sethsec/followers","following_url":"https://api.github.com/users/sethsec/following{/other_user}","gists_url":"https://api.github.com/users/sethsec/gists{/gist_id}","starred_url":"https://api.github.com/users/sethsec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethsec/subscriptions","organizations_url":"https://api.github.com/users/sethsec/orgs","repos_url":"https://api.github.com/users/sethsec/repos","events_url":"https://api.github.com/users/sethsec/events{/privacy}","received_events_url":"https://api.github.com/users/sethsec/received_events","type":"User","site_admin":false},"labels":[{"id":885127274,"node_id":"MDU6TGFiZWw4ODUxMjcyNzQ=","url":"https://api.github.com/repos/s0md3v/Photon/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-25T15:31:38Z","updated_at":"2018-07-25T21:57:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/s0md3v/Photon/pulls/23","html_url":"https://github.com/s0md3v/Photon/pull/23","diff_url":"https://github.com/s0md3v/Photon/pull/23.diff","patch_url":"https://github.com/s0md3v/Photon/pull/23.patch"},"body":"Awesome tool. I've been looking for something like this for a while to integrate with something I am building!   I added two new options for you to consider: \r\n\r\n1. -o/--output option that allows the user to specify an output directory (overriding the default). \r\n\r\nCommand: \r\n```python photon.py -u http://10.10.10.102:80 -l 2 -t100 -o /pentest/photontest```\r\n\r\nIn this case, all of the output files will be written to /pentest/photontest:\r\n```\r\nroot@htbeu:/pentest/photontest# ls -ltr\r\ntotal 24\r\n-rw-r--r-- 1 root root    0 Jul 25 11:11 scripts.txt\r\n-rw-r--r-- 1 root root 3260 Jul 25 11:11 robots.txt\r\n-rw-r--r-- 1 root root 3260 Jul 25 11:11 links.txt\r\n-rw-r--r-- 1 root root   17 Jul 25 11:11 intel.txt\r\n-rw-r--r-- 1 root root  437 Jul 25 11:11 fuzzable.txt\r\n-rw-r--r-- 1 root root  146 Jul 25 11:11 files.txt\r\n-rw-r--r-- 1 root root    0 Jul 25 11:11 failed.txt\r\n-rw-r--r-- 1 root root   96 Jul 25 11:11 external.txt\r\n-rw-r--r-- 1 root root    0 Jul 25 11:11 endpoints.txt\r\n-rw-r--r-- 1 root root    0 Jul 25 11:11 custom.txt\r\n```\r\n\r\n2. A --stdout option that allow user to print everything to stdout so they can pipe it into another tool or redirect all output to an output file with an operating system redirector.\r\n\r\nCommand: \r\n```root@htbeu:/opt/dev/Photon# python photon.py -u http://10.10.10.9:80 -l 2 -t100 --stdout```\r\n\r\nOutput:\r\n```\r\n      ____  __          __\r\n     / __ \\/ /_  ____  / /_____  ____\r\n    / /_/ / __ \\/ __ \\/ __/ __ \\/ __ \\\r\n   / ____/ / / / /_/ / /_/ /_/ / / / /\r\n  /_/   /_/ /_/\\____/\\__/\\____/_/ /_/\r\n\r\n[+] URLs retrieved from robots.txt: 68\r\n[~] Level 1: 69 URLs\r\n[!] Progress: 69/69\r\n[~] Level 2: 9 URLs\r\n[!] Progress: 9/9\r\n[~] Crawling 0 JavaScript files\r\n\r\n--------------------------------------------------\r\n[+] URLs: 78\r\n[+] Intel: 1\r\n[+] Files: 1\r\n[+] Endpoints: 0\r\n[+] Fuzzable URLs: 9\r\n[+] Custom strings: 0\r\n[+] JavaScript Files: 0\r\n[+] External References: 3\r\n--------------------------------------------------\r\n[!] Total time taken: 0:32\r\n[!] Average request time: 0.40\r\n[+] Results saved in 10.10.10.9:80 directory\r\n\r\nAll Results:\r\n\r\nhttp://10.10.10.9:80/themes/*.gif\r\nhttp://10.10.10.9:80/modules/*.png\r\nhttp://10.10.10.9:80/INSTALL.mysql.txt\r\nhttp://10.10.10.9:80/install.php\r\nhttp://10.10.10.9:80/scripts/\r\nhttp://10.10.10.9:80/node/add/\r\nhttp://10.10.10.9:80/?q=admin/\r\nhttp://10.10.10.9:80/themes/*.png\r\nhttp://10.10.10.9:80/modules/*.gif\r\nhttp://10.10.10.9:80\r\nhttp://10.10.10.9:80/includes/\r\nhttp://10.10.10.9:80/?q=user/password/\r\nhttp://10.10.10.9:80/INSTALL.txt\r\nhttp://10.10.10.9:80/profiles/\r\nhttp://10.10.10.9:80/themes/bartik/css/ie6.css?on28x3\r\nhttp://10.10.10.9:80/MAINTAINERS.txt\r\nhttp://10.10.10.9:80/themes/bartik/css/ie.css?on28x3\r\nhttp://10.10.10.9:80/modules/*.jpeg\r\nhttp://10.10.10.9:80/misc/*.gif\r\n```\r\n\r\n\r\nThe last thing i changed is the way you were wiping the directory each time you ran the tool so that you would get clean output.  If you accept the -o option which allows the user to specify the directory, you can't just blindly delete the directory anymore (can't trust user input ;)). So i think i added a cleaner way to just overwrite each file (replacing the w+ with w), that should accomplish the same thing without needing to delete directories.  \r\n"},"comment":{"url":"https://api.github.com/repos/s0md3v/Photon/issues/comments/407909598","html_url":"https://github.com/s0md3v/Photon/pull/23#issuecomment-407909598","issue_url":"https://api.github.com/repos/s0md3v/Photon/issues/23","id":407909598,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzkwOTU5OA==","user":{"login":"s0md3v","id":26716802,"node_id":"MDQ6VXNlcjI2NzE2ODAy","avatar_url":"https://avatars2.githubusercontent.com/u/26716802?v=4","gravatar_id":"","url":"https://api.github.com/users/s0md3v","html_url":"https://github.com/s0md3v","followers_url":"https://api.github.com/users/s0md3v/followers","following_url":"https://api.github.com/users/s0md3v/following{/other_user}","gists_url":"https://api.github.com/users/s0md3v/gists{/gist_id}","starred_url":"https://api.github.com/users/s0md3v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0md3v/subscriptions","organizations_url":"https://api.github.com/users/s0md3v/orgs","repos_url":"https://api.github.com/users/s0md3v/repos","events_url":"https://api.github.com/users/s0md3v/events{/privacy}","received_events_url":"https://api.github.com/users/s0md3v/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T21:57:05Z","updated_at":"2018-07-25T21:57:05Z","author_association":"OWNER","body":"I am talking about this statement of yours:\r\n\r\n> So i think i added a cleaner way to just overwrite each file (replacing the w+ with w), that should accomplish the same thing without needing to delete directories."}}
{"actor":{"display_login":"s0md3v"}}