xdavidhu / lanGhost

👻 A LAN dropbox chatbot controllable via Telegram
MIT License
353 stars 60 forks source link

LanGhost over WiFi #13

Open shuhrat02 opened 6 years ago

shuhrat02 commented 6 years ago

hi guys! Could u make a short guide how to configure langhost over wifi? Due to when i run command /scan , bot says: ❌ Whooops, something went wrong... Please try again.

I need to set up wpa_supplicant to connect to the network automatically first. But how to run it... i mean with what options? it does not have GUI.

So I run Network Manager and connected to SSID and marked 'autoconnect'. But still have same error

ok, pls help guys

thanks in advise!

shuhrat02 commented 6 years ago

Here is a log, in the startup of the lanGhost.

[+] Running iptables setup...
[+] Scanning for new hosts...
[+] Telegram bot started...
[+] Scanning for new hosts...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.macvendors.com', port=443): Max retries exceeded with url: /2C:0E:**:00:00:D5 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "./lanGhost.py", line 271, in subscriptionHandler
    print("[+] New device connected: " + resolveMac(host[1]) + " - " + host[0])
  File "./lanGhost.py", line 198, in resolveMac
    r = requests.get('https://api.macvendors.com/' + mac)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.macvendors.com', port=443): Max retries exceeded with url: /2C:0E:**:00:00:D5 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

Problem is in SSL: CERTIFICATE_VERIFY_FAILED, failed to verify certificate

xdavidhu commented 6 years ago

Hey, sorry for the late reponse, but this looks like there is a problem with the internet connection, and thats why it can't connect to api.macvendors.com. Did you run it with the autostart from the setup.py?