diff --git a/.gitignore b/.gitignore index f323483..44bbc75 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ proxy.txt belati.conf beta/* #remove comment after 0.2.3-dev -#web/web/db.sqlite3 +web/web/db.sqlite3 diff --git a/README.md b/README.md index 5343c4c..cf16140 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,12 @@ Please see [CONTRIBUTORS.md](https://github.com/aancw/Belati/blob/master/CONTRIB Thanks to PyWhois Library, Sublist3r, MailHarvester, Emingoo for being part of my code. Also thanks to Hispagatos, Infosec-ninjas, eCHo, RNDC( Research and development center ) and all other people who are inspiring this project :) -Thanks to Echo-Zine Staff for approving my Ezine : http://ezine.echo.or.id/issue31/005.txt - Belati : Collecting Public Data & Public Document for OSINT Purpose - Petruknisme +## Publications + +Echo Ezine 31 : http://ezine.echo.or.id/issue31/005.txt - Belati : Collecting Public Data & Public Document for OSINT Purpose - Petruknisme + +IDSECCONF 2017 : https://www.slideshare.net/idsecconf/belati-the-traditional-swiss-army-knife-for-osint - Belati: The Traditional Swiss Army Knife for OSINT + ## License diff --git a/plugins/url_request.py b/plugins/url_request.py index 4278d3f..66656de 100644 --- a/plugins/url_request.py +++ b/plugins/url_request.py @@ -22,7 +22,7 @@ import sys, socket import ssl -import urllib2 +import urllib2, httplib from user_agents import UserAgents from urlparse import urlparse from logger import Logger @@ -99,6 +99,8 @@ def header_info(self, url_request, proxy_address): except Exception, detail: log.console_log('ERROR {}'.format( str(detail))) return 1 + except httplib.BadStatusLine: + pass def just_url_open(self, url_request, proxy_address): try: @@ -137,8 +139,16 @@ def ssl_checker(self, domain): # https://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # Only for gangstars data = urllib2.urlopen("https://{}".format(domain), timeout=25, context=gcontext) + if "ERROR" in data or "Errno" in data: + domain_fix = "http://{}".format(domain) + except urllib2.HTTPError, e: + pass + except urllib2.URLError, e: + domain_fix = "http://{}".format(domain) except ssl.SSLError as e: domain_fix = "http://{}".format(domain) + except httplib.BadStatusLine: + domain_fix = "http://{}".format(domain) return domain_fix diff --git a/requirements.txt b/requirements.txt index 23b09bf..3896037 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,5 @@ beautifulsoup4 python-whois futures django -pyexifinfo \ No newline at end of file +pyexifinfo +cmd2