$ sqlite3 cert8.db SQLite version 3.3.6 Enter ".help" for instructions sqlite> .tables Error: file is encrypted or is not a database #### my %certs; my @stored_certs; # Get stored certificates: my $command = "strings $config{firefox_profile}/cert8.db"; open(OUTPUT , "-|", "$command"); while (my $line = ){ chomp $line; if ($line =~ /CN=/i) { $line =~ s/^!//g; $line =~ s/(^\s+|\s+$)//g; if (! $certs{$line}) { $certs{$line}{stored_in_firefox}++; } } } close OUTPUT; # Get each stores certificate's trust level: $command = "certutil -L -d $config{firefox_profile}"; open(OUTPUT, "-|", "$command"); while (my $line = ){ chomp $line; push (@stored_certs, $line); } foreach my $cert (sort keys %certs) { foreach my $line (@stored_certs) { if ($line =~ /^$cert/) { $line =~ s/^$cert//; $line =~ s/(^\s+|\s+$)//; $lcerts{$cert}{trust_level} = $line; } } }