ares


Nameares JSON
Version 0.7.1 PyPI version JSON
download
home_pagehttps://github.com/barnumbirr/ares
SummaryPython wrapper around https://cve.circl.lu.
upload_time2020-04-08 07:54:00
maintainer
docs_urlNone
authorMartin Simon
requires_python
licenseApache v2.0 License
keywords cve cybersecurity vulnerability circl.lu
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ![icon](https://raw.githubusercontent.com/barnumbirr/ares/master/doc/ares.png) ares

[![PyPi Version](http://img.shields.io/pypi/v/ares.svg)](https://pypi.python.org/pypi/ares/)

**ares** is an APACHE licensed library written in Python providing an easy to use wrapper around https://cve.circl.lu.
This library has been tested with Python 2.7.x and Python 3.6+.

## Installation:

From source use

```bash
$ python setup.py install
```

or install from PyPi

```bash
$ pip install ares
```

## Documentation:

#### **`GET /api/browse`**
#### **`GET /api/browse/<vendor>`**

##### Description

Returns a list of vendors or products of a specific vendor.
This API call can be used in two ways; With or without the vendor.
When the link is called without a vendor, it will return a list of possible vendors.
When the link is called with a vendor, it enumerates the products for said vendor.

| Argument            | Description         | Example              |
| :-------------------| :------------------ | :------------------- |
| vendor              | Vendor name         | `microsoft`          |

```python
>>> from ares import CVESearch
>>> cve = CVESearch()
>>> cve.browse('microsoft')
```

<br/>

#### **`GET /api/capec/<cpe> `**

##### Description

Outputs a list of CAPEC related to a CWE.
CAPEC (Common Attack Pattern Enumeration and Classification) are a list of attack types commonly used by attackers.

| Argument            | Description         | Example              |
| :-------------------| :------------------ | :------------------- |
| cweid               | CWE ID              | `200`                |


```python
>>> cve.capec('200')
```

<br/>

#### **`GET /api/cpe2.2/<cpe> `**

##### Description

**DISABLED ON cve.circl.lu**

Converts a CPE code to the CPE2.2 standard, stripped of appendices.
CPE2.2 is the old standard, and is a lot less uniform than the CPE2.3 standard.

| Argument            | Description                         | Example                                                                |
| :-------------------| :---------------------------------- | :--------------------------------------------------------------------- |
| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:2.3:o:microsoft:windows_vista:6.0:sp1:-:-:home_premium:-:-:x64:-` |

```python
>>> cve.cpe22('cpe:2.3:a:microsoft:office:2011:-:mac')
```

<br/>

#### **`GET /api/cpe2.3/<cpe> `**

##### Description

**DISABLED ON cve.circl.lu**

Converts a CPE code to the CPE2.3 standard, stripped of appendices.
CPE2.3 is the newer standard, and is a lot more uniform and easier to read than the CPE2.2 standard.

| Argument            | Description                         | Example                                                          |
| :-------------------| :---------------------------------- | :--------------------------------------------------------------- |
| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-` |

```python
>>> cve.cpe23('cpe:/a:microsoft:office:2011::mac')
```

<br/>

#### **`GET /api/cve/<cveid>`**

##### Description

Outputs all available information for the specified CVE (Common Vulnerability and Exposure), in JSON format.
This information includes basic CVE information like CVSS (Common Vulnerability Scoring System), related CPE (Common Product Enumeration),
CWE (Common Weakness Enumeration), ... as well as additional information (RedHat Advisories etc).

| Argument            | Description           | Example                  |
| :-------------------| :-------------------- | :----------------------- |
| cveid               | CVE number            | `CVE-2014-0160`          |

```python
>>> cve.id('CVE-2014-0160')
```

<br/>

#### **`GET /api/cvefor/<cpe> `**

##### Description

**DISABLED ON cve.circl.lu**

Outputs a list of CVEs related to the product.

| Argument            | Description                         | Example                                                          |
| :-------------------| :---------------------------------- | :--------------------------------------------------------------- |
| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-` |


```python
>>> cve.cvefor('cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-')
```

<br/>

#### **`GET /api/cwe `**

##### Description

Outputs a list of all CWEs (Common Weakness Enumeration).

```python
>>> cve.cwe()
```

<br/>

#### **`GET /api/dbInfo`**

##### Description

Returns the stats of the database. When the user authenticates, more information is returned. This information includes:

    Amount of whitelist and blacklist records
    Some server settings like the database name
    Some database information like disk usage

Unauthenticated queries return only collection information.

**Note: as of April 2020, authentication is disabled on cve.circl.lu.**

```python
>>> cve.dbinfo()
```

<br/>

#### **`GET /api/last`**
#### **`GET /api/last/<limit>`**

##### Description

Outputs the last `n` amount of vulnerabilities. If the limit is not specified, the default of 30 is used.

| Argument            | Description                         | Example                |
| :-------------------| :---------------------------------- | :--------------------- |
| limit               | The amount of CVEs to display       | `10`                   |

```python
>>> cve.last('10')
```

<br/>

#### **`GET /api/search/link/<key>/<value>`**

##### Description

**DISABLED ON cve.circl.lu**

Returns all CVEs that are linked by a given key/value pair.

| Argument            | Description                         | Example                     |
| :-------------------| :---------------------------------- | :-------------------------- |
| key                 | The key to link CVEs on             | `refmap.ms`                 |
| value               | The value for the given key         | `MS16-098`                  |

```python
>>> cve.link('refmap.ms/MS16-098')
```

<br/>

#### **`GET /api/search/<vendor>/<product>`**

##### Description

**DISABLED ON cve.circl.lu**

When vendor and product are specified, this API call returns a list of CVEs related to the product. The output of the browse call can be used for this.

| Argument            | Description                         | Example                     |
| :-------------------| :---------------------------------- | :-------------------------- |
| vendor              | Vendor name                         | `microsoft`                 |
| product             | Product name                        | `office`                    |

```python
>>> cve.search('microsoft/office')
```

## License:

```
Copyright 2014-2020 Martin Simon

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

```

## Buy me a coffee?

If you feel like buying me a coffee (or a beer?), donations are welcome:

```
BTC : 1BNFXHPNRtg7LrLUmQWwPUwzoicUi3uP8Q
ETH : 0xd061B7dD794F6EB357bf132172ce06D1B0E5b97B
BCH : qpcmv8vstulfhgdf29fd8sf2g769sszscvaktty2rv
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/barnumbirr/ares",
    "name": "ares",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "CVE,cybersecurity,vulnerability,circl.lu",
    "author": "Martin Simon",
    "author_email": "me@martinsimon.me",
    "download_url": "https://files.pythonhosted.org/packages/84/fc/1af067d65d7c3e5811691d252e51a7df66129b87a1913b4ae117599eb4ed/ares-0.7.1.tar.gz",
    "platform": "",
    "description": "# ![icon](https://raw.githubusercontent.com/barnumbirr/ares/master/doc/ares.png) ares\n\n[![PyPi Version](http://img.shields.io/pypi/v/ares.svg)](https://pypi.python.org/pypi/ares/)\n\n**ares** is an APACHE licensed library written in Python providing an easy to use wrapper around https://cve.circl.lu.\nThis library has been tested with Python 2.7.x and Python 3.6+.\n\n## Installation:\n\nFrom source use\n\n```bash\n$ python setup.py install\n```\n\nor install from PyPi\n\n```bash\n$ pip install ares\n```\n\n## Documentation:\n\n#### **`GET /api/browse`**\n#### **`GET /api/browse/<vendor>`**\n\n##### Description\n\nReturns a list of vendors or products of a specific vendor.\nThis API call can be used in two ways; With or without the vendor.\nWhen the link is called without a vendor, it will return a list of possible vendors.\nWhen the link is called with a vendor, it enumerates the products for said vendor.\n\n| Argument            | Description         | Example              |\n| :-------------------| :------------------ | :------------------- |\n| vendor              | Vendor name         | `microsoft`          |\n\n```python\n>>> from ares import CVESearch\n>>> cve = CVESearch()\n>>> cve.browse('microsoft')\n```\n\n<br/>\n\n#### **`GET /api/capec/<cpe> `**\n\n##### Description\n\nOutputs a list of CAPEC related to a CWE.\nCAPEC (Common Attack Pattern Enumeration and Classification) are a list of attack types commonly used by attackers.\n\n| Argument            | Description         | Example              |\n| :-------------------| :------------------ | :------------------- |\n| cweid               | CWE ID              | `200`                |\n\n\n```python\n>>> cve.capec('200')\n```\n\n<br/>\n\n#### **`GET /api/cpe2.2/<cpe> `**\n\n##### Description\n\n**DISABLED ON cve.circl.lu**\n\nConverts a CPE code to the CPE2.2 standard, stripped of appendices.\nCPE2.2 is the old standard, and is a lot less uniform than the CPE2.3 standard.\n\n| Argument            | Description                         | Example                                                                |\n| :-------------------| :---------------------------------- | :--------------------------------------------------------------------- |\n| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:2.3:o:microsoft:windows_vista:6.0:sp1:-:-:home_premium:-:-:x64:-` |\n\n```python\n>>> cve.cpe22('cpe:2.3:a:microsoft:office:2011:-:mac')\n```\n\n<br/>\n\n#### **`GET /api/cpe2.3/<cpe> `**\n\n##### Description\n\n**DISABLED ON cve.circl.lu**\n\nConverts a CPE code to the CPE2.3 standard, stripped of appendices.\nCPE2.3 is the newer standard, and is a lot more uniform and easier to read than the CPE2.2 standard.\n\n| Argument            | Description                         | Example                                                          |\n| :-------------------| :---------------------------------- | :--------------------------------------------------------------- |\n| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-` |\n\n```python\n>>> cve.cpe23('cpe:/a:microsoft:office:2011::mac')\n```\n\n<br/>\n\n#### **`GET /api/cve/<cveid>`**\n\n##### Description\n\nOutputs all available information for the specified CVE (Common Vulnerability and Exposure), in JSON format.\nThis information includes basic CVE information like CVSS (Common Vulnerability Scoring System), related CPE (Common Product Enumeration),\nCWE (Common Weakness Enumeration), ... as well as additional information (RedHat Advisories etc).\n\n| Argument            | Description           | Example                  |\n| :-------------------| :-------------------- | :----------------------- |\n| cveid               | CVE number            | `CVE-2014-0160`          |\n\n```python\n>>> cve.id('CVE-2014-0160')\n```\n\n<br/>\n\n#### **`GET /api/cvefor/<cpe> `**\n\n##### Description\n\n**DISABLED ON cve.circl.lu**\n\nOutputs a list of CVEs related to the product.\n\n| Argument            | Description                         | Example                                                          |\n| :-------------------| :---------------------------------- | :--------------------------------------------------------------- |\n| cpe                 | CPE code in cpe2.2 or cpe2.3 format | `cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-` |\n\n\n```python\n>>> cve.cvefor('cpe:/o:microsoft:windows_vista:6.0:sp1:~-~home_premium~-~x64~-')\n```\n\n<br/>\n\n#### **`GET /api/cwe `**\n\n##### Description\n\nOutputs a list of all CWEs (Common Weakness Enumeration).\n\n```python\n>>> cve.cwe()\n```\n\n<br/>\n\n#### **`GET /api/dbInfo`**\n\n##### Description\n\nReturns the stats of the database. When the user authenticates, more information is returned. This information includes:\n\n    Amount of whitelist and blacklist records\n    Some server settings like the database name\n    Some database information like disk usage\n\nUnauthenticated queries return only collection information.\n\n**Note: as of April 2020, authentication is disabled on cve.circl.lu.**\n\n```python\n>>> cve.dbinfo()\n```\n\n<br/>\n\n#### **`GET /api/last`**\n#### **`GET /api/last/<limit>`**\n\n##### Description\n\nOutputs the last `n` amount of vulnerabilities. If the limit is not specified, the default of 30 is used.\n\n| Argument            | Description                         | Example                |\n| :-------------------| :---------------------------------- | :--------------------- |\n| limit               | The amount of CVEs to display       | `10`                   |\n\n```python\n>>> cve.last('10')\n```\n\n<br/>\n\n#### **`GET /api/search/link/<key>/<value>`**\n\n##### Description\n\n**DISABLED ON cve.circl.lu**\n\nReturns all CVEs that are linked by a given key/value pair.\n\n| Argument            | Description                         | Example                     |\n| :-------------------| :---------------------------------- | :-------------------------- |\n| key                 | The key to link CVEs on             | `refmap.ms`                 |\n| value               | The value for the given key         | `MS16-098`                  |\n\n```python\n>>> cve.link('refmap.ms/MS16-098')\n```\n\n<br/>\n\n#### **`GET /api/search/<vendor>/<product>`**\n\n##### Description\n\n**DISABLED ON cve.circl.lu**\n\nWhen vendor and product are specified, this API call returns a list of CVEs related to the product. The output of the browse call can be used for this.\n\n| Argument            | Description                         | Example                     |\n| :-------------------| :---------------------------------- | :-------------------------- |\n| vendor              | Vendor name                         | `microsoft`                 |\n| product             | Product name                        | `office`                    |\n\n```python\n>>> cve.search('microsoft/office')\n```\n\n## License:\n\n```\nCopyright 2014-2020 Martin Simon\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n\n## Buy me a coffee?\n\nIf you feel like buying me a coffee (or a beer?), donations are welcome:\n\n```\nBTC : 1BNFXHPNRtg7LrLUmQWwPUwzoicUi3uP8Q\nETH : 0xd061B7dD794F6EB357bf132172ce06D1B0E5b97B\nBCH : qpcmv8vstulfhgdf29fd8sf2g769sszscvaktty2rv\n```",
    "bugtrack_url": null,
    "license": "Apache v2.0 License",
    "summary": "Python wrapper around https://cve.circl.lu.",
    "version": "0.7.1",
    "project_urls": {
        "Bug Reports": "https://github.com/barnumbirr/ares/issues",
        "Buy me a coffee": "https://github.com/barnumbirr/ares#buy-me-a-coffee",
        "Homepage": "https://github.com/barnumbirr/ares"
    },
    "split_keywords": [
        "cve",
        "cybersecurity",
        "vulnerability",
        "circl.lu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84fc1af067d65d7c3e5811691d252e51a7df66129b87a1913b4ae117599eb4ed",
                "md5": "f5fe63409682394545a58d868d00a754",
                "sha256": "28823cad841c96f0a5f26452eaddf5831be8363f3128cd5b1403bf70bcb87965"
            },
            "downloads": -1,
            "filename": "ares-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f5fe63409682394545a58d868d00a754",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4967,
            "upload_time": "2020-04-08T07:54:00",
            "upload_time_iso_8601": "2020-04-08T07:54:00.382675Z",
            "url": "https://files.pythonhosted.org/packages/84/fc/1af067d65d7c3e5811691d252e51a7df66129b87a1913b4ae117599eb4ed/ares-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-04-08 07:54:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "barnumbirr",
    "github_project": "ares",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        }
    ],
    "lcname": "ares"
}
        
Elapsed time: 0.13135s