forked from Moksh-Bhardwaj/BYPASS-BOT
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbypas.py
69 lines (52 loc) · 1.57 KB
/
bypas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import re
import requests
from base64 import b64decode
from urllib.parse import unquote
# ==========================================
URL = open('1.txt', 'r').read()
print("You Have Entered:")
print(URL)
print("Checking Link...")
'''
404: Complete exception handling not found :(
'''
print("Bypassing Link...")
# ==========================================
def decrypt_url(code):
a, b = '', ''
for i in range(0, len(code)):
if i % 2 == 0: a += code[i]
else: b = code[i] + b
key = list(a + b)
i = 0
while i < len(key):
if key[i].isdigit():
for j in range(i+1,len(key)):
if key[j].isdigit():
u = int(key[i]) ^ int(key[j])
if u < 10: key[i] = str(u)
i = j
break
i+=1
key = ''.join(key)
decrypted = b64decode(key)[16:-16]
return decrypted.decode('utf-8')
# ==========================================
def adfly_bypass(url):
res = requests.get(url).text
out = {'error': False, 'src_url': url}
try:
ysmm = re.findall("ysmm\s+=\s+['|\"](.*?)['|\"]", res)[0]
except:
out['error'] = True
return out
url = decrypt_url(ysmm)
if re.search(r'go\.php\?u\=', url):
url = b64decode(re.sub(r'(.*?)u=', '', url)).decode()
elif '&dest=' in url:
url = unquote(re.sub(r'(.*?)dest=', '', url))
out['bypassed_url'] = url
return out
# ==========================================
out = adfly_bypass(URL)
print(out ,file=open("2.txt", "w"))