Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#128 Fix: Non-existent domain: python3 photon.py -u asdasd.asd and python3 photon.py -u email1.tesla.com #133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ before_script:
script:
- python photon.py -u "https://somdev.me" -l 1 -d 1 -t 100 --regex "\d{10}" --dns --output="d3v"
- python photon.py -u "https://somdev.me" -l 1 -t 10 --seeds="https://somdev.me/posts" --only-urls --export=json --wayback
- python photon.py -u email1.tesla.com
luckydenis marked this conversation as resolved.
Show resolved Hide resolved
- python photon.py -u asdasd.asd
- python photon.py -u somdev.me
9 changes: 7 additions & 2 deletions photon.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@
try:
requests.get('https://' + main_inp, proxies=random.choice(proxies))
main_url = 'https://' + main_inp
except:
main_url = 'http://' + main_inp
except requests.ConnectionError:
try:
requests.get('http://' + main_inp, proxies=random.choice(proxies))
main_url = 'http://' + main_inp
except requests.ConnectionError:
sys.stdout.write("Host not found.\n")
sys.exit(0)

schema = main_url.split('//')[0] # https: or http:?
# Adding the root URL to internal for crawling
Expand Down