Commit d5c65148 authored by wang's avatar wang

test

parent fad3810f
This diff is collapsed.
......@@ -929,14 +929,14 @@ Object.defineProperty(window, "chrome", {
writable: true
});
Object.defineProperty(window, "openDatabase", {
value: v_saf(function openDatabase(){
}),
configurable: true,
enumerable: false,
writable: true
});
// Object.defineProperty(window, "openDatabase", {
// value: v_saf(function openDatabase(){
//
// }),
// configurable: true,
// enumerable: false,
// writable: true
// });
this.postMessage = postMessage(window);
this.atob = function (str) {
......
......@@ -359,7 +359,9 @@ exports.install = (globalObject, globalNames) => {
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["contentWindow"]);
let res = utils.tryWrapperForImpl(esValue[implSymbol]["contentWindow"]);
res.WebGL2RenderingContext = window.WebGL2RenderingContext
return res;
}
get align() {
......
......@@ -411,7 +411,7 @@ exports.install = (globalObject, globalNames) => {
get language() {
return window.ENV.navigatorparams.language ||
"en-US"
"en"
const esValue = this !== null && this !== undefined ? this : globalObject;
......
......@@ -2,7 +2,7 @@
exports.implementation = class NavigatorLanguageImpl {
get language() {
return "en-US";
return 'en';
}
// See Navigator constructor for languages
......
This diff is collapsed.
......@@ -13,7 +13,6 @@
"abab": "^2.0.5",
"acorn": "^8.4.1",
"acorn-globals": "^6.0.0",
"canvas": "^2.11.2",
"cssom": "^0.5.0",
"cssstyle": "^2.3.0",
"data-urls": "^3.0.0",
......
import hashlib
import json
import platform
import random
import subprocess
import tempfile
import time
from pathlib import Path
from curl_cffi import requests
import urllib3
urllib3.disable_warnings()
......@@ -33,10 +34,10 @@ def md5(text):
class Reese84ByPass(object):
def __init__(self, target, proxy, thread_name='test'):
self._session = tls_client.Session('chrome_117')
# self._session = tls_client.Session('chrome_117')
# self._session = requests.Session()
# self._session.verify = False
self._session = requests.Session()
self._session.verify = False
self.__target = target
if proxy != '':
self._session.proxies = {
......@@ -69,7 +70,7 @@ class Reese84ByPass(object):
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"upgrade-insecure-requests": "1",
"user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
"user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
"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",
"sec-fetch-site": "none",
"sec-fetch-mode": "navigate",
......@@ -83,7 +84,7 @@ class Reese84ByPass(object):
self._session.cookies.clear()
t1 = time.time()
r1 = self._session.get(
'https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I')
'https://www.flyscoot.com/g-Then-And-meeting-beding-O-Scena-Quarre-allowt-')
self.log.log('REQU', f'jsURL: {"https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I"}')
self.log.log('REQU', f'JSURL: code:{r1.status_code} cost:{(time.time() - t1):.3f}s')
cache_md5 = md5(r1.text)
......@@ -109,7 +110,7 @@ class Reese84ByPass(object):
# print(len(data['solution']['interrogation']['p']))
t3 = time.time()
url = "https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I?d=makeabooking.flyscoot.com"
url = "https://www.flyscoot.com/g-Then-And-meeting-beding-O-Scena-Quarre-allowt-?d=www.flyscoot.com"
response = self._session.post(url, headers={
"Host": "www.flyscoot.com",
"sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
......@@ -117,8 +118,7 @@ class Reese84ByPass(object):
"sec-ch-ua-platform": "\"macOS\"",
"Content-Type": "text/plain; charset=utf-8",
"sec-ch-ua-mobile": "?0",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
"x-dtpc": "4$133940727_796h2vMTLUKMIEALWOHLUOBCVHUABCMAQCLRKI-0e0",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Origin": "https://www.flyscoot.com",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors",
......@@ -150,7 +150,7 @@ class Reese84ByPass(object):
"x-scoot-client-environment": "PROD",
"content-type": "application/json",
"accept": "application/json, text/plain, */*",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"x-scoot-appsource": "IBE-WEB",
"sec-ch-ua-platform": "\"macOS\"",
"origin": "https://beta.makeabooking.flyscoot.com",
......@@ -176,7 +176,7 @@ class Reese84ByPass(object):
"cookies": f"Bearer {self._token}",
"Content-Type": "application/json",
"sec-ch-ua-mobile": "?0",
"User-Agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
"User-Agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
"sec-ch-ua-platform": "\"macOS\"",
"Origin": "https://www.flyscoot.com",
"Sec-Fetch-Site": "same-site",
......@@ -206,7 +206,7 @@ class Reese84ByPass(object):
# "sec-fetch-dest": "empty",
# "sec-fetch-mode": "cors",
# "sec-fetch-site": "same-site",
# "user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
# "user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
# "x-scoot-appsource": "IBE-WEB",
# "x-scoot-client-environment": "PROD",
# "x-scoot-client-session": "4ddf4d27-d6a1-4b50-b533-04558f7ab4b8",
......@@ -226,9 +226,9 @@ class Reese84ByPass(object):
"sec-fetch-site": "none",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
return headers, self._session.cookies.get_dict()
return headers, self._session.cookies.items()
def _test(self):
......@@ -246,10 +246,11 @@ class Reese84ByPass(object):
"sec-fetch-site": "none",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&dd=2023-12-15&rd=null&adt=1&chd=0&inf=0#"
response = self._session.get(url, headers=headers)
print(response.text)
self.log.debug(f"resp {'Flight Search Results' in response.text}")
print(self._get_cookie())
......@@ -263,7 +264,8 @@ if __name__ == '__main__':
r = Reese84ByPass('https://www.flyscoot.com/', 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000')
# r = Reese84ByPass('https://www.flyscoot.com/', 'http://user-uni007-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600')
r = Reese84ByPass('https://www.flyscoot.com/', 'http://127.0.0.1:8890')
# r = Reese84ByPass('https://www.flyscoot.com/', f'http://uni00001_custom_zone_US_sid_{random.randint(67336718, 67336728)}_time_5:q39CEBTs5A@us.foxyip.com:7778')
# while True:
print(r.start())
r.start()
for i in range(10):
r._test()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,21 +4,23 @@ from pyquery import PyQuery
def get_header():
r = requests.post('http://ymx-lcc.unififi.com/header/borrow',json={
"brush_type": "cookieTR",
r = requests.post('http://ymx-lcc.unififi.com/header/borrow', json={
"brush_type": "cookieAS",
"brush_fromto": "aaa-bbb",
"method": "shopping"
})
return r.json()
def return_header(header):
r = requests.post('http://ymx-lcc.unififi.com/header/return',json={
r = requests.post('http://ymx-lcc.unififi.com/header/return', json={
"brush_type": "cookieTR",
"_id": header['brush_id'],
"status": 0,
})
print(r.text)
def test():
header = get_header()
headers = header['data']['brush_header']
......@@ -26,43 +28,47 @@ def test():
# "content-type": "application/json",
# "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",
# })
headers.update({
"authority": "makeabooking.flyscoot.com",
"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-US,en;q=0.9",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
})
# headers.update({
# "authority": "makeabooking.flyscoot.com",
# "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-US,en;q=0.9",
# "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
# })
brush_proxy = header['data']['brush_proxy']
session = tls_client.Session(client_identifier='chrome_117')
session.proxies = {
'http': 'http://127.0.0.1:7890',
'https': 'http://127.0.0.1:7890',
}
# session.proxies = {
# 'http': brush_proxy,
# 'https': brush_proxy,
# 'http': 'http://127.0.0.1:7890',
# 'https': 'http://127.0.0.1:7890',
# }
session.proxies = {
'http': brush_proxy,
'https': brush_proxy,
}
print(headers)
print(brush_proxy)
url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&dd=2023-12-15&rd=null&adt=1&chd=0&inf=0#"
# url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&dd=2023-12-18&rd=null&adt=1&chd=0&inf=0"
response = session.get(url, headers=headers)
# response = requests.post('http://52.52.23.116/tls/forward',
# # response = requests.post('http://127.0.0.1:58000/tls/forward',
# json=dict(url=url, headers=headers, method="GET", proxy=session.proxies['http'],debug=True, ),
#
# # ,allow_redirects=True
# )
# print(response.json()['text'])
# print(response.json()['status_code'])
# h = PyQuery(response.json()['text'])
print(response.status_code)
h = PyQuery(response.text)
# response = session.get(url, headers=headers)
response = requests.post('http://52.52.23.116/tls/forward',
# response = requests.post('http://127.0.0.1:58000/tls/forward',
json=dict(url=url, headers=headers, method="GET", proxy=session.proxies['http'],
debug=True, )
, allow_redirects=True
)
print(response.json()['text'])
print(response.json()['status_code'])
h = PyQuery(response.json()['text'])
# print(response.status_code)
# h = PyQuery(response.text)
print(h.find('iframe[id="main-iframe"]').attr('src'))
r1 = session.get('https://makeabooking.flyscoot.com' + h.find('iframe[id="main-iframe"]').attr('src'), headers=headers)
r1 = session.get('https://makeabooking.flyscoot.com' + h.find('iframe[id="main-iframe"]').attr('src'),
headers=headers)
print(r1.text)
r2 = session.get(url, headers=headers)
print(r2.text)
return_header(header['data'])
if __name__ == '__main__':
test()
\ No newline at end of file
test()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment