[Errno 111] Connection refused when I use openvas_lib

Hello
I using openvas_lib in python2.7 and I install OpenVAS9. But I can’t connect to OpenVAS. What is the problem?
I do the following:

from openvas_lib import VulnscanManager, VulnscanException

try:
scanner = VulnscanManager(“localhost”, “admin”, “admin”)
except VulnscanException as e:
print(e)

when I run my code, I get this error:
Error while connecting to the server: [Errno 111] Connection refused

Hi,
the mentioned python library is completely new to me. It’s not developed by greenbone and therefore we can’t give any help or advices. Alternatively you can take a look at python-gvm

2 Likes

Thanks for your answer.
Does python-gvm like openvas_lib? What’s different?
Could you help me?

Tahnks

I am sorry I can’t say anything about openvas_lib. The library is completely unknown to me. It’s not developed by Greenbone so you have to ask the author of openvas_lib for a comparison.

python-gvm is developed as the official python library for OpenVAS/GVM by Greenbone. Therefore if you want an up to date python library which is supported by the developers of OpenVAS/GVM you should choose python-gvm.

3 Likes

A post was split to a new topic: Error in response. First command must be AUTHENTICATE, COMMANDS or GET_VERSION