moloch-- / sliver-py

A Python gRPC Client Library for Sliver
GNU General Public License v3.0
62 stars 13 forks source link

Cannot connect to the server... #5

Closed darkerego closed 1 year ago

darkerego commented 2 years ago

Python library fails to connect to sliver daemon.

To Reproduce Steps to reproduce the behavior: Install sliver (as a brand new install [on my system anyway]) and then run sliver to open console. Attempt to connect to the server via python api ... use this code:

    config = SliverClientConfig.parse_config_file(DEFAULT_CONFIG)
    client = SliverClient(config)
    await client.connect()

And I get this strange error:

  File "./b.py", line 33, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "./b.py", line 14, in main
    await client.connect()
  File "/home/null/PycharmProjects/sliverpy/venv/lib/python3.8/site-packages/sliver/client.py", line 102, in connect
    return (await self.version())
  File "/home/null/PycharmProjects/sliverpy/venv/lib/python3.8/site-packages/sliver/client.py", line 191, in version
    return (await self._stub.GetVersion(common_pb2.Empty(), timeout=timeout))
  File "/home/null/PycharmProjects/sliverpy/venv/lib/python3.8/site-packages/grpc/aio/_call.py", line 290, in __await__
    raise _create_rpc_error(self._cython_call._initial_metadata,
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
        status = StatusCode.DEADLINE_EXCEEDED
        details = "Deadline Exceeded"
        debug_error_string = "{"created":"@1648842438.953636201","description":"Deadline Exceeded","file":"src/core/ext/filters/deadline/deadline_filter.cc","file_line":81,"grpc_status":4}"

Expected behavior Should connect and then allow me to interact with api ..

Desktop (please complete the following information):

moloch-- commented 2 years ago

Looks like a network error, make sure the multiplayer listener is running (i.e., run the multiplayer command on the server) and no firewall is blocking connections to port 31337.

darkerego commented 2 years ago

Right, I cannot for the life of me imagine what that network error may be .. the daemon was listening on that port just fine. But hmm odd, now when i try to even start sliver I get this odd error (this was previously happening on my vps):

Connection to server failed context deadline exceeded

moloch-- commented 2 years ago

Host based firewall or AWS security groups?

moloch-- commented 2 years ago

This error basically indicates the client is unable to establish the underlying TCP connection