-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathouo-bypass.py
101 lines (81 loc) · 3.18 KB
/
ouo-bypass.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import re
from curl_cffi import requests
from bs4 import BeautifulSoup
from urllib.parse import urlparse
# ouo url
# Examples:
# https://ouo.io/HxFVfD - ouo.io links (no account -> only one step)
# https://ouo.press/Zu7Vs5 - ouo.io links (with account -> two steps)
# Can exchange between ouo.press and ouo.io
url = "https://ouo.press/Zu7Vs5"
# -------------------------------------------
def RecaptchaV3():
import requests
ANCHOR_URL = 'https://www.google.com/recaptcha/api2/anchor?ar=1&k=6Lcr1ncUAAAAAH3cghg6cOTPGARa8adOf-y9zv2x&co=aHR0cHM6Ly9vdW8ucHJlc3M6NDQz&hl=en&v=pCoGBhjs9s8EhFOHJFe8cqis&size=invisible&cb=ahgyd1gkfkhe'
url_base = 'https://www.google.com/recaptcha/'
post_data = "v={}&reason=q&c={}&k={}&co={}"
client = requests.Session()
client.headers.update({
'content-type': 'application/x-www-form-urlencoded'
})
matches = re.findall('([api2|enterprise]+)\/anchor\?(.*)', ANCHOR_URL)[0]
url_base += matches[0]+'/'
params = matches[1]
res = client.get(url_base+'anchor', params=params)
token = re.findall(r'"recaptcha-token" value="(.*?)"', res.text)[0]
params = dict(pair.split('=') for pair in params.split('&'))
post_data = post_data.format(params["v"], token, params["k"], params["co"])
res = client.post(url_base+'reload', params=f'k={params["k"]}', data=post_data)
answer = re.findall(r'"rresp","(.*?)"', res.text)[0]
return answer
# -------------------------------------------
client = requests.Session()
client.headers.update({
'authority': 'ouo.io',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'en-GB,en-US;q=0.9,en;q=0.8',
'cache-control': 'max-age=0',
'referer': 'http://www.google.com/ig/adde?moduleurl=',
'upgrade-insecure-requests': '1',
})
# -------------------------------------------
# OUO BYPASS
def ouo_bypass(url):
tempurl = url.replace("ouo.press", "ouo.io")
p = urlparse(tempurl)
id = tempurl.split('/')[-1]
res = client.get(tempurl, impersonate="chrome110")
next_url = f"{p.scheme}://{p.hostname}/go/{id}"
for _ in range(2):
if res.headers.get('Location'): break
bs4 = BeautifulSoup(res.content, 'lxml')
inputs = bs4.form.findAll("input", {"name": re.compile(r"token$")})
data = { input.get('name'): input.get('value') for input in inputs }
data['x-token'] = RecaptchaV3()
h = {
'content-type': 'application/x-www-form-urlencoded'
}
res = client.post(next_url, data=data, headers=h,
allow_redirects=False, impersonate="chrome110")
next_url = f"{p.scheme}://{p.hostname}/xreallcygo/{id}"
return {
'original_link': url,
'bypassed_link': res.headers.get('Location')
}
# -------------------------------------------
out = ouo_bypass(url)
print(out)
# -------------------------------------------
'''
SAMPLE OUTPUT
{
'original_link': 'https://ouo.io/go/HxFVfD',
'bypassed_link': 'https://some-link.com'
}
'''
'''
_._ _,-'""`-._
(,-.`._,'( |\`-/|
`-.-' \ )-`( , o o)
`- \`_`"'-
'''