30.11.2020: Updated with the new patchseries and instructions for Windows
02.12.2020: Added tweaks
08.12.2020: Updated with patchseries v4
31.01.2020: Updated with patchseries v6
import requests | |
import sys | |
import xml.etree.ElementTree as ET | |
from cryptography import x509 | |
''' | |
Usage: checkKB.py keybox.xml | |
Checks the EC and RSA certificates against the official CRL |
/** | |
* Recursive depth-first search to find all shadow roots within a webpage. | |
* | |
* Example usage: let's imagine you come across a page that has a bunch of | |
* expandable information sections, and you would like to expand all of those | |
* info sections for the sake of printing to a PDF or for the ease of | |
* performing a simple `CTRL+F` search across the information. Let's assume | |
* those expanding buttons are buried within Shadow DOM. (Perhaps the site is | |
* using Angular or something of the sort & the buttons are separate | |
* components, thus by default they end up in a Shadow DOM whenever included.) |
by Jenny Knuth, based on the work of Chris Coyier and Taylor Hunt
A data URI is a nice way to include a web resource without needing to make an HTTP request. Chris Coyier explains the technique nicely in Probably Don't Base64 SVG.
While a PNG might use Base64 encoding, for SVG, there is a better way.
Taylor Hunt's experiments led to this solution for optimizing SVGs in data URIs:
"So the best way of encoding SVG in a data URI is data:image/svg+xml,[actual data]
. We don’t need the ;charset=utf-8
parameter (or the invalid ;utf8
parameter…), because URLs are always ASCII."
function en(c) { | |
var x = "charCodeAt", b, e = {}, f = c.split(""), d = [], a = f[0], g = 256; | |
for (b = 1; b < f.length; b++) c = f[b], null != e[a + c] ? a += c :(d.push(1 < a.length ? e[a] :a[x](0)), | |
e[a + c] = g, g++, a = c); | |
d.push(1 < a.length ? e[a] :a[x](0)); | |
for (b = 0; b < d.length; b++) d[b] = String.fromCharCode(d[b]); | |
return d.join(""); | |
} | |
function de(b) { |