Prova IPv6 #
This commit is contained in:
@@ -224,7 +224,7 @@ def findvideos(item):
|
|||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
|
|
||||||
# Calculate Token
|
# Calculate Token
|
||||||
client_ip = support.httptools.downloadpage('https://scws.xyz/videos/{}'.format(item.scws_id), headers=headers).json.get('client_ip')
|
client_ip = support.httptools.downloadpage('https://api64.ipify.org/').data
|
||||||
expires = int(time() + 172800)
|
expires = int(time() + 172800)
|
||||||
token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -24,7 +24,8 @@ else:
|
|||||||
_urlopen = urllib2.urlopen
|
_urlopen = urllib2.urlopen
|
||||||
_Request = urllib2.Request
|
_Request = urllib2.Request
|
||||||
|
|
||||||
ipv6 = ':' in _urlopen('https://api64.ipify.org/').read().decode()
|
# ipv6 = ':' in _urlopen('https://api64.ipify.org/').read().decode()
|
||||||
|
ipv6 = False
|
||||||
|
|
||||||
|
|
||||||
def query(name, type='AAAA' if ipv6 else 'A', server=DOH_SERVER, path="/dns-query", fallback=True):
|
def query(name, type='AAAA' if ipv6 else 'A', server=DOH_SERVER, path="/dns-query", fallback=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user