Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
px3
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
px3
Commits
72ea0e22
Commit
72ea0e22
authored
Nov 28, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始按压验证码
parent
9bdfc2ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
main.py
src/main.py
+6
-11
test_search.py
test_search.py
+13
-12
No files found.
src/main.py
View file @
72ea0e22
...
@@ -377,7 +377,6 @@ class PxBypass():
...
@@ -377,7 +377,6 @@ class PxBypass():
for
k
,
v
in
self
.
session
.
cookies
.
get_dict
()
.
items
():
for
k
,
v
in
self
.
session
.
cookies
.
get_dict
()
.
items
():
cks
.
append
(
f
'{k}={v}'
)
cks
.
append
(
f
'{k}={v}'
)
s
.
add
(
k
)
s
.
add
(
k
)
print
(
'; '
.
join
(
cks
))
url
=
'https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true'
url
=
'https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true'
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',
...
@@ -410,6 +409,9 @@ class PxBypass():
...
@@ -410,6 +409,9 @@ class PxBypass():
with
open
(
'index.html'
,
'w'
)
as
f
:
with
open
(
'index.html'
,
'w'
)
as
f
:
f
.
write
(
response
[
'text'
])
f
.
write
(
response
[
'text'
])
print
(
response
[
'status_code'
])
print
(
response
[
'status_code'
])
self
.
session
.
cookies
.
update
(
response
[
'cookies'
]
)
if
response
[
'status_code'
]
!=
403
:
if
response
[
'status_code'
]
!=
403
:
self
.
add_header
()
self
.
add_header
()
...
@@ -560,23 +562,16 @@ class PxBypass():
...
@@ -560,23 +562,16 @@ class PxBypass():
# if k not in s:
# if k not in s:
# cks.append(f'{k}={v}')
# cks.append(f'{k}={v}')
# s.add(k)
# s.add(k)
for
k
,
v
in
self
.
session
.
cookies
.
get_dict
()
.
items
():
for
k
,
v
in
self
.
session
.
cookies
.
get_dict
()
.
items
():
cks
.
append
(
f
'{k}={v}'
)
cks
.
append
(
f
'{k}={v}'
)
s
.
add
(
k
)
s
.
add
(
k
)
print
(
'; '
.
join
(
cks
))
headers
=
{
headers
=
{
"authority"
:
"booking.flyfrontier.com"
,
"authority"
:
"booking.flyfrontier.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"
,
"cache-control"
:
"no-cache"
,
"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"
:
"document"
,
"sec-fetch-mode"
:
"navigate"
,
"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/117.0.0.0 Safari/537.36"
,
"cookie"
:
'; '
.
join
(
cks
)
"cookie"
:
'; '
.
join
(
cks
)
}
}
...
...
test_search.py
View file @
72ea0e22
...
@@ -5,18 +5,19 @@ import tls_client
...
@@ -5,18 +5,19 @@ import tls_client
session
=
tls_client
.
Session
(
client_identifier
=
'chrome_117'
)
session
=
tls_client
.
Session
(
client_identifier
=
'chrome_117'
)
headers
=
{
"sec-fetch-site"
:
"none"
,
"sec-fetch-user"
:
"?1"
,
headers
=
{
"cookie"
:
'pxcts=a8b3a4b7-8dbf-11ee-837b-c0f06be4c4a6; _px2=eyJ1IjoiYTg0OGIwMzAtOGRiZi0xMWVlLWEwMGQtNzU4YzU4MGE4MjFjIiwidiI6ImE4YjM5NDNhLThkYmYtMTFlZS04MzdiLTNkNWY0OTRiZTAzNyIsInQiOjYyMDIzMzg4MDAwNCwiaCI6IjRiMDRiYzQwOTc2YTE1ZjkwNGZkNzU0Y2EyYmNiNTg2N2E1MjUzM2JjNzJmODMwZWE4NDVlMThiOGE4ZmQwOTUifQ=='
"authority"
:
"booking.flyfrontier.com"
,
,
"cache-control"
:
"no-cache"
,
"sec-ch-ua"
:
"
\"
Google Chrome
\"
;v=
\"
117
\"
,
\"
Not;A=Brand
\"
;v=
\"
8
\"
,
\"
Chromium
\"
;v=
\"
117
\"
"
,
"sec-fetch-mode"
:
"navigate"
,
"upgrade-insecure-requests"
:
"1"
,
"authority"
:
"booking.flyfrontier.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"
,
"sec-ch-ua-mobile"
:
"?0
"
,
"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"
,
"accept-language"
:
"en-US,en;q=0.9"
,
"pragma"
:
"no-cache"
,
"sec-fetch-dest"
:
"document"
,
"cookie"
:
"_pxvid=0c1ef793-8dc2-11ee-91da-228dc1c257d4; pxcts=0c1f055f-8dc2-11ee-91da-a5735ff258e2; _px2=eyJ1IjoiMGIxYzRkMDAtOGRjMi0xMWVlLThhN2YtZjJhNzU0NzcyY2M1IiwidiI6IjBjMWVmNzkzLThkYzItMTFlZS05MWRhLTIyOGRjMWMyNTdkNCIsInQiOjYyMDIzMzg4MDAwNCwiaCI6ImVhYWZlMGVlOTZmYTNkYTEwMjE1ZGU2NDQxMTk4NTBjZTc5NWFlODlmZjIyMTZiNzY5ODkxZWQzZWU4MjRlYWUifQ==; ASP.NET_SessionId=4gt02ighp0k5r4ty4wh3iet3; _pxhd=775810c9fc376835be665fdfdf1f06dffa708f8cea2c10aa4af5c8ab0e9012b2:0c1ef793-8dc2-11ee-91da-228dc1c257d4; dotrez=!FgFe6N5gWZG0qguT9B3Zm8gW+yuktH8sD1YB8FqPTxitanvn/804bUKUpzB/3jqDJVrfklg9dZFZN/o="
"sec-ch-ua-platform"
:
"
\"
macOS
\"
"
}
}
url
=
"https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true"
url
=
"https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true"
...
...
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