Skip to main content

An OAP (OpenVAS Administration Protocol) client interface for Python

Project description

Author:

Hartmut Goebel <h.goebel@goebel-consult.de>

Version:
Version 0.0.1
Homepage:

http://www.openvas.org/

OpenVAS (Open Vulnerability Assessment System) is a network security scanner with associated tools. OpenVAS Version 3 introduces a new core component: The OpenVAS-Administrator. It is intended to simplify the configuration and administration of an OpenVAS server both on a local installation as well as on a remote system.

OpenVAS Administration Protocol (OAP) is the protocol based on XML to talk to the OpenVAS-Administrator. openvas.oaplib is a pure-Python implementation of OAP which allows easy access to the OpenVAS-Administrator.

This package also includes a command line tool oap-cli which uses sub-commands like svn or openssl does. See examples below.

Example:

admin = openvas.oaplib.OAPClient(host=sensor)
admin.open(username, password)
admin.create_user(name, password, role, hosts)
admin.modify_user(name, role="Admin")
admin.sync_feed()
# ... later ...
settings = admin.get_settings()
pprint.pprint(settings)

openvas.opmlib also supports a low-level interface where you can send OAP XML directly:

help_text = admin.xml('<help/>')

Examples for oap-cli usage:

oap-cli –help # get help oap-cli get-users –help # get help on subcommand get-users oap-cli create-user –new-pass xxx john oap-cli get-users john

Requirements and Installation

openvas.oaplib requires

  • Python 2.5 or higher with SSL support (which should be the

    default on most platforms) (NB: Python 3.x is not supported)

  • setuptools for installation (see below).

  • argparse (already included in Python starting with Python 2.7)

Hints for installing on Windows:

Following the links above you will find .msi and .exe-installers. Simply install them and continue with installing openvas.oaplib.

Hints for installing on Linux:

Most current Linux distributions provide packages for the requirements. Look for packages names like python-setuptools and python-argparse. Simply install them and continue with installing openvas.oaplib.

Hint for installing on other platforms:

Many vendors provide Python. Please check your vendors software repository. Otherwise please download Python 2.6 (or any higer version from the 2.x series) from http://www.python.org/download/ and follow the installation instructions there.

After installing Python, install setuptools. You may want to read More Hints on Installing setuptools first.

Using setuptools, compiling and installing the remaining requirements is a piece of cake:

# if the system has network access
easy_install argparse

# without network access download argparse
# from http://pypi.python.org/pypi/argparse and run
easy_install argparse-*.zip

Installing openvas.oaplib

When you are reading this you most probably already downloaded and unpacked openvas.oaplib. Thus installing is as easy as running:

python ./setup.py install

Otherwise you may install directly using setuptools/easy_install. If your system has network access installing openvas.oaplib is a breeze:

easy_install openvas.oaplib

Without network access download openvas.oaplib from http://pypi.python.org/pypi/openvas.oaplib and run:

easy_install openvas.oaplib-*.tar.gz

More Hints on Installing setuptools

openvas.oaplib uses setuptools for installation. Thus you need either

  • network access, so the install script will automatically download and install setuptools if they are not already installed

or

  • the correct version of setuptools preinstalled using the EasyInstall installation instructions. Those instructions also have tips for dealing with firewalls as well as how to manually download and install setuptools.

Custom Installation Locations

openvas.oaplib is just a single script (aka Python program). So you can copy it where ever you want (maybe fixing the first line). But it’s easier to just use:

# install to /usr/local/bin
python ./setup.py install --prefix /usr/local

# install to your Home directory (~/bin)
python ./setup.py install --home ~

Please mind: This effects also the installation of pfPDf (and setuptools) if they are not already installed.

For more information about Custom Installation Locations please refer to the Custom Installation Locations Instructions before installing openvas.oaplib.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

openvas.oaplib-0.0.1dev-r7742.zip (41.5 kB view details)

Uploaded Source

openvas.oaplib-0.0.1dev-r7742.tar.bz2 (27.8 kB view details)

Uploaded Source

File details

Details for the file openvas.oaplib-0.0.1dev-r7742.zip.

File metadata

File hashes

Hashes for openvas.oaplib-0.0.1dev-r7742.zip
Algorithm Hash digest
SHA256 680effdf64fe24e9cd5c53a88cbf73f12faee7c5eab3ab6f465dca5b6caa0b91
MD5 311bd1c22c3caa80a4699a904422a3a3
BLAKE2b-256 da9efcebb7d4b98ad1cb18fc8d9198e2d569ace54c9e69f24a4f021c50efad39

See more details on using hashes here.

File details

Details for the file openvas.oaplib-0.0.1dev-r7742.tar.bz2.

File metadata

File hashes

Hashes for openvas.oaplib-0.0.1dev-r7742.tar.bz2
Algorithm Hash digest
SHA256 e0171fff99380d3e263cc72f01db86f0c2da8a32c1479e86c1920fc956188b71
MD5 8816531736839363d32b21d5025ea2cf
BLAKE2b-256 130d1e312c4d27ce7b729f2d897db69fc26d5331c66a94cad54c900e91c8c3ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page