Skip to main content
Help us improve Python packaging – donate today!

Security Center API Library

Project Description

Wrap the Security Center API to make connections and queries easier to use. Handles managing sessions, SSL, and processing responses so you can spend more time getting the data you want.

How to Install

Use pip to install a release from PyPI:

pip install pySecurityCenter

Or install the latest master from GitHub:

pip install https://github.com/SteveMcGrath/pySecurityCenter/archive/master.zip

Basic Usage

Create a SecurityCenter instance to log in. API “modules” are attributes on the instance. API “actions” are methods on the modules.

>>> from securitycenter import SecurityCenter
>>> sc = SecurityCenter("host", "user", "pass")
>>> ips = sc.vuln.query("sumip")["results"]
>>> len(ips)
240
>>> ips[0]
{u'macAddress': '', u'severityHigh': u'0', u'severityMedium': u'3',
u'ip': u'10.10.0.1', u'netbiosName': '', u'repositoryID': u'1',
u'severityCritical': u'0', u'score': u'47', u'severityLow': u'38',
u'total': u'41', u'dnsName': u'pfsense.home.lan', u'severityInfo': u'0'}

SSL Support

The Requests library supports both server verification and sending a client certificate for two-way SSL.

# verification, system trust chain
SecurityCenter("host", verify=True)

# verification, custom trust chain
SecurityCenter("host", verify="path/to/chain")

# two-way
# cert can be combined public and private, or (pub, priv) tuple
SecurityCenter("host", cert="path/to/cert", verify="path/to/chain")

Security Center can log in a user based on a client certificate instead of a username and password. To enable that, first log in with a username and password while providing a certificate, then register the certificate.

sc = SecurityCenter("host", "user", "pass", cert="path/to/cert")
sc.auth.save_fingerprint()

Available Modules

Warning

Not all of the modules and actions are officially documented.

  • admin
  • asset
  • auth
  • credential
  • file
  • heartbeat
  • message
  • nessusResult
  • plugin
  • policy
  • report
  • reportResult
  • repository
  • role
  • scan
  • scan_result
  • system
  • user
  • vuln
  • zone

Release history Release notifications

History Node

3.0.3

History Node

3.0.2

History Node

3.0.1

History Node

3.0.0

History Node

2.1.16

History Node

2.1.15

History Node

2.1.14

History Node

2.1.11

History Node

2.1.10

History Node

2.1.9

History Node

2.1.8

History Node

2.1.7

History Node

2.1.6

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.1

History Node

2.1

History Node

2.0a5

History Node

2.0a4

History Node

2.0a3

History Node

2.0a2

This version
History Node

2.0a1

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.1

History Node

1.0

History Node

0.3.9

History Node

0.3.8.4

History Node

0.3.8.3

History Node

0.3.8.2

History Node

0.3.8.1

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3.1

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0a3

History Node

0.3.0a2

History Node

0.3.0a1

History Node

0.2.0a1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pySecurityCenter-2.0a1.tar.gz (22.7 kB) Copy SHA256 hash SHA256 Source None May 29, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page