vulners


Namevulners JSON
Version 2.1.5 PyPI version JSON
download
home_page
SummaryPython library and command-line utility for Vulners (https://vulners.com)
upload_time2024-01-22 13:31:32
maintainer
docs_urlNone
authorKirill Ermakov
requires_python>=3.8
license
keywords security network vulners vulnerability cve
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # [Vulners API v3](https://vulners.com) Python wrapper


# Description
Python 2/3 library for the [Vulners Database](https://vulners.com).
It provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.
With this library you can create powerful security tools and get access to the world largest security database.

## Python version
Library was tested on a *python2* and *python3*.

## How to install

Package is available with [PyPI](https://pypi.python.org/pypi) 

You can use pip for the installation

```bash
pip install -U vulners
```

## Obtaining Vulners API key

Please, register at [Vulners website](https://vulners.com).
Go to the personal menu by clicking at your name at the right top corner.
Follow "API KEYS" tab.
Generate API key with scope "api" and use it with the library.

# Functions and methods

All the callable methods are using [Vulners REST API](https://vulners.com/docs).

### Search in database
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
heartbleed_related = vulners_api.find_all("heartbleed", limit=10)
```
### Get information about document by identificator
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
CVE_2017_14174 = vulners_api.get_bulletin("CVE-2017-14174")
```
### Get information about multiple documents by identificators
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
CVE_DATA = vulners_api.get_multiple_bulletins(["CVE-2017-14174", "CVE-2016-1175"])
```
### Search for the public available exploits
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
wordpress_exploits = vulners_api.find_exploit_all("wordpress 4.7.0")
```
### Get vulnerabilities and exploits by software name and version
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")

results = vulners_api.get_software_vulnerabilities("httpd", "1.3")
vulnerabilities_list = [results[key] for key in results if key not in ("info", "blog", "bugbounty")]
```
### Get vulnerabilities by CPE product and version string
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")

cpe_results = vulners_api.get_cpe_vulnerabilities("cpe:/a:cybozu:garoon:4.2.1")
cpe_vulnerabilities_list = [cpe_results[key] for key in cpe_results if key not in ("info", "blog", "bugbounty")]
```
### Get references for the vulnerability
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
references = vulners_api.get_bulletin_references("CVE-2014-0160")
```
### Get Windows KB superseeding and parentseeding information
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
# Superseeding information will be returned as a dict
# with two keys: "superseeds" and "parentseeds".
# Superseeds means "what KB are covered by this KB".
# Parentseeds means "what KB are covering this KB".
superseeds = vulners_api.get_kb_seeds("KB4524135")
```
### Get Windows KB updates list and download urls
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
microsoft_updates_for_kb = vulners_api.get_kb_updates("KB4524135")
updates_download_links = [update["href"] for update in microsoft_updates_for_kb]
```
### Score any vulnerability description using [Vulners AI](https://lab.wallarm.com/new-from-wallarm-research-first-ai-based-tool-to-predict-vulnerability-risk-2d0a7e9b3474)
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
text_ai_score = vulners_api.get_ai_score("My cool vulnerability description")
```
### Get possible query autocompletions
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
possible_autocomplete = vulners_api.query_autocomplete("heartbleed")

```
### Download whole database collection and work with data locally
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
all_cve = vulners_api.get_collection("cve")
```
### Audit Windows hosts for installed security KB
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
win_vulners = vulners_api.kb_audit(os="Windows Server 2012 R2", kb_list=["KB4072650", "KB2959936", "KB2894856", "KB2896496"])
need_2_install_kb = win_vulners["kbMissed"]
affected_cve = win_vulners["cvelist"]
```
### Audit Linux hosts for vulnerabilities (RPM/DEB based)
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")

# Example for CentOS 7
# You can use it for any RPM based OS
# Execute command: rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\n'
# Use it as package variable input

centos_vulnerabilities = vulners_api.os_audit(os="centos", version="7", packages=["glibc-common-2.17-157.el7_3.5.x86_64"])
vulnerable_packages = centos_vulnerabilities.get("packages")
missed_patches_ids = centos_vulnerabilities.get("vulnerabilities")
cve_list = centos_vulnerabilities.get("cvelist")
how_to_fix = centos_vulnerabilities.get("cumulativeFix")

# Example for Debian 8
# You can use it for any DEB based OS
# Execute command: dpkg-query -W -f='${Package} ${Version} ${Architecture}\\n'
# Use it as package variable input

debian_vulnerabilities = vulners_api.os_audit(os="debian", version="8", packages=['uno-libs3 4.3.3-2+deb8u7 amd64'])
```

### Download Linux (RPM/DEB based) vulnerability assessment data for local processing
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")

# Example for CentOS 7
centos_vulnerabilities_data = vulners_api.get_distributive("CentOS", "7")
```
### Download web application vulnerability detection regex collection
```python
import vulners

vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
rules = vulners_api.get_web_application_rules()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "vulners",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "security,network,vulners,vulnerability,CVE",
    "author": "Kirill Ermakov",
    "author_email": "isox@vulners.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/2e/a7c216d8315b903e5f130e77fa2967370ad13e4276c1f7d99bb8500f815b/vulners-2.1.5.tar.gz",
    "platform": null,
    "description": "# [Vulners API v3](https://vulners.com) Python wrapper\n\n\n# Description\nPython 2/3 library for the [Vulners Database](https://vulners.com).\nIt provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.\nWith this library you can create powerful security tools and get access to the world largest security database.\n\n## Python version\nLibrary was tested on a *python2* and *python3*.\n\n## How to install\n\nPackage is available with [PyPI](https://pypi.python.org/pypi) \n\nYou can use pip for the installation\n\n```bash\npip install -U vulners\n```\n\n## Obtaining Vulners API key\n\nPlease, register at [Vulners website](https://vulners.com).\nGo to the personal menu by clicking at your name at the right top corner.\nFollow \"API KEYS\" tab.\nGenerate API key with scope \"api\" and use it with the library.\n\n# Functions and methods\n\nAll the callable methods are using [Vulners REST API](https://vulners.com/docs).\n\n### Search in database\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nheartbleed_related = vulners_api.find_all(\"heartbleed\", limit=10)\n```\n### Get information about document by identificator\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nCVE_2017_14174 = vulners_api.get_bulletin(\"CVE-2017-14174\")\n```\n### Get information about multiple documents by identificators\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nCVE_DATA = vulners_api.get_multiple_bulletins([\"CVE-2017-14174\", \"CVE-2016-1175\"])\n```\n### Search for the public available exploits\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nwordpress_exploits = vulners_api.find_exploit_all(\"wordpress 4.7.0\")\n```\n### Get vulnerabilities and exploits by software name and version\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\n\nresults = vulners_api.get_software_vulnerabilities(\"httpd\", \"1.3\")\nvulnerabilities_list = [results[key] for key in results if key not in (\"info\", \"blog\", \"bugbounty\")]\n```\n### Get vulnerabilities by CPE product and version string\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\n\ncpe_results = vulners_api.get_cpe_vulnerabilities(\"cpe:/a:cybozu:garoon:4.2.1\")\ncpe_vulnerabilities_list = [cpe_results[key] for key in cpe_results if key not in (\"info\", \"blog\", \"bugbounty\")]\n```\n### Get references for the vulnerability\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nreferences = vulners_api.get_bulletin_references(\"CVE-2014-0160\")\n```\n### Get Windows KB superseeding and parentseeding information\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\n# Superseeding information will be returned as a dict\n# with two keys: \"superseeds\" and \"parentseeds\".\n# Superseeds means \"what KB are covered by this KB\".\n# Parentseeds means \"what KB are covering this KB\".\nsuperseeds = vulners_api.get_kb_seeds(\"KB4524135\")\n```\n### Get Windows KB updates list and download urls\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nmicrosoft_updates_for_kb = vulners_api.get_kb_updates(\"KB4524135\")\nupdates_download_links = [update[\"href\"] for update in microsoft_updates_for_kb]\n```\n### Score any vulnerability description using [Vulners AI](https://lab.wallarm.com/new-from-wallarm-research-first-ai-based-tool-to-predict-vulnerability-risk-2d0a7e9b3474)\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\ntext_ai_score = vulners_api.get_ai_score(\"My cool vulnerability description\")\n```\n### Get possible query autocompletions\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\npossible_autocomplete = vulners_api.query_autocomplete(\"heartbleed\")\n\n```\n### Download whole database collection and work with data locally\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nall_cve = vulners_api.get_collection(\"cve\")\n```\n### Audit Windows hosts for installed security KB\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nwin_vulners = vulners_api.kb_audit(os=\"Windows Server 2012 R2\", kb_list=[\"KB4072650\", \"KB2959936\", \"KB2894856\", \"KB2896496\"])\nneed_2_install_kb = win_vulners[\"kbMissed\"]\naffected_cve = win_vulners[\"cvelist\"]\n```\n### Audit Linux hosts for vulnerabilities (RPM/DEB based)\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\n\n# Example for CentOS 7\n# You can use it for any RPM based OS\n# Execute command: rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\\\n'\n# Use it as package variable input\n\ncentos_vulnerabilities = vulners_api.os_audit(os=\"centos\", version=\"7\", packages=[\"glibc-common-2.17-157.el7_3.5.x86_64\"])\nvulnerable_packages = centos_vulnerabilities.get(\"packages\")\nmissed_patches_ids = centos_vulnerabilities.get(\"vulnerabilities\")\ncve_list = centos_vulnerabilities.get(\"cvelist\")\nhow_to_fix = centos_vulnerabilities.get(\"cumulativeFix\")\n\n# Example for Debian 8\n# You can use it for any DEB based OS\n# Execute command: dpkg-query -W -f='${Package} ${Version} ${Architecture}\\\\n'\n# Use it as package variable input\n\ndebian_vulnerabilities = vulners_api.os_audit(os=\"debian\", version=\"8\", packages=['uno-libs3 4.3.3-2+deb8u7 amd64'])\n```\n\n### Download Linux (RPM/DEB based) vulnerability assessment data for local processing\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\n\n# Example for CentOS 7\ncentos_vulnerabilities_data = vulners_api.get_distributive(\"CentOS\", \"7\")\n```\n### Download web application vulnerability detection regex collection\n```python\nimport vulners\n\nvulners_api = vulners.VulnersApi(api_key=\"YOUR_API_KEY_HERE\")\nrules = vulners_api.get_web_application_rules()\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python library and command-line utility for Vulners (https://vulners.com)",
    "version": "2.1.5",
    "project_urls": null,
    "split_keywords": [
        "security",
        "network",
        "vulners",
        "vulnerability",
        "cve"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "515e9231013082ba7894842da839707f1fdec2da66339b1c02dd926a59087e15",
                "md5": "15699a61098f767014c77197d6d3fcfa",
                "sha256": "4245634d94d15d8e4cfb83a4d3eb3b36dc7bbc1df1e46e9142d087cc249bb2a4"
            },
            "downloads": -1,
            "filename": "vulners-2.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15699a61098f767014c77197d6d3fcfa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 28151,
            "upload_time": "2024-01-22T13:31:29",
            "upload_time_iso_8601": "2024-01-22T13:31:29.785919Z",
            "url": "https://files.pythonhosted.org/packages/51/5e/9231013082ba7894842da839707f1fdec2da66339b1c02dd926a59087e15/vulners-2.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce2ea7c216d8315b903e5f130e77fa2967370ad13e4276c1f7d99bb8500f815b",
                "md5": "33a10db24c6ebed5bd492deffdf70b34",
                "sha256": "3f23c924a761a3260931463050f7683bb5e0fd57dbe7cc2ddde77666cc05bc1b"
            },
            "downloads": -1,
            "filename": "vulners-2.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "33a10db24c6ebed5bd492deffdf70b34",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 29399,
            "upload_time": "2024-01-22T13:31:32",
            "upload_time_iso_8601": "2024-01-22T13:31:32.025223Z",
            "url": "https://files.pythonhosted.org/packages/ce/2e/a7c216d8315b903e5f130e77fa2967370ad13e4276c1f7d99bb8500f815b/vulners-2.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-22 13:31:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vulners"
}
        
Elapsed time: 0.17621s