Commit 73c54017 authored by wang's avatar wang

test

parent ded0a292
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -11,35 +11,35 @@ class Gee():
self.session = requests.Session(impersonate='chrome110')
self.session.verify = False
self.session.proxies = {
'http': 'http://127.0.0.1:9000',
'https': 'http://127.0.0.1:9000'
'http': 'http://127.0.0.1:8890',
'https': 'http://127.0.0.1:8890'
}
self.ctx = execjs.compile(open('./src.js').read())
self.cts = '%2f9XNtvh%2b8sFajJwQz8jmN%2f%2faHuZXcLYTqMdydRu5uHE07VQmDkmT%2batCVVo%2fb%2fNi'
self.cts = 'aylqflYEw3UReF+NHwmVm5NHv9ghECWvoYmzhZeBvKClUmUmfr744onaktuzC9XS'
r = requests.post('http://ymx-lcc.unififi.com/header/borrow', json={
'brush_type':'cookiePR',
'method': "shopping"
})
cks = r.json()['data']['brush_header']['cookie']
for i in cks.split('; '):
t = i.index('=')
self.session.cookies.update({
i[:t]: i[t+1:]
})
self.headers = r.json()['data']['brush_header']
self.headers.pop('cookie')
pass
def init(self):
headers = {
"authority": "makeabooking.flyscoot.com",
"accept": "*/*",
"accept-language": "en",
"cache-control": "no-cache",
"pragma": "no-cache",
"referer": "https://makeabooking.flyscoot.com/_Incapsula_Resource?SWUDNSAI=31&xinfo=5-105210083-0%20NNNY%20RT%281704432742576%20659%29%20q%280%20-1%20-1%203%29%20r%280%20-1%29%20B12%2814%2c0%2c0%29%20U18&incident_id=1160001190813994914-755464947643194821&edet=12&cinfo=0e0000000628&rpinfo=0&cts=G%2f%2b%2fkZktndgiZArS%2fSFP%2b2saKar%2bLqbKCyUlpPSoyd%2fP1gM8zgmubGYfRB%2fLJIzM&mth=GET",
"sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"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/_Incapsula_Resource?SWCNGEEC=" + self.cts
url = 'https://book.philippineairlines.com/_Incapsula_Resource?SWCNGEEC=aylqflYEw3UReF%2bNHwmVm5NHv9ghECWvoYmzhZeBvKClUmUmfr744onaktuzC9XS'
response = self.session.get(url, headers=headers)
response = self.session.get(url, headers=headers)
response = self.session.get(url, headers=self.headers)
print(response.text)
self.challenge = response.json()["challenge"]
self.gt = response.json()["gt"]
......
......@@ -6,9 +6,11 @@ import subprocess
import tempfile
import time
from pathlib import Path
from curl_cffi import requests
# import urllib3
import tls_client
# from curl_cffi import requests
# import urllib3
import requests
# urllib3.disable_warnings()
from loguru import logger
......@@ -16,7 +18,7 @@ req_level = logger.level('REQU', no=100, color='<fg 34>')
js_level = logger.level('VMJS', no=100, color='<fg 185>')
work_dir = '/home/opt/lcc-reese84/'
if platform.platform().startswith('mac'):
work_dir = '/Users/wang/PycharmProjects/lcc-reese84/'
work_dir = '/Users/wang/Documents/company/lcc-reese84/'
log_dir = '/data/log/lcc-y4/'
if platform.platform().startswith('mac'):
log_dir = '/Users/wang/company/lcc-reese84/'
......@@ -33,7 +35,7 @@ def md5(text):
class Reese84ByPass(object):
def __init__(self, target, proxy, thread_name='111'):
# self._session = tls_client.Session('chrome_117')
# self._session = tls_client.Session('chrome_120')
self._session = requests.Session()
self._session.verify = False
......@@ -53,6 +55,7 @@ class Reese84ByPass(object):
# self._init()
self._repare_js()
self.__auth_token()
# self._token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZTc4NDE1Zi03OTc2LTRjNDctYmQwNC0xM2FlMGJhOTRkMTQiLCJpYXQiOjE3MTUyNDEzMzMsInRrbiI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUp6ZFdJaU9pSlZibXR1YjNkdUlpd2lhblJwSWpvaU1UTmtZek16WXpJdE5HVTJaUzAxWXpJMExUbGhPR010WWpBME9UTTJOV0V5T1RjM0lpd2lhWE56SWpvaVpHOTBVa1ZhSUVGUVNTSjkuRVUtQ1l3eVJmZUVaNDZvLUVHM2pUejNjRkMwYkFXNW1tX2VhZ05CMXE3RSIsImlzcyI6InNjb290LWNtdyIsImF1ZCI6InNjb290LWFwcCJ9.7WSVavUdvOUl4tjv9hpL4jeQTCnYh4bOUg669YERe-s'
# self._test()
# time.sleep(random.randint(3,5))
# self.__get_session_token()
......@@ -112,7 +115,7 @@ class Reese84ByPass(object):
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\"",
"sec-ch-ua": "\"Google Chrome\";v=\"120\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"120\"",
"Accept": "application/json; charset=utf-8",
"sec-ch-ua-platform": "\"macOS\"",
"Content-Type": "text/plain; charset=utf-8",
......@@ -141,9 +144,8 @@ class Reese84ByPass(object):
"Host": "ibe.api.flyscoot.com",
"pragma": "no-cache",
"cache-control": "no-cache",
"sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
"sec-ch-ua": "\"Google Chrome\";v=\"120\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"120\"",
"sec-ch-ua-mobile": "?0",
"x-scoot-client-session": "6a8f7c3d-9735-4254-a37c-dc79a87feead",
"authorization": "",
"x-scoot-client-version": "0.0.0",
"x-scoot-client-environment": "PROD",
......@@ -170,7 +172,7 @@ class Reese84ByPass(object):
"Host": "apigw.volaris.com",
"Pragma": "no-cache",
"Cache-Control": "no-cache",
"sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
"sec-ch-ua": "\"Not/A)Brand\";v=\"120\", \"Google Chrome\";v=\"120\", \"Chromium\";v=\"120\"",
"Accept": "application/json",
"cookies": f"Bearer {self._token}",
"Content-Type": "application/json",
......@@ -189,28 +191,7 @@ class Reese84ByPass(object):
self.token = response.json()['token']
def _get_cookie(self):
# headers = {
# "authority": "ibe.api.flyscoot.com",
# "accept": "application/json, text/plain, */*",
# "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6",
# # "authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0MzJhM2RmNi1iZmRmLTQ5NmMtOTJiMS1iN2EwMzBlNGJmNTgiLCJpYXQiOjE2OTc2ODE0MjEsInRrbiI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUp6ZFdJaU9pSlZibXR1YjNkdUlpd2lhblJwSWpvaU5Ea3hOVFV4TldJdE5UY3dOaTA1WVRBNExXVXdNbVF0TlRrek1tVXdOakZoTXpOa0lpd2lhWE56SWpvaVpHOTBVa1ZhSUVGUVNTSjkuMFA1T0xkSzF2V0p4VlFMblI2SHRaT2YtcExQZTNPT0pEdmR5aVVacW9zbyIsImlzcyI6InNjb290LWNtdyIsImF1ZCI6InNjb290LWFwcCJ9.byiajmbVNj87-eVT64Dfr-u-30YxdqGEHyPqDI07qsM",
# # "authorization": self._token,
# "cache-control": "no-cache",
# "content-type": "application/json",
# "origin": "https://beta.makeabooking.flyscoot.com",
# "pragma": "no-cache",
# "sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
# "sec-ch-ua-mobile": "?0",
# "sec-ch-ua-platform": "\"macOS\"",
# "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/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",
# "x-scoot-client-version": "0.0.0"
# }
headers = {
"authority": "ibe.api.flyscoot.com",
"accept": "application/json, text/plain, */*",
......@@ -219,7 +200,7 @@ class Reese84ByPass(object):
"content-type": "application/json",
"origin": "https://beta.makeabooking.flyscoot.com",
"pragma": "no-cache",
"sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua": "\"Not_A Brand\";v=\"120\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
......@@ -228,7 +209,7 @@ class Reese84ByPass(object):
"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": "cb3e2a71-ad4c-4894-b4e8-2e684ad62b3e",
"x-scoot-client-session": "10fc46d7-b488-4ba6-a7a4-46660a2e136b",
"x-scoot-client-version": "0.0.0",
"authorization": self._token,
......@@ -245,7 +226,7 @@ class Reese84ByPass(object):
"content-type": "application/json",
"origin": "https://beta.makeabooking.flyscoot.com",
"pragma": "no-cache",
"sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua": "\"Not_A Brand\";v=\"120\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
......@@ -298,7 +279,7 @@ 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:7890')
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:
r.start()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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