Hello, I install the Greenbone Community Containers 22.4 according to this wizard:Greenbone Community Containers 22.4 - Greenbone Community Documentation
I use docker-compose to pull Greenbone Community Containers 22.4, and open Greenbone Security Assistant in the browser successfully。
I want to use python combined with API(python-gvm) to get scan results and create new scan tasks. How to communicate with a remote Greenbone Community Containers server via TLSConnection, How to configure it on the server side. An error occurred when I used the following code
import gvm
from gvm.protocols.latest import Gmp
from gvm.transforms import EtreeTransform
from gvm.xml import pretty_print
connection =gvm.connections.TLSConnection(hostname='xxx.xxx.xxx.xxx', port='xxxx')
gmp = Gmp(connection)
gmp.authenticate('admin', 'admin')
# Retrieve current GMP version
version = gmp.get_version()
# Prints the XML in beautiful form
pretty_print(version)
error like this "FileNotFoundError: [Errno 2] No such file or directory".
My environment:vmware kali (Greenbone Community Containers 22.4)
windows10 (where python code runs)
I want to get the scan results through the python code in windows, what should I do.
If that doesn’t fit to your use case and you really want to use TLS you need to adjust the starting command of gvmd to use TLS instead of a unix socket. That requires generating TLS certs and putting them into the container. Personally I don’t know all the details about the setup and there is also no documentation at Greenbone side.
I followed the second part of exposing the Unix socket. This solution worked partially. I am able to start a scan using python but I cant fetch the status. On the GUI I am getting internal server error.