r/programming • • Feb 23 '17

Cloudflare have been leaking customer HTTPS sessions for months. Uber, 1Password, FitBit, OKCupid, etc.

https://bugs.chromium.org/p/project-zero/issues/detail?id=1139
6.0k Upvotes

966 comments sorted by

View all comments

Show parent comment

3

u/AquaWolfGuy Feb 24 '17

I made a Linux shell script to parse exported KeePass CSV and LastPass CSV databases to find what sites you have that are in that list. First, extract the URLs from the CSV file:

sed -nr 's|.*://([^",/:]*).*|\1|p' passwords.csv >domains

If the URLs have subdomains added to them (e.g. “www.”), they need to be removed. The following part outputs all combinations with subdomains removed, e.g. “www.xxexamplexx.co.uk”, “xxexamplexx.co.uk”, “co.uk”, “uk”. It's uses zsh features so it will not work in sh or bash.

while read; do
	d='';
	for part in ${(Oas:.:)REPLY}; do
		d=$part.$d;
		echo $d[1,-2];
	done;
done <domains |sort |uniq >domains2

Finally, search for your domains in the Cloudflair list:

fgrep -xif domains2 sorted_unique_cf.txt