Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code issue #14

Open
lshahar opened this issue Apr 28, 2017 · 2 comments
Open

Example code issue #14

lshahar opened this issue Apr 28, 2017 · 2 comments

Comments

@lshahar
Copy link

lshahar commented Apr 28, 2017

while trying to run example code got exception

from openvas_lib import VulnscanManager, VulnscanException

try:
    scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)
except VulnscanException as e:
    print("Error:")
    print(e)

Traceback (most recent call last):
File "vas_poc.py", line 35, in
my_launch_scanner()
File "vas_poc.py", line 19, in my_launch_scanner
manager = VulnscanManager("localhost", "admin", "admin",4433)
File "/usr/lib/python2.7/site-packages/openvas_lib/init.py", line 497, in init
self.__manager = get_connector(host, user, password, port, m_time_out, ssl_verify)
File "/usr/lib/python2.7/site-packages/openvas_lib/common.py", line 73, in get_connector
manager = ConnectionManager(host, username, password, port, timeout, ssl_verify)
File "/usr/lib/python2.7/site-packages/openvas_lib/common.py", line 149, in init
self._connect()
File "/usr/lib/python2.7/site-packages/openvas_lib/common.py", line 200, in _connect
self._authenticate(self.__username, self.__password)
File "/usr/lib/python2.7/site-packages/openvas_lib/common.py", line 228, in _authenticate
self.make_xml_request(m_request)
File "/usr/lib/python2.7/site-packages/openvas_lib/common.py", line 378, in make_xml_request
raise ValueError('Missing status property in response')
ValueError: Missing status property in response

@x7peeps
Copy link

x7peeps commented Jan 24, 2018

i have the same question. did u fixed this?

ksakthii001 added a commit to ksakthii001/openvas_lib that referenced this issue Mar 22, 2018
This is in regards to the issue - Example code issue golismero#14

We are receiving this problem due to referencing a port number that is already in use. That is the reason we are getting this error.  I have added the outputs under the issue section.
@ksakthii001
Copy link
Contributor

Hi,

I am able to recreate the problem. If we reference a port number that is already in use, we hit this problem. Please check below for errors.

$ sudo python openvas.py
Traceback (most recent call last):
File "openvas.py", line 35, in
my_launch_scanner()
File "openvas.py", line 19, in my_launch_scanner
manager = VulnscanManager("localhost", "admin", "admin", 443)
File "/home/ksakthii001/github/openvas_lib/openvas_lib/init.py", line 497, in init
self.__manager = get_connector(host, user, password, port, m_time_out, ssl_verify)
File "/home/ksakthii001/github/openvas_lib/openvas_lib/common.py", line 73, in get_connector
manager = ConnectionManager(host, username, password, port, timeout, ssl_verify)
File "/home/ksakthii001/github/openvas_lib/openvas_lib/common.py", line 152, in init
self._connect()
File "/home/ksakthii001/github/openvas_lib/openvas_lib/common.py", line 203, in _connect
self._authenticate(self.__username, self.__password)
File "/home/ksakthii001/github/openvas_lib/openvas_lib/common.py", line 231, in _authenticate
self.make_xml_request(m_request)
File "/home/ksakthii001/github/openvas_lib/openvas_lib/common.py", line 381, in make_xml_request
raise ValueError('Missing status property in response')
ValueError: Missing status property in response

$ netstat -anp | grep LISTEN
tcp6 0 0 :::443 :::* LISTEN -
tcp6 0 0 :::9390 :::* LISTEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants