From 86326e6f7a1560c2b0be93bab9161663c78d7953 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 31 Jan 2014 10:17:52 -0500 Subject: [PATCH] script to replace http with https in all relevant URLs this replaces http:// urls with https:// urls on all sites that default to https, or support it well. This is important even for downloads that are verified using a hash sum or signature because it both provides an alternate, backup method of verifying the download, but also greatly reduces meta data leaks. --- metadata/fix-standard-urls-to-use-https.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 metadata/fix-standard-urls-to-use-https.sh diff --git a/metadata/fix-standard-urls-to-use-https.sh b/metadata/fix-standard-urls-to-use-https.sh new file mode 100755 index 0000000000..310acca012 --- /dev/null +++ b/metadata/fix-standard-urls-to-use-https.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# this replaces http:// urls with https:// urls on all sites that default to +# https, or support it well. This is important even for downloads that are +# verified using a hash sum or signature because it both provides an +# alternate, backup method of verifying the download, but also greatly reduces +# meta data leaks. + +for f in *.txt; do + printf `echo $f | cut -b1` + sed -i 's,http://dl.google.com,https://dl.google.com,g' $f + sed -i 's,http://pypi,https://pypi,g' $f + sed -i 's,http://code.google.com,https://code.google.com,g' $f + sed -i 's,http://github.com,https://github.com,g' $f + sed -i 's,http://\([^.]*\).googlecode.com/svn,https://\1.googlecode.com/svn,g' $f + sed -i 's,http://svn.apache.org/repos,https://svn.apache.org/repos,g' $f + sed -i 's,http://svn.code.sf.net,https://svn.code.sf.net,g' $f + sed -i 's,http://gitorious.org,https://gitorious.org,g' $f +done +echo ""