golismero / openvas_lib

OpenVAS connector for versions 6, 7, 8 and 9
BSD 3-Clause "New" or "Revised" License
80 stars 97 forks source link

Some inssues about ompv4.py(openvas_lib file) #6

Closed d4wner closed 8 years ago

d4wner commented 8 years ago

Well, at first, I installed this project, but I get an error . This is because I set tab as four space, and I got an error at :


 **File "/usr/local/lib/python2.7/dist-packages/openvas_lib/ompv4.py", line 154
    request = """<create_target>**

Then I used, here is four space : **sed 's/\t/ /g' openvas_lib/ompv4.py >/usr/local/lib/python2.7/dist-packages/openvas_lib/ompv4.py**

But I also got an error:

class OMPv4(OMP): NameError: name 'OMP' is not defined

So I was very confused about it. Here is my code:

    **try:
        scanner = VulnscanManager('192.168.1.1', 'admin', '123')
        scan_id, target_id = scanner.launch_scan(target = myurl, profile = "Full and fast")
        openvas_results = scanner.get_results(scan_id)
        scanner.delete_scan(scan_id)
        scanner.delete_target(target_id)

        print openvas_results
    except VulnscanException as e:
        print "[x]Openvas Error:"+str(e)
    pass**

Maybe no error at here, right?

I hope author or someone can help me with this issue , thanks !!!

cr0hn commented 8 years ago

Thanks for the report!

I don't know why spaces/tabs was mixed. It should be fixed in the commit 01434ade20d83ed52702e26ea429a9a560166045

Also was fixed the second error. I missed to import a dependency