-
-
Save geor-g/f0bafc277a5f0518449be88bd5e59472 to your computer and use it in GitHub Desktop.
python script that whether a jitsi instance uses googles stun servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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