Skip to content

Incredibly fast crawler designed for OSINT.

Add try expect when could not load prompt for headers

otherpirate54b0d75aed14
diff --git a/photon.py b/photon.py
index 455999e..37b7285 100644
--- a/photon.py
+++ b/photon.py
@@ -166,7 +166,12 @@ bad_intel = set() # needed for intel filtering
core.config.verbose = verbose
if headers:
- headers = extract_headers(prompt())
+ try:
+ prompt = prompt()
+ except FileNotFoundError as e:
+ print('Could not load headers prompt: {}'.format(e))
+ quit()
+ headers = extract_headers(prompt)
# If the user hasn't supplied the root URL with http(s), we will handle it
if main_inp.startswith('http'):