aboutsummaryrefslogtreecommitdiff
path: root/http-what-repos.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-18 19:02:17 -0400
committerRob Austein <sra@hactrn.net>2016-06-18 19:02:17 -0400
commitef27539ad71977b06683bbc304760f366ed4199e (patch)
tree86e66ba6003fb1e88d879300a7c826fbd1722fa4 /http-what-repos.py
parent6b1074775e5f62541a31240e8abf44b5cd95b700 (diff)
Add --prune to fetch commands; track (old) HTTPS configuration changes; general cleanup.
Diffstat (limited to 'http-what-repos.py')
-rwxr-xr-xhttp-what-repos.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/http-what-repos.py b/http-what-repos.py
deleted file mode 100755
index 27125bd..0000000
--- a/http-what-repos.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-
-# List Cryptech git repository URLs by scraping them from the
-# automatically generated Trac page. Yes, we know too much about how
-# the generation script and Trac format this page, c'est la vie.
-
-from urllib import urlopen
-from xml.etree.ElementTree import ElementTree
-from tempfile import NamedTemporaryFile
-from os import environ, fchmod
-
-url = "https://wiki.cryptech.is/wiki/GitRepositories"
-
-cacert = '''\
------BEGIN CERTIFICATE-----
-MIIERzCCAy+gAwIBAgIBADANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQGEwJVUzEL
-MAkGA1UECBMCTUExEDAOBgNVBAcTB1JlYWRpbmcxITAfBgNVBAoTGEdydW5jaHdl
-YXRoZXIgQXNzb2NpYXRlczEkMCIGCSqGSIb3DQEJARYVcG9zdG1hc3RlckBoYWN0
-cm4ubmV0MCAXDTEwMDkyNTA1MzQ0MloYDzIxMDkwOTI1MDUzNDQyWjB1MQswCQYD
-VQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB1JlYWRpbmcxITAfBgNVBAoT
-GEdydW5jaHdlYXRoZXIgQXNzb2NpYXRlczEkMCIGCSqGSIb3DQEJARYVcG9zdG1h
-c3RlckBoYWN0cm4ubmV0MIIBIjANBgkqhkiG9w0BAQEFA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lATQpn/w==
------END CERTIFICATE-----
-'''
-
-try:
- ssl_cert_file = NamedTemporaryFile("w")
- ssl_cert_file.write(cacert)
- ssl_cert_file.flush()
- try:
- fchmod(ssl_cert_file.fileno(), 0600)
- except:
- pass
- environ["SSL_CERT_FILE"] = ssl_cert_file.name # OpenSSL looks for this
- environ["GIT_SSL_CAINFO"] = ssl_cert_file.name # Git looks for this
-
- for x in ElementTree(file = urlopen(url)).iter("{http://www.w3.org/1999/xhtml}tt"):
- if x.text.startswith("https://git.cryptech.is/") and x.text.endswith(".git"):
- print x.text
-
-finally:
- ssl_cert_file.close()