python script that whether a jitsi instance uses googles stun servers
import requests as req | |
import re | |
domains = [ | |
"jitsi.linux.it", | |
"chat01.kuketz-meet.de" | |
] | |
bad_stuns = { | |
r"stun[\d]{0,1}\.l\.google\.com": "Google" | |
} | |
for domain in domains: | |
page = req.get('https://' + domain + "/testmeeting") | |
if page.status_code != 200: | |
print("error testing " + domain + ": " + page) | |
continue | |
is_bad = False | |
for (bad_stun, reason) in bad_stuns.items(): | |
matches = re.findall("\n.*" + bad_stun, page.text) | |
for match in matches: | |
if "//" not in match: | |
print(domain + " uses " + reason) | |
is_bad = True | |
break | |
if not is_bad: | |
print(domain + " is good") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment