Ok
solution for py2:
Python
if PYTHON_VER == 3:
from urllib.request import urlopen, Request
ssl_context = ssl.create_default_context()
# Disabilita SSLv2, SSLv3, TLS1.0 e TLS1.1 esplicitamente
ssl_context.options |= ssl.OP_NO_SSLv2
ssl_context.options |= ssl.OP_NO_SSLv3
ssl_context.options |= ssl.OP_NO_TLSv1
ssl_context.options |= ssl.OP_NO_TLSv1_1
unichr_func = unichr
else:
from urllib2 import urlopen, Request
ssl_context = None
unichr_func = chr
def getAuthSignature():
signfile = get_cache('signfile')
if signfile:
return signfile
veclist = get_cache("veclist")
if not veclist:
try:
if ssl_context:
req = Request("https://raw.githubusercontent.com/Belfagor2005/vavoo/refs/heads/main/data.json")
with urlopen(req, context=ssl_context) as r:
veclist = json.load(r)
else:
response = requests.get("https://raw.githubusercontent.com/Belfagor2005/vavoo/refs/heads/main/data.json", verify=False)
veclist = response.json()
except Exception as e:
print("[vUtils] Failed to fetch veclist:", e)
return None
set_cache("veclist", veclist, timeout=3600)
sig = None
i = 0
while not sig and i < 50:
i += 1
vec = {"vec": choice(veclist)}
req = requests.post('https://www.vavoo.tv/api/box/ping2', data=vec).json()
sig = req.get('signed') or req.get('data', {}).get('signed') or req.get('response', {}).get('signed')
if sig:
set_cache('signfile', convert_to_unicode(sig), timeout=3600)
return sig
Display More
