Closed j91321 closed 2 years ago
Unimportant bug I found while working with the library. When using ping() in sliver.InteractiveSession an error occurs due to missing argument.
ping()
sliver.InteractiveSession
import asyncio from sliver import SliverClientConfig, SliverClient CONFIG_PATH = 'sliver.cfg' async def main(): ''' Async client connect example ''' config = SliverClientConfig.parse_config_file(CONFIG_PATH) client = SliverClient(config) session_id = "b9d582ee-3058-48ea-b8cb-8b7af6b9d4d2" await client.connect() sessions = await client.sessions() print('Sessions: %r' % sessions) session = await client.interact_session(session_id) result = await session.ping() print(result) if __name__ == '__main__': asyncio.run(main())
Result:
Sessions: [ID: "b9d582ee-3058-48ea-b8cb-8b7af6b9d4d2" Name: "LARGE-SCALE_FORM" Hostname: "purple-dev" UUID: "0169e286-d52a-4db4-930e-36dab8570b70" Username: "john" UID: "1000" GID: "1000" OS: "linux" Arch: "amd64" Transport: "mtls" RemoteAddress: "127.0.0.1:57486" PID: 9593 Filename: "/home/john/LARGE-SCALE_FORM" LastCheckin: 1659887492 ActiveC2: "mtls://127.0.0.1:8888" Version: "Linux purple-dev 5.4.0-122-generic" ReconnectInterval: 60000000000 PeerID: -8608266088627989850 ] Traceback (most recent call last): File "./test-sliver.py", line 22, in <module> asyncio.run(main()) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "./test-sliver.py", line 18, in main result = await session.ping() File "/mnt/c/Users/john/Documents/work/venv-plugin-dev/lib/python3.8/site-packages/sliver/interactive.py", line 32, in ping ping.Request = self._request() TypeError: _request() missing 1 required positional argument: 'pb'
Unimportant bug I found while working with the library. When using
ping()
insliver.InteractiveSession
an error occurs due to missing argument.Result: