From 1261c63c142863656e9ffaa8f1a2b9ef613c8e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=B5=D0=BB=D0=B0=D0=B2=D0=B8=D0=BD=20=D0=94=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=81?= Date: Mon, 22 Apr 2019 21:38:17 +0300 Subject: [PATCH 1/4] #128 Fix: Non-existent domain: python3 photon.py -u asdasd.asd --- photon.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/photon.py b/photon.py index 455999e..4782242 100644 --- a/photon.py +++ b/photon.py @@ -172,10 +172,16 @@ if main_inp.startswith('http'): main_url = main_inp else: + response = None try: - requests.get('https://' + main_inp, proxies=random.choice(proxies)) + response = requests.get('https://' + main_inp, proxies=random.choice(proxies)) + except requests.ConnectionError: + sys.stdout.write("Error, host not found.\n") + sys.exit(0) + + if response.status_code == 200: main_url = 'https://' + main_inp - except: + else: main_url = 'http://' + main_inp schema = main_url.split('//')[0] # https: or http:? From c6b254a1c18a3861b6bdd79311d995e15e150345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=B5=D0=BB=D0=B0=D0=B2=D0=B8=D0=BD=20=D0=94=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=81?= Date: Tue, 23 Apr 2019 10:47:06 +0300 Subject: [PATCH 2/4] Date: Tue Apr 23 10:47:06 2019 +0300 On branch dev-001 Changes to be committed: modified: .travis.yml modified: photon.py --- .travis.yml | 2 ++ photon.py | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index b573139..5511dcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,5 @@ 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 + - python3 photon.py -u email1.tesla.com + - python3 photon.py -u asdasd.asd \ No newline at end of file diff --git a/photon.py b/photon.py index 4782242..ec4eeb9 100644 --- a/photon.py +++ b/photon.py @@ -172,17 +172,16 @@ if main_inp.startswith('http'): main_url = main_inp else: - response = None try: - response = requests.get('https://' + main_inp, proxies=random.choice(proxies)) - except requests.ConnectionError: - sys.stdout.write("Error, host not found.\n") - sys.exit(0) - - if response.status_code == 200: + requests.get('https://' + main_inp, proxies=random.choice(proxies)) main_url = 'https://' + main_inp - else: - 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 From 2447e66b98ee6de5eae894c9d9e22665bede23f8 Mon Sep 17 00:00:00 2001 From: Denis Belavin <41421345+LuckyDenis@users.noreply.github.com> Date: Tue, 23 Apr 2019 11:14:26 +0300 Subject: [PATCH 3/4] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5511dcd..f24f932 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +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 - - python3 photon.py -u email1.tesla.com - - python3 photon.py -u asdasd.asd \ No newline at end of file + - python photon.py -u email1.tesla.com + - python photon.py -u asdasd.asd + - python photon.py -u somdev.me From 4e8649be1b1d6773c09a400090b1d5f7dae86ce8 Mon Sep 17 00:00:00 2001 From: Denis Belavin <41421345+LuckyDenis@users.noreply.github.com> Date: Tue, 23 Apr 2019 21:00:09 +0300 Subject: [PATCH 4/4] Update .travis.yml I hope I understood what you meant. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f24f932..b573139 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,3 @@ 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 - - python photon.py -u asdasd.asd - - python photon.py -u somdev.me