Hi everyone,
I’m a beginner in Linux trying to use the python-gvm, and this is the code I am trying to run:
from gvm.connections import UnixSocketConnection
from gvm.protocols.gmp import Gmp
path = '/opt/gvm/var/run/ospd.sock'
connection = UnixSocketConnection(path=path)
with Gmp(connection=connection) as gmp:
response = gmp.get_version()
print(response)
But I appear to get this error:
File “test.py”, line 9, in
with Gmp(connection=connection) as gmp:
File “/opt/gvm/.local/lib/python3.8/site-packages/gvm/protocols/gmp.py”, line 117, in enter
gmp = self.determine_supported_gmp()
File “/opt/gvm/.local/lib/python3.8/site-packages/gvm/protocols/gmp.py”, line 100, in determine_supported_gmp
version = self.determine_remote_gmp_version()
File “/opt/gvm/.local/lib/python3.8/site-packages/gvm/protocols/gmp.py”, line 89, in determine_remote_gmp_version
raise GvmError(
gvm.errors.GvmError: Invalid response from manager daemon while requesting the version information.
I also get this same error when trying to do anything else from the python-gvm library. Any help would be appreciated. Thank you.
GVM versions
gsa: 9.0.1~git-f4a4658fb-gsa-9.0
gvm: 9.0.1~git-5a976c58-gvmd-9.0
openvas-scanner: 7.01
gvm-libs: 11.01
Environment
Operating system: Ubuntu 20.04
Installation method / source: Kifarunix Guide