From 005a042263313b7b3e051e11db40a2331dad299a Mon Sep 17 00:00:00 2001 From: Tracey Clark Date: Wed, 21 Feb 2024 18:48:33 -0600 Subject: [PATCH] Add WIP script for getting CVE numbers for Solus Thunderbird changelogs --- solus_utility/get_thunderbird_cve_nums.pl | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 solus_utility/get_thunderbird_cve_nums.pl diff --git a/solus_utility/get_thunderbird_cve_nums.pl b/solus_utility/get_thunderbird_cve_nums.pl new file mode 100644 index 0000000..f6e6c65 --- /dev/null +++ b/solus_utility/get_thunderbird_cve_nums.pl @@ -0,0 +1,41 @@ +#!/usr/bin/env perl + +use Modern::Perl; + +use FindBin; +use lib "$FindBin::RealBin/lib"; + +use Getopt::Long; +use Pod::Usage; +use WWW::Mechanize; +use Data::Dumper; + +my $successful_parse = GetOptions( + 'help|?' => \ my $help, + man => \ my $man, + 'url=s' => \ my $url + ) + or pod2usage(2); + +if ( !$successful_parse || ( @ARGV > 1 ) ) { + die qq{Usage: $0 [ --url]\n}; +} + +if ( !defined $url ) { + die qq{Usage: $0 [ --url]\n}; +} + +# Get url from input param +# https://www.mozilla.org/en-US/security/advisories/mfsa2024-07/ + +my $mechanize = WWW::Mechanize->new(autocheck => 1); +$mechanize->get($url); +my $page = $mechanize->content; + +# Get text from each level-heading class +# ex +#

+# And then Metacpan had a 502 so I couldn't find docs on how to get this X| + + +# Get CVEs in form of CVE-2024-1546 \ No newline at end of file