-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Allow to request only a number of results in CVE, CVE changes an…
…d CPE CLI Extend pontos-nvd-cves, pontos-nvd-cve-changes and pontos-nvd-cpes CLIs to allow requesting only a specific number of CVEs/CPEs.
- Loading branch information
1 parent
60693a0
commit 8c16e51
Showing
3 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ async def query_cves(args: Namespace) -> None: | |
cvss_v2_vector=args.cvss_v2_vector, | ||
cvss_v3_vector=args.cvss_v3_vector, | ||
source_identifier=args.source_identifier, | ||
request_results=args.number, | ||
): | ||
print(cve) | ||
|
||
|
@@ -66,6 +67,9 @@ def cves_main() -> None: | |
help="Get all CVE information with the source identifier. For example: " | ||
"[email protected]", | ||
) | ||
parser.add_argument( | ||
"--number", "-n", metavar="N", help="Request only N CVEs", type=int | ||
) | ||
|
||
main(parser, query_cves) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters