Commit d5c65148 authored by wang's avatar wang

test

parent fad3810f
This diff is collapsed.
...@@ -929,14 +929,14 @@ Object.defineProperty(window, "chrome", { ...@@ -929,14 +929,14 @@ Object.defineProperty(window, "chrome", {
writable: true writable: true
}); });
Object.defineProperty(window, "openDatabase", { // Object.defineProperty(window, "openDatabase", {
value: v_saf(function openDatabase(){ // value: v_saf(function openDatabase(){
//
}), // }),
configurable: true, // configurable: true,
enumerable: false, // enumerable: false,
writable: true // writable: true
}); // });
this.postMessage = postMessage(window); this.postMessage = postMessage(window);
this.atob = function (str) { this.atob = function (str) {
......
...@@ -359,7 +359,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -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() { get align() {
......
...@@ -411,7 +411,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -411,7 +411,7 @@ exports.install = (globalObject, globalNames) => {
get language() { get language() {
return window.ENV.navigatorparams.language || return window.ENV.navigatorparams.language ||
"en-US" "en"
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
exports.implementation = class NavigatorLanguageImpl { exports.implementation = class NavigatorLanguageImpl {
get language() { get language() {
return "en-US"; return 'en';
} }
// See Navigator constructor for languages // See Navigator constructor for languages
......
This diff is collapsed.
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
"abab": "^2.0.5", "abab": "^2.0.5",
"acorn": "^8.4.1", "acorn": "^8.4.1",
"acorn-globals": "^6.0.0", "acorn-globals": "^6.0.0",
"canvas": "^2.11.2",
"cssom": "^0.5.0", "cssom": "^0.5.0",
"cssstyle": "^2.3.0", "cssstyle": "^2.3.0",
"data-urls": "^3.0.0", "data-urls": "^3.0.0",
......
import hashlib import hashlib
import json import json
import platform import platform
import random
import subprocess import subprocess
import tempfile import tempfile
import time import time
from pathlib import Path from pathlib import Path
from curl_cffi import requests
import urllib3 import urllib3
urllib3.disable_warnings() urllib3.disable_warnings()
...@@ -33,10 +34,10 @@ def md5(text): ...@@ -33,10 +34,10 @@ def md5(text):
class Reese84ByPass(object): class Reese84ByPass(object):
def __init__(self, target, proxy, thread_name='test'): 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 = requests.Session()
# self._session.verify = False self._session.verify = False
self.__target = target self.__target = target
if proxy != '': if proxy != '':
self._session.proxies = { self._session.proxies = {
...@@ -69,7 +70,7 @@ class Reese84ByPass(object): ...@@ -69,7 +70,7 @@ class Reese84ByPass(object):
"sec-ch-ua-mobile": "?0", "sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"", "sec-ch-ua-platform": "\"macOS\"",
"upgrade-insecure-requests": "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',
"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": "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-site": "none",
"sec-fetch-mode": "navigate", "sec-fetch-mode": "navigate",
...@@ -83,7 +84,7 @@ class Reese84ByPass(object): ...@@ -83,7 +84,7 @@ class Reese84ByPass(object):
self._session.cookies.clear() self._session.cookies.clear()
t1 = time.time() t1 = time.time()
r1 = self._session.get( 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: {"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') self.log.log('REQU', f'JSURL: code:{r1.status_code} cost:{(time.time() - t1):.3f}s')
cache_md5 = md5(r1.text) cache_md5 = md5(r1.text)
...@@ -109,7 +110,7 @@ class Reese84ByPass(object): ...@@ -109,7 +110,7 @@ class Reese84ByPass(object):
# print(len(data['solution']['interrogation']['p'])) # print(len(data['solution']['interrogation']['p']))
t3 = time.time() 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={ response = self._session.post(url, headers={
"Host": "www.flyscoot.com", "Host": "www.flyscoot.com",
"sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"", "sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
...@@ -117,8 +118,7 @@ class Reese84ByPass(object): ...@@ -117,8 +118,7 @@ class Reese84ByPass(object):
"sec-ch-ua-platform": "\"macOS\"", "sec-ch-ua-platform": "\"macOS\"",
"Content-Type": "text/plain; charset=utf-8", "Content-Type": "text/plain; charset=utf-8",
"sec-ch-ua-mobile": "?0", "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",
"x-dtpc": "4$133940727_796h2vMTLUKMIEALWOHLUOBCVHUABCMAQCLRKI-0e0",
"Origin": "https://www.flyscoot.com", "Origin": "https://www.flyscoot.com",
"Sec-Fetch-Site": "same-origin", "Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors", "Sec-Fetch-Mode": "cors",
...@@ -150,7 +150,7 @@ class Reese84ByPass(object): ...@@ -150,7 +150,7 @@ class Reese84ByPass(object):
"x-scoot-client-environment": "PROD", "x-scoot-client-environment": "PROD",
"content-type": "application/json", "content-type": "application/json",
"accept": "application/json, text/plain, */*", "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", "x-scoot-appsource": "IBE-WEB",
"sec-ch-ua-platform": "\"macOS\"", "sec-ch-ua-platform": "\"macOS\"",
"origin": "https://beta.makeabooking.flyscoot.com", "origin": "https://beta.makeabooking.flyscoot.com",
...@@ -176,7 +176,7 @@ class Reese84ByPass(object): ...@@ -176,7 +176,7 @@ class Reese84ByPass(object):
"cookies": f"Bearer {self._token}", "cookies": f"Bearer {self._token}",
"Content-Type": "application/json", "Content-Type": "application/json",
"sec-ch-ua-mobile": "?0", "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\"", "sec-ch-ua-platform": "\"macOS\"",
"Origin": "https://www.flyscoot.com", "Origin": "https://www.flyscoot.com",
"Sec-Fetch-Site": "same-site", "Sec-Fetch-Site": "same-site",
...@@ -206,7 +206,7 @@ class Reese84ByPass(object): ...@@ -206,7 +206,7 @@ class Reese84ByPass(object):
# "sec-fetch-dest": "empty", # "sec-fetch-dest": "empty",
# "sec-fetch-mode": "cors", # "sec-fetch-mode": "cors",
# "sec-fetch-site": "same-site", # "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-appsource": "IBE-WEB",
# "x-scoot-client-environment": "PROD", # "x-scoot-client-environment": "PROD",
# "x-scoot-client-session": "4ddf4d27-d6a1-4b50-b533-04558f7ab4b8", # "x-scoot-client-session": "4ddf4d27-d6a1-4b50-b533-04558f7ab4b8",
...@@ -226,9 +226,9 @@ class Reese84ByPass(object): ...@@ -226,9 +226,9 @@ class Reese84ByPass(object):
"sec-fetch-site": "none", "sec-fetch-site": "none",
"sec-fetch-user": "?1", "sec-fetch-user": "?1",
"upgrade-insecure-requests": "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): def _test(self):
...@@ -246,10 +246,11 @@ class Reese84ByPass(object): ...@@ -246,10 +246,11 @@ class Reese84ByPass(object):
"sec-fetch-site": "none", "sec-fetch-site": "none",
"sec-fetch-user": "?1", "sec-fetch-user": "?1",
"upgrade-insecure-requests": "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#" 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) response = self._session.get(url, headers=headers)
print(response.text)
self.log.debug(f"resp {'Flight Search Results' in response.text}") self.log.debug(f"resp {'Flight Search Results' in response.text}")
print(self._get_cookie()) print(self._get_cookie())
...@@ -263,7 +264,8 @@ if __name__ == '__main__': ...@@ -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://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://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/', '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: # while True:
print(r.start()) r.start()
for i in range(10): for i in range(10):
r._test() r._test()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -4,21 +4,23 @@ from pyquery import PyQuery ...@@ -4,21 +4,23 @@ from pyquery import PyQuery
def get_header(): def get_header():
r = requests.post('http://ymx-lcc.unififi.com/header/borrow',json={ r = requests.post('http://ymx-lcc.unififi.com/header/borrow', json={
"brush_type": "cookieTR", "brush_type": "cookieAS",
"brush_fromto": "aaa-bbb", "brush_fromto": "aaa-bbb",
"method": "shopping" "method": "shopping"
}) })
return r.json() return r.json()
def return_header(header): 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", "brush_type": "cookieTR",
"_id": header['brush_id'], "_id": header['brush_id'],
"status": 0, "status": 0,
}) })
print(r.text) print(r.text)
def test(): def test():
header = get_header() header = get_header()
headers = header['data']['brush_header'] headers = header['data']['brush_header']
...@@ -26,43 +28,47 @@ def test(): ...@@ -26,43 +28,47 @@ def test():
# "content-type": "application/json", # "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", # "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({ # headers.update({
"authority": "makeabooking.flyscoot.com", # "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": "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", # "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" # "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'] brush_proxy = header['data']['brush_proxy']
session = tls_client.Session(client_identifier='chrome_117') 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 = { # session.proxies = {
# 'http': brush_proxy, # 'http': 'http://127.0.0.1:7890',
# 'https': brush_proxy, # 'https': 'http://127.0.0.1:7890',
# } # }
session.proxies = {
'http': brush_proxy,
'https': brush_proxy,
}
print(headers) 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-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" # 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 = session.get(url, headers=headers)
# response = requests.post('http://52.52.23.116/tls/forward', response = requests.post('http://52.52.23.116/tls/forward',
# # response = requests.post('http://127.0.0.1:58000/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, ), json=dict(url=url, headers=headers, method="GET", proxy=session.proxies['http'],
# debug=True, )
# # ,allow_redirects=True
# ) , allow_redirects=True
# print(response.json()['text']) )
# print(response.json()['status_code']) print(response.json()['text'])
# h = PyQuery(response.json()['text']) print(response.json()['status_code'])
print(response.status_code) h = PyQuery(response.json()['text'])
h = PyQuery(response.text) # print(response.status_code)
# h = PyQuery(response.text)
print(h.find('iframe[id="main-iframe"]').attr('src')) 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) print(r1.text)
r2 = session.get(url, headers=headers) r2 = session.get(url, headers=headers)
print(r2.text) print(r2.text)
return_header(header['data']) return_header(header['data'])
if __name__ == '__main__': if __name__ == '__main__':
test() test()
\ No newline at end of file
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