Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-reese84
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
lcc-reese84
Commits
5879236b
Commit
5879236b
authored
May 22, 2024
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
80010ded
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
19 deletions
+37
-19
reese84_bypass.py
src/reese84_bypass.py
+37
-19
No files found.
src/reese84_bypass.py
View file @
5879236b
...
@@ -7,6 +7,7 @@ import time
...
@@ -7,6 +7,7 @@ import time
from
pathlib
import
Path
from
pathlib
import
Path
import
requests
import
requests
import
tls_client
# import tls_client
# import tls_client
# from curl_cffi import requests
# from curl_cffi import requests
import
urllib3
import
urllib3
...
@@ -35,9 +36,9 @@ def md5(text):
...
@@ -35,9 +36,9 @@ def md5(text):
class
Reese84ByPass
(
object
):
class
Reese84ByPass
(
object
):
def
__init__
(
self
,
target
,
proxy
,
thread_name
=
'111'
):
def
__init__
(
self
,
target
,
proxy
,
thread_name
=
'111'
):
#
self._session = tls_client.Session('chrome_120')
self
.
_session
=
tls_client
.
Session
(
'chrome_120'
)
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
!=
''
:
...
@@ -162,7 +163,7 @@ class Reese84ByPass(object):
...
@@ -162,7 +163,7 @@ class Reese84ByPass(object):
"accept-language"
:
"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
"accept-language"
:
"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
}
}
url
=
"https://booking.api.flyscoot.com/v1/account/anonymous"
url
=
"https://booking.api.flyscoot.com/v1/account/anonymous"
response
=
self
.
_session
.
get
(
url
,
headers
=
headers
,
timeout
=
10
)
response
=
self
.
_session
.
get
(
url
,
headers
=
headers
)
print
(
response
.
text
)
print
(
response
.
text
)
self
.
_token
=
response
.
json
()[
'data'
][
'accessToken'
]
self
.
_token
=
response
.
json
()[
'data'
][
'accessToken'
]
self
.
log
.
log
(
'REQU'
,
f
'__auth_token: code:{response.status_code} cost:{(time.time() - t1):.3f}s'
)
self
.
log
.
log
(
'REQU'
,
f
'__auth_token: code:{response.status_code} cost:{(time.time() - t1):.3f}s'
)
...
@@ -199,7 +200,7 @@ class Reese84ByPass(object):
...
@@ -199,7 +200,7 @@ class Reese84ByPass(object):
"accept-language"
:
"en,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
,
"accept-language"
:
"en,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
,
"cache-control"
:
"no-cache"
,
"cache-control"
:
"no-cache"
,
"content-type"
:
"application/json"
,
"content-type"
:
"application/json"
,
"origin"
:
"https://
beta.
makeabooking.flyscoot.com"
,
"origin"
:
"https://makeabooking.flyscoot.com"
,
"pragma"
:
"no-cache"
,
"pragma"
:
"no-cache"
,
"sec-ch-ua"
:
"
\"
Not_A Brand
\"
;v=
\"
120
\"
,
\"
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-mobile"
:
"?0"
,
...
@@ -220,33 +221,29 @@ class Reese84ByPass(object):
...
@@ -220,33 +221,29 @@ class Reese84ByPass(object):
def
_test
(
self
):
def
_test
(
self
):
headers
=
{
headers
=
{
"authority"
:
"
ibe
.api.flyscoot.com"
,
"authority"
:
"
booking
.api.flyscoot.com"
,
"accept"
:
"application/json, text/plain, */*"
,
"accept"
:
"application/json, text/plain, */*"
,
"accept-language"
:
"en,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
,
"accept-language"
:
"en,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6"
,
"authorization"
:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYTc2Yzg2OC1jODFiLTRiZTktOTY1Ny00OGNiOTBjMDFlZDYiLCJpYXQiOjE3MTYzNDI0MjAsInRrbiI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUp6ZFdJaU9pSlZibXR1YjNkdUlpd2lhblJwSWpvaVpUTXdZVFEyWVRrdFkyTXlZeTAyT0RZNExUVXlOVGd0TmpWbU16WTRNRFpqWmpNeklpd2lhWE56SWpvaVpHOTBVa1ZhSUVGUVNTSjkuYV9oY2dmYnkydU9IS014MlM2dEVRQlBES0NTWENXNkRRamFhS1JVNXBFNCIsImlzcyI6InNjb290LWNtdyIsImF1ZCI6InNjb290LWFwcCJ9.jwXVumZEETpLAbAuLsQVe9RXk0NZJN4gmQme3_ib6qE'
,
"cache-control"
:
"no-cache"
,
"cache-control"
:
"no-cache"
,
"content-type"
:
"application/json"
,
"content-type"
:
"application/json"
,
"origin"
:
"https://b
eta.makeab
ooking.flyscoot.com"
,
"origin"
:
"https://booking.flyscoot.com"
,
"pragma"
:
"no-cache"
,
"pragma"
:
"no-cache"
,
"sec-ch-ua"
:
"
\"
Not_A Brand
\"
;v=
\"
120
\"
,
\"
Chromium
\"
;v=
\"
120
\"
,
\"
Google Chrome
\"
;v=
\"
120
\"
"
,
"sec-ch-ua"
:
"
\"
Not_A Brand
\"
;v=
\"
8
\"
,
\"
Chromium
\"
;v=
\"
120
\"
,
\"
Google Chrome
\"
;v=
\"
120
\"
"
,
"sec-ch-ua-mobile"
:
"?0"
,
"sec-ch-ua-mobile"
:
"?0"
,
"sec-ch-ua-platform"
:
"
\"
macOS
\"
"
,
"sec-ch-ua-platform"
:
"
\"
macOS
\"
"
,
"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/120.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"
:
"cb3e2a71-ad4c-4894-b4e8-2e684ad62b3e"
,
"x-scoot-client-version"
:
"0.0.0"
,
"authorization"
:
self
.
_token
,
}
}
url
=
"https://
ibe.api.flyscoot.com/v1/booking/flight
/availability"
url
=
"https://
booking.api.flyscoot.com/flights
/availability"
data
=
{
data
=
{
"flightCriteria"
:
[
"flightCriteria"
:
[
{
{
"origin"
:
"SIN"
,
"origin"
:
"SIN"
,
"destination"
:
"BKK"
,
"destination"
:
"BKK"
,
"departureDate"
:
"2024-0
1-10
"
"departureDate"
:
"2024-0
5-26
"
}
}
],
],
"passengerCriteria"
:
{
"passengerCriteria"
:
{
...
@@ -255,14 +252,35 @@ class Reese84ByPass(object):
...
@@ -255,14 +252,35 @@ class Reese84ByPass(object):
"infant"
:
0
"infant"
:
0
},
},
"currencyCode"
:
"SGD"
,
"currencyCode"
:
"SGD"
,
"promoCode"
:
None
,
"promoCode"
:
""
,
"salesCode"
:
None
,
"salesCode"
:
None
,
"flightFare"
:
{
"flightFare"
:
{
"fareType"
:
[],
"fareType"
:
[],
"classOfService"
:
[]
"productClass"
:
[
"E1"
,
"E2"
,
"E3"
,
"E4"
,
"E5"
,
"J"
,
"P4"
,
"J4"
],
"classOfService"
:
[],
"maxConnections"
:
20
},
},
"cultureCode"
:
"zh-CN"
,
"sortingOptions"
:
[
"organizationCode"
:
None
"LowestFare"
,
"ShortestTravelTime"
,
"EarliestArrival"
],
"cultureCode"
:
"en-sg"
,
"bundleControlFilter"
:
2
,
"ssrs"
:
[
"FLXO"
,
"FLXM"
,
"FLXR"
]
}
}
data
=
json
.
dumps
(
data
,
separators
=
(
','
,
':'
))
data
=
json
.
dumps
(
data
,
separators
=
(
','
,
':'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment