Fix vcrypt

This commit is contained in:
Alhaziel01
2020-04-05 10:43:19 +02:00
parent a19a1cdec1
commit 1e004a7b2f
2 changed files with 9 additions and 3 deletions

View File

@@ -519,12 +519,18 @@ class UnshortenIt(object):
uri = ''
logger.info('IP bannato da vcrypt, aspetta un ora')
else:
prev_uri = uri
uri = r.headers['location']
if uri == prev_uri:
uri = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False, cf=True).headers['location']
if "4snip" in uri:
logger.info('4SNIP: ' + uri)
if 'out_generator' in uri:
uri = re.findall('url=(.*)$', uri)[0]
elif '/decode/' in uri:
uri = decrypt(uri.split('/')[-1])
uri = httptools.downloadpage(uri, follow_redirects=True).url
# uri = decrypt(uri.split('/')[-1])
return uri, r.code if r else 200
except Exception as e: