aancw / Belati

The Traditional Swiss Army Knife for OSINT
GNU General Public License v2.0
524 stars 120 forks source link

**socket.error: [Errno 54] Connection reset by peer** #23

Closed birdpillow closed 6 years ago

birdpillow commented 6 years ago

Hi,

I have problem reset by peer when checkin SVN target. Installation normal, and i tried -d rndc.or.id its working fine. But for several target, i get error socket.error: [Errno 54] Connection reset by peer. Any suggestion ? Thanks.

Host System

Error Description

Traceback (most recent call last): File "Belati.py", line 430, in BelatiApp = Belati() File "Belati.py", line 160, in init self.enumerate_subdomains(domain, proxy) File "Belati.py", line 248, in enumerate_subdomains self.banner_grab(self.url_req.ssl_checker(subdomain), proxy) File "/private/var/root/Belati/plugins/url_request.py", line 140, in ssl_checker data = urllib2.urlopen("https://{}".format(domain), timeout=25, context=gcontext) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open r = h.getresponse(buffering=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1132, in getresponse response.begin() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin version, status, reason = self._read_status() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 734, in recv return self.read(buflen) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 621, in read v = self._sslobj.read(len or 1024) socket.error: [Errno 54] Connection reset by peer

aancw commented 6 years ago

Hi, I think this is SSL Problem. Your target available for SSL connection?

File "/private/var/root/Belati/plugins/url_request.py", line 140, in ssl_checker
data = urllib2.urlopen("https://{}".format(domain), timeout=25, context=gcontext)
aancw commented 6 years ago

Can you edit Belati/plugins/url_request.py? Change from if not "ERROR" in data: to this if not "ERROR" in data or if not "Errno" in data:

@birdpillow Lemme know if this is work. Thanks!

aancw commented 6 years ago

Hi @birdpillow ,

I've fixing this bug, please update Belati with command git pull :)

Lemme know if this is work.

birdpillow commented 6 years ago

Git pull its oke. But still not working Traceback (most recent call last): File "Belati.py", line 430, in BelatiApp = Belati() File "Belati.py", line 160, in init self.enumerate_subdomains(domain, proxy) File "Belati.py", line 248, in enumerate_subdomains self.banner_grab(self.url_req.ssl_checker(subdomain), proxy) File "/private/var/root/Belati/plugins/url_request.py", line 141, in ssl_checker data = urllib2.urlopen("https://{}".format(domain), timeout=25, context=gcontext) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open r = h.getresponse(buffering=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1132, in getresponse response.begin() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin version, status, reason = self._read_status() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 734, in recv return self.read(buflen) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 621, in read v = self._sslobj.read(len or 1024) socket.error: [Errno 54] Connection reset by peer

aancw commented 6 years ago

@birdpillow, can you PM me about your target? Maybe i can try in my environment and try to fix this issue.

cacaddv@gmail.com

Thanks :)

birdpillow commented 6 years ago

I try to 1337x.to

Mints:Belati root# python Belati.py -d https://1337x.to

     /$$$$$$$  /$$$$$$$$ /$$        /$$$$$$  /$$$$$$$$     .
    | $$__  $$| $$_____/| $$       /$$__  $$|__  $$__/    J:L
    | $$  \ $$| $$      | $$      | $$  \ $$   | $$       |:|
    | $$$$$$$ | $$$$$   | $$      | $$$$$$$$   | $$       |:|
    | $$__  $$| $$__/   | $$      | $$__  $$   | $$       |:|
    | $$  \ $$| $$      | $$      | $$  | $$   | $$       |:|
    | $$$$$$$/| $$$$$$$$| $$$$$$$$| $$  | $$   | $$   /]  |:|  [\ 
    |_______/ |________/|________/|__/  |__/   |__/   \:-'"""'-:/
                                                        ""III""
                                                          III
                                                          III
                                                          III
                                                         (___)

                            The Traditional Swiss Army Knife for OSINT

    =[ Belati v0.2.3-dev by Petruknisme]=

    + -- --=[ Collecting Public Data & Public Document for OSINT purpose ]=-- -- +
    + -- --=[ https://petruknisme.com ]=-- -- +

    This tool is for educational purposes only.
    Any damage you make will not affect the author.
    Do It With Your Own Risk!

    For Better Privacy, Please Use proxychains or other proxy service!

[*] Starting at: 2017-12-04 16:55:47 [+] Checking Network Connection... OK [+] Checking Version Update for Belati... [+] Belati version is uptodate \m/ [+] Creating New Belati Project...

Project ID: 2 Project Domain: https://1337x.to Project Organization/Company: None

[] Checking Domain Availability... NOT OK! [] Checking URL Alive... NOT OK! [] Perfoming Whois... Socket Error: timed out { "updated_date": null, "status": null, "name": null, "dnssec": null, "city": null, "expiration_date": null, "zipcode": null, "domain_name": null, "country": null, "whois_server": null, "state": null, "registrar": null, "referral_url": null, "address": null, "name_servers": null, "org": null, "creation_date": null, "emails": null } [] Perfoming HTTP Banner Grabbing... ERROR <urlopen error [Errno 8] nodename nor servname provided, or not known> 1 [] Perfoming Subdomains Enumeration... Error: Please enter a valid domain [] Perfoming DNS Zone Scanning... [] Please wait, maximum timeout for checking is 1 minutes [] No response from server... SKIP! [] Perfoming Email Harvest from Google Search... [] Found 0 emails on domain https://1337x.to

[] Perfoming Email Harvest from PGP Server... Error code: 404 [-] Not found or Unavailable. None [] Perfoming Public Document Harvest from Google... [] Gather Link from Google Search for domain https://1337x.to [] Searching PDF Document... [] Searching DOC Document... [] Searching XLS Document... [] Searching ODT Document... [] Searching PPT Document... [] Searching RTF Document... [] Searching TXT Document... All done sir! All logs saved in log directory and dowloaded file saved in belatiFiles Starting Django Web Server at http://0.0.0.0:8000/ System check identified some issues:

WARNINGS: ?: (1_7.W001) MIDDLEWARE_CLASSES is not set. HINT: Django 1.7 changed the global defaults for the MIDDLEWARE_CLASSES. django.contrib.sessions.middleware.SessionMiddleware, django.contrib.auth.middleware.AuthenticationMiddleware, and django.contrib.messages.middleware.MessageMiddleware were removed from the defaults. If your project needs these middleware then you should configure this setting.

System check identified 1 issue (0 silenced). No Response...

aancw commented 6 years ago

Can you try without https:// ?

aancw commented 6 years ago

I wil close this issue. Please open again when you are stil happening this problem.