Skip to content

Instantly share code, notes, and snippets.

@bwbroersma
Last active June 11, 2021 09:59
Show Gist options
  • Save bwbroersma/6e06561ffe99b311c0608e5b8cd39e3d to your computer and use it in GitHub Desktop.
Save bwbroersma/6e06561ffe99b311c0608e5b8cd39e3d to your computer and use it in GitHub Desktop.
#!/bin/sh
# check https://www.icao.int/Security/FAL/PKD/Pages/ICAO-Master-List.aspx for the URL
curl -OL 'https://www.icao.int/Security/FAL/PKD/MasterListAD3172FF-9D1E-4589-91D5-34C3793053F0/ICAO_ml_2021.04.06.ml'
binwalk ICAO_ml_2021.04.06.ml | awk '{system("dd bs=1 skip="$1" count="($14+4)" if=ICAO_ml_2021.04.06.ml of="$1".cer")}'
# for f in *.cer; do >&2 echo -n "$f:"; openssl x509 -inform DER -subject -noout -in $f 2>/dev/null; done | grep 'C = NL'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment