vulners 2.3.2__tar.gz → 2.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vulners-2.3.4/PKG-INFO ADDED
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.1
2
+ Name: vulners
3
+ Version: 2.3.4
4
+ Summary: Python library and command-line utility for Vulners (https://vulners.com)
5
+ Keywords: security,network,vulners,vulnerability,CVE
6
+ Author: Vulners Team
7
+ Requires-Python: >=3.8
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Information Technology
11
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Software Development :: Version Control
22
+ Classifier: Topic :: Utilities
23
+ Requires-Dist: appdirs (>=1.4.4,<2.0.0)
24
+ Requires-Dist: requests (>=2.31.0,<3.0.0)
25
+ Requires-Dist: six (>=1.16.0,<2.0.0)
26
+ Description-Content-Type: text/markdown
27
+
28
+ # [Vulners API v3](https://vulners.com) Python wrapper
29
+
30
+
31
+ # Description
32
+ Python 3 library for the [Vulners Database](https://vulners.com).
33
+ It provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.
34
+ With this library you can create powerful security tools and get access to the world largest security database.
35
+
36
+ ## How to install
37
+
38
+ Package is available with [PyPI](https://pypi.python.org/pypi)
39
+
40
+ You can use pip for the installation
41
+
42
+ ```bash
43
+ pip install -U vulners
44
+ ```
45
+
46
+ ## Obtaining Vulners API key
47
+
48
+ Please, register at [Vulners website](https://vulners.com).
49
+ Go to the personal menu by clicking at your name at the right top corner.
50
+ Follow "API KEYS" tab.
51
+ Generate API key with scope "api" and use it with the library.
52
+
53
+ # Documentation
54
+ The full API methods description, usage examples, and integration guide are available in the official documentation: [API Reference](https://vulners.com/docs/api_reference/api/).
55
+
56
+
@@ -0,0 +1,28 @@
1
+ # [Vulners API v3](https://vulners.com) Python wrapper
2
+
3
+
4
+ # Description
5
+ Python 3 library for the [Vulners Database](https://vulners.com).
6
+ It provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.
7
+ With this library you can create powerful security tools and get access to the world largest security database.
8
+
9
+ ## How to install
10
+
11
+ Package is available with [PyPI](https://pypi.python.org/pypi)
12
+
13
+ You can use pip for the installation
14
+
15
+ ```bash
16
+ pip install -U vulners
17
+ ```
18
+
19
+ ## Obtaining Vulners API key
20
+
21
+ Please, register at [Vulners website](https://vulners.com).
22
+ Go to the personal menu by clicking at your name at the right top corner.
23
+ Follow "API KEYS" tab.
24
+ Generate API key with scope "api" and use it with the library.
25
+
26
+ # Documentation
27
+ The full API methods description, usage examples, and integration guide are available in the official documentation: [API Reference](https://vulners.com/docs/api_reference/api/).
28
+
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "vulners"
3
- version = "2.3.2"
3
+ version = "2.3.4"
4
4
  description = "Python library and command-line utility for Vulners (https://vulners.com)"
5
5
  readme = "README.md"
6
6
  authors = ["Vulners Team"]
@@ -261,7 +261,6 @@ class Any(Param):
261
261
  return _param.validate(param, value)
262
262
  except ParamError as e:
263
263
  errs.append(e)
264
- pass
265
264
 
266
265
  raise ParamError(
267
266
  "Expect %s but got '%s'",
@@ -249,10 +249,24 @@ class VulnersApi(VulnersApiBase):
249
249
  (
250
250
  "software",
251
251
  List(
252
- item=Dict(),
252
+ item=Any(Dict, String),
253
253
  description="List of dicts. E.g., [{'product': 'curl', 'version': '8.11.1', ...}, ...]",
254
254
  ),
255
255
  ),
256
+ (
257
+ "match",
258
+ String(
259
+ required=False,
260
+ description="'partial' (default) or 'full'",
261
+ ),
262
+ ),
263
+ (
264
+ "fields",
265
+ List(
266
+ required=False,
267
+ description="List of fields to retrieve about each vulnerability",
268
+ ),
269
+ ),
256
270
  ],
257
271
  content_handler=lambda c, _: c["result"],
258
272
  )
@@ -264,13 +278,27 @@ class VulnersApi(VulnersApiBase):
264
278
  (
265
279
  "software",
266
280
  List(
267
- item=Dict(),
281
+ item=Any(Dict, String),
268
282
  description="List of dicts. E.g., [{'product': 'curl', 'version': '8.11.1', ...}, ...]",
269
283
  ),
270
284
  ),
271
285
  ("application", Any(String, Dict, required=False)),
272
286
  ("operation_system", Any(String, Dict, required=False)),
273
287
  ("hardware", Any(String, Dict, required=False)),
288
+ (
289
+ "match",
290
+ String(
291
+ required=False,
292
+ description="'partial' (default) or 'full'",
293
+ ),
294
+ ),
295
+ (
296
+ "fields",
297
+ List(
298
+ required=False,
299
+ description="List of fields to retrieve about each vulnerability",
300
+ ),
301
+ ),
274
302
  ],
275
303
  content_handler=lambda c, _: c["result"],
276
304
  )
@@ -299,6 +327,15 @@ class VulnersApi(VulnersApiBase):
299
327
  only_ids,
300
328
  )
301
329
 
330
+ search_cpe = Endpoint(
331
+ method="get",
332
+ url="/api/v4/search/cpe/",
333
+ params=[
334
+ ("product", String(required=True, description="Product string to search CPE for")),
335
+ ("vendor", String(required=False, description="Optional vendor to include in CPE")),
336
+ ],
337
+ )
338
+
302
339
  get_multiple_bulletins = Endpoint(
303
340
  method="post",
304
341
  url="/api/v3/search/id/",
vulners-2.3.2/PKG-INFO DELETED
@@ -1,204 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: vulners
3
- Version: 2.3.2
4
- Summary: Python library and command-line utility for Vulners (https://vulners.com)
5
- Keywords: security,network,vulners,vulnerability,CVE
6
- Author: Vulners Team
7
- Requires-Python: >=3.8
8
- Classifier: Development Status :: 5 - Production/Stable
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Intended Audience :: Information Technology
11
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
- Classifier: Topic :: Software Development :: Version Control
22
- Classifier: Topic :: Utilities
23
- Requires-Dist: appdirs (>=1.4.4,<2.0.0)
24
- Requires-Dist: requests (>=2.31.0,<3.0.0)
25
- Requires-Dist: six (>=1.16.0,<2.0.0)
26
- Description-Content-Type: text/markdown
27
-
28
- # [Vulners API v3](https://vulners.com) Python wrapper
29
-
30
-
31
- # Description
32
- Python 2/3 library for the [Vulners Database](https://vulners.com).
33
- It provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.
34
- With this library you can create powerful security tools and get access to the world largest security database.
35
-
36
- ## Python version
37
- Library was tested on a *python2* and *python3*.
38
-
39
- ## How to install
40
-
41
- Package is available with [PyPI](https://pypi.python.org/pypi)
42
-
43
- You can use pip for the installation
44
-
45
- ```bash
46
- pip install -U vulners
47
- ```
48
-
49
- ## Obtaining Vulners API key
50
-
51
- Please, register at [Vulners website](https://vulners.com).
52
- Go to the personal menu by clicking at your name at the right top corner.
53
- Follow "API KEYS" tab.
54
- Generate API key with scope "api" and use it with the library.
55
-
56
- # Functions and methods
57
-
58
- All the callable methods are using [Vulners REST API](https://vulners.com/docs).
59
-
60
- ### Search in database
61
- ```python
62
- import vulners
63
-
64
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
65
- heartbleed_related = vulners_api.find_all("heartbleed", limit=10)
66
- ```
67
- ### Get information about document by identificator
68
- ```python
69
- import vulners
70
-
71
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
72
- CVE_2017_14174 = vulners_api.get_bulletin("CVE-2017-14174")
73
- ```
74
- ### Get information about multiple documents by identificators
75
- ```python
76
- import vulners
77
-
78
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
79
- CVE_DATA = vulners_api.get_multiple_bulletins(["CVE-2017-14174", "CVE-2016-1175"])
80
- ```
81
- ### Search for the public available exploits
82
- ```python
83
- import vulners
84
-
85
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
86
- wordpress_exploits = vulners_api.find_exploit_all("wordpress 4.7.0")
87
- ```
88
- ### Get vulnerabilities and exploits by software name and version
89
- ```python
90
- import vulners
91
-
92
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
93
-
94
- results = vulners_api.get_software_vulnerabilities("httpd", "1.3")
95
- vulnerabilities_list = [results[key] for key in results if key not in ("info", "blog", "bugbounty")]
96
- ```
97
- ### Get vulnerabilities by CPE product and version string
98
- ```python
99
- import vulners
100
-
101
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
102
-
103
- cpe_results = vulners_api.get_cpe_vulnerabilities("cpe:/a:cybozu:garoon:4.2.1")
104
- cpe_vulnerabilities_list = [cpe_results[key] for key in cpe_results if key not in ("info", "blog", "bugbounty")]
105
- ```
106
- ### Get references for the vulnerability
107
- ```python
108
- import vulners
109
-
110
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
111
- references = vulners_api.get_bulletin_references("CVE-2014-0160")
112
- ```
113
- ### Get Windows KB superseeding and parentseeding information
114
- ```python
115
- import vulners
116
-
117
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
118
- # Superseeding information will be returned as a dict
119
- # with two keys: "superseeds" and "parentseeds".
120
- # Superseeds means "what KB are covered by this KB".
121
- # Parentseeds means "what KB are covering this KB".
122
- superseeds = vulners_api.get_kb_seeds("KB4524135")
123
- ```
124
- ### Get Windows KB updates list and download urls
125
- ```python
126
- import vulners
127
-
128
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
129
- microsoft_updates_for_kb = vulners_api.get_kb_updates("KB4524135")
130
- updates_download_links = [update["href"] for update in microsoft_updates_for_kb]
131
- ```
132
- ### Score any vulnerability description using [Vulners AI](https://lab.wallarm.com/new-from-wallarm-research-first-ai-based-tool-to-predict-vulnerability-risk-2d0a7e9b3474)
133
- ```python
134
- import vulners
135
-
136
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
137
- text_ai_score = vulners_api.get_ai_score("My cool vulnerability description")
138
- ```
139
- ### Get possible query autocompletions
140
- ```python
141
- import vulners
142
-
143
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
144
- possible_autocomplete = vulners_api.query_autocomplete("heartbleed")
145
-
146
- ```
147
- ### Download whole database collection and work with data locally
148
- ```python
149
- import vulners
150
-
151
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
152
- all_cve = vulners_api.get_collection("cve")
153
- ```
154
- ### Audit Windows hosts for installed security KB
155
- ```python
156
- import vulners
157
-
158
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
159
- win_vulners = vulners_api.kb_audit(os="Windows Server 2012 R2", kb_list=["KB4072650", "KB2959936", "KB2894856", "KB2896496"])
160
- need_2_install_kb = win_vulners["kbMissed"]
161
- affected_cve = win_vulners["cvelist"]
162
- ```
163
- ### Audit Linux hosts for vulnerabilities (RPM/DEB based)
164
- ```python
165
- import vulners
166
-
167
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
168
-
169
- # Example for CentOS 7
170
- # You can use it for any RPM based OS
171
- # Execute command: rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\n'
172
- # Use it as package variable input
173
-
174
- centos_vulnerabilities = vulners_api.os_audit(os="centos", version="7", packages=["glibc-common-2.17-157.el7_3.5.x86_64"])
175
- vulnerable_packages = centos_vulnerabilities.get("packages")
176
- missed_patches_ids = centos_vulnerabilities.get("vulnerabilities")
177
- cve_list = centos_vulnerabilities.get("cvelist")
178
- how_to_fix = centos_vulnerabilities.get("cumulativeFix")
179
-
180
- # Example for Debian 8
181
- # You can use it for any DEB based OS
182
- # Execute command: dpkg-query -W -f='${Package} ${Version} ${Architecture}\\n'
183
- # Use it as package variable input
184
-
185
- debian_vulnerabilities = vulners_api.os_audit(os="debian", version="8", packages=['uno-libs3 4.3.3-2+deb8u7 amd64'])
186
- ```
187
-
188
- ### Download Linux (RPM/DEB based) vulnerability assessment data for local processing
189
- ```python
190
- import vulners
191
-
192
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
193
-
194
- # Example for CentOS 7
195
- centos_vulnerabilities_data = vulners_api.get_distributive("CentOS", "7")
196
- ```
197
- ### Download web application vulnerability detection regex collection
198
- ```python
199
- import vulners
200
-
201
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
202
- rules = vulners_api.get_web_application_rules()
203
- ```
204
-
vulners-2.3.2/README.md DELETED
@@ -1,176 +0,0 @@
1
- # [Vulners API v3](https://vulners.com) Python wrapper
2
-
3
-
4
- # Description
5
- Python 2/3 library for the [Vulners Database](https://vulners.com).
6
- It provides *search, data retrieval, archive and vulnerability scanning* API's for the integration purposes.
7
- With this library you can create powerful security tools and get access to the world largest security database.
8
-
9
- ## Python version
10
- Library was tested on a *python2* and *python3*.
11
-
12
- ## How to install
13
-
14
- Package is available with [PyPI](https://pypi.python.org/pypi)
15
-
16
- You can use pip for the installation
17
-
18
- ```bash
19
- pip install -U vulners
20
- ```
21
-
22
- ## Obtaining Vulners API key
23
-
24
- Please, register at [Vulners website](https://vulners.com).
25
- Go to the personal menu by clicking at your name at the right top corner.
26
- Follow "API KEYS" tab.
27
- Generate API key with scope "api" and use it with the library.
28
-
29
- # Functions and methods
30
-
31
- All the callable methods are using [Vulners REST API](https://vulners.com/docs).
32
-
33
- ### Search in database
34
- ```python
35
- import vulners
36
-
37
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
38
- heartbleed_related = vulners_api.find_all("heartbleed", limit=10)
39
- ```
40
- ### Get information about document by identificator
41
- ```python
42
- import vulners
43
-
44
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
45
- CVE_2017_14174 = vulners_api.get_bulletin("CVE-2017-14174")
46
- ```
47
- ### Get information about multiple documents by identificators
48
- ```python
49
- import vulners
50
-
51
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
52
- CVE_DATA = vulners_api.get_multiple_bulletins(["CVE-2017-14174", "CVE-2016-1175"])
53
- ```
54
- ### Search for the public available exploits
55
- ```python
56
- import vulners
57
-
58
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
59
- wordpress_exploits = vulners_api.find_exploit_all("wordpress 4.7.0")
60
- ```
61
- ### Get vulnerabilities and exploits by software name and version
62
- ```python
63
- import vulners
64
-
65
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
66
-
67
- results = vulners_api.get_software_vulnerabilities("httpd", "1.3")
68
- vulnerabilities_list = [results[key] for key in results if key not in ("info", "blog", "bugbounty")]
69
- ```
70
- ### Get vulnerabilities by CPE product and version string
71
- ```python
72
- import vulners
73
-
74
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
75
-
76
- cpe_results = vulners_api.get_cpe_vulnerabilities("cpe:/a:cybozu:garoon:4.2.1")
77
- cpe_vulnerabilities_list = [cpe_results[key] for key in cpe_results if key not in ("info", "blog", "bugbounty")]
78
- ```
79
- ### Get references for the vulnerability
80
- ```python
81
- import vulners
82
-
83
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
84
- references = vulners_api.get_bulletin_references("CVE-2014-0160")
85
- ```
86
- ### Get Windows KB superseeding and parentseeding information
87
- ```python
88
- import vulners
89
-
90
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
91
- # Superseeding information will be returned as a dict
92
- # with two keys: "superseeds" and "parentseeds".
93
- # Superseeds means "what KB are covered by this KB".
94
- # Parentseeds means "what KB are covering this KB".
95
- superseeds = vulners_api.get_kb_seeds("KB4524135")
96
- ```
97
- ### Get Windows KB updates list and download urls
98
- ```python
99
- import vulners
100
-
101
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
102
- microsoft_updates_for_kb = vulners_api.get_kb_updates("KB4524135")
103
- updates_download_links = [update["href"] for update in microsoft_updates_for_kb]
104
- ```
105
- ### Score any vulnerability description using [Vulners AI](https://lab.wallarm.com/new-from-wallarm-research-first-ai-based-tool-to-predict-vulnerability-risk-2d0a7e9b3474)
106
- ```python
107
- import vulners
108
-
109
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
110
- text_ai_score = vulners_api.get_ai_score("My cool vulnerability description")
111
- ```
112
- ### Get possible query autocompletions
113
- ```python
114
- import vulners
115
-
116
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
117
- possible_autocomplete = vulners_api.query_autocomplete("heartbleed")
118
-
119
- ```
120
- ### Download whole database collection and work with data locally
121
- ```python
122
- import vulners
123
-
124
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
125
- all_cve = vulners_api.get_collection("cve")
126
- ```
127
- ### Audit Windows hosts for installed security KB
128
- ```python
129
- import vulners
130
-
131
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
132
- win_vulners = vulners_api.kb_audit(os="Windows Server 2012 R2", kb_list=["KB4072650", "KB2959936", "KB2894856", "KB2896496"])
133
- need_2_install_kb = win_vulners["kbMissed"]
134
- affected_cve = win_vulners["cvelist"]
135
- ```
136
- ### Audit Linux hosts for vulnerabilities (RPM/DEB based)
137
- ```python
138
- import vulners
139
-
140
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
141
-
142
- # Example for CentOS 7
143
- # You can use it for any RPM based OS
144
- # Execute command: rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\n'
145
- # Use it as package variable input
146
-
147
- centos_vulnerabilities = vulners_api.os_audit(os="centos", version="7", packages=["glibc-common-2.17-157.el7_3.5.x86_64"])
148
- vulnerable_packages = centos_vulnerabilities.get("packages")
149
- missed_patches_ids = centos_vulnerabilities.get("vulnerabilities")
150
- cve_list = centos_vulnerabilities.get("cvelist")
151
- how_to_fix = centos_vulnerabilities.get("cumulativeFix")
152
-
153
- # Example for Debian 8
154
- # You can use it for any DEB based OS
155
- # Execute command: dpkg-query -W -f='${Package} ${Version} ${Architecture}\\n'
156
- # Use it as package variable input
157
-
158
- debian_vulnerabilities = vulners_api.os_audit(os="debian", version="8", packages=['uno-libs3 4.3.3-2+deb8u7 amd64'])
159
- ```
160
-
161
- ### Download Linux (RPM/DEB based) vulnerability assessment data for local processing
162
- ```python
163
- import vulners
164
-
165
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
166
-
167
- # Example for CentOS 7
168
- centos_vulnerabilities_data = vulners_api.get_distributive("CentOS", "7")
169
- ```
170
- ### Download web application vulnerability detection regex collection
171
- ```python
172
- import vulners
173
-
174
- vulners_api = vulners.VulnersApi(api_key="YOUR_API_KEY_HERE")
175
- rules = vulners_api.get_web_application_rules()
176
- ```
File without changes
File without changes
File without changes
File without changes