Closed Infinity-ops closed 5 years ago
Hi, this is not an issue of library because on port 4000 is listening the web interface (the greenbone client), while to use this library you must use the port on which the openvas manager (OMP) listens.
On default this port is 9390 but you can change it with command
openvasmd -p listen_port -a listen_address
or modify the conf file openvas-manager in /etc/default
Then, if you changes the OMP port, you can pass the new port on VulnscanManager object like
scanner = VulnscanManager(host="omp_listen_address", port=omp_listen_port, user="username", password="password")
Using this link, I installed openvas9 in Ubuntu 16.04. To load up the web interface and start testing in web-client, I used following URL with port number 4000 https://localhost:4000. And right now I am trying to use openvas_lib API to do an independent scan.
ISSUE: But this library, by default, is using Port number 9390, I am not able to connect to the server. Even i tried by changing port number in init.py and common.py
CODE: from openvas_lib import VulnscanManager, VulnscanException try:
scanner = VulnscanManager("localhost", "admin", "admin") except VulnscanException as e: print("Error:") print(e)
ERROR: Error while connecting to the server: [Errno 111] Connection refused