forked from alecmuffett/real-world-onion-sites
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget-ct-log.sh
executable file
·25 lines (20 loc) · 867 Bytes
/
get-ct-log.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
log=ct-log.md
tf=/tmp/ctget$$.txt
sanity=amuffettdexn6r5s4lt45b6mlrgmsmo56szaaighyjurp4ccuj63zkad
(
echo "# Onion Certificate Transparency Log"
echo "## This file is auto-generated (without editorial assistance) from CA certificate issuance logs"
./onion-ctlog.py
) > $tf
#curl "https://crt.sh/?q=\.onion" |
# perl -nle 'next unless m!TD.*\.onion\b!; s!\s+!\n!go; s!</?TD>!\n!goi; s!<BR>!\n!goi; print' |
# egrep '[2-7a-z]{56}\.onion$' |
# sort -u |
# awk -F. '{print $(NF-1), $0}' |
# sort |
# awk 'BEGIN {print "# Onion Certificate Transparency Log";print "## This file is auto-generated (without editorial assistance) from CA certificate issuance logs"} $2~/^\*/{print "* *wildcard* `" $2 "`"; next} {url = "https://" $2; printf("* [`%s`](%s)\n",url,url)}' >$tf
grep $sanity $tf &&
cp $tf $log &&
rm $tf
exit 0