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
f5443a5e
Commit
f5443a5e
authored
Nov 29, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换环境
parent
42b64b4d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
24 deletions
+31
-24
decodeResult22.js
ast/decodeResult22.js
+1
-1
env_captcha.py
src/env_captcha.py
+2
-1
main.py
src/main.py
+25
-19
test.py
src/test.py
+1
-1
test_search.py
test_search.py
+2
-2
No files found.
ast/decodeResult22.js
View file @
f5443a5e
...
...
@@ -4335,8 +4335,8 @@ try {
if
(
$c
)
{
var
r
=
Ot
();
"mousemove"
!==
e
&&
e
!==
jt
&&
(
t
[
"PX11699"
]
=
Ee
(
r
));
var
i
=
ht
(
t
);
console
.
log
(
'PX12040.add'
,
Kc
)
var
i
=
ht
(
t
);
(
af
+=
1.4
*
i
[
"length"
])
>=
15
e3
?
(
Kc
&&
tf
[
"push"
](
Kc
),
Tf
(
"PX11859"
))
:
(
tf
[
"push"
](
t
),
tf
[
"length"
]
>=
50
&&
(
Kc
&&
tf
[
"push"
](
Kc
),
Tf
(
"PX12002"
)));
}
}
...
...
src/env_captcha.py
View file @
f5443a5e
...
...
@@ -4777,6 +4777,8 @@ class PxEnv():
}'''
self
.
env
=
json
.
loads
(
ENV
)
# self.env = env
self
.
env
=
DefaultMunch
.
fromDict
(
self
.
env
)
self
.
screen
=
self
.
env
.
screenparams
...
...
@@ -4791,7 +4793,6 @@ class PxEnv():
self
.
token2
=
token2
self
.
px755
=
px755
self
.
ua
=
self
.
navigator
.
useragent
print
(
self
.
ua
)
# 初始化参数
self
.
url
=
url
self
.
sid
=
sid
...
...
src/main.py
View file @
f5443a5e
...
...
@@ -8,6 +8,7 @@ import time
import
traceback
from
urllib.parse
import
urlencode
import
execjs
import
requests
import
tls_client
from
loguru
import
logger
...
...
@@ -20,7 +21,7 @@ from utils import PxUtils
# jsCode = f.read()
# # ctx = execjs.compile(jsCode)
# # ctxPC = execjs.compile(open('pc.js').read())
# ctxStep2 = execjs.compile(open('
step2.js').read())
ctxStep2
=
execjs
.
compile
(
open
(
'../
step2.js'
)
.
read
())
def
get_timestamp
():
...
...
@@ -53,9 +54,11 @@ class PxBypass():
def
__init__
(
self
,
target_url
):
self
.
cookies
=
{}
self
.
log
=
logger
.
bind
(
module_name
=
'px'
)
envs
=
json
.
loads
(
open
(
'env.json'
,
'r'
,
encoding
=
'utf-8'
)
.
read
())
selectId
=
random
.
choice
(
list
(
envs
.
keys
()))
self
.
log
.
info
(
f
'selectId: {selectId}'
)
self
.
pxEnv
=
envs
[
selectId
]
self
.
ua
=
self
.
pxEnv
[
'navigatorparams'
][
'useragent'
]
self
.
ua
=
'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'
...
...
@@ -71,7 +74,6 @@ class PxBypass():
}
self
.
pxUrl
=
f
"https://collector-{self.appId}.px-cloud.net/api/v2/collector"
self
.
target_url
=
target_url
self
.
log
=
logger
.
bind
(
module_name
=
'px'
)
self
.
session
=
tls_client
.
Session
(
client_identifier
=
'chrome_117'
)
# print(session.get('https://tls.peet.ws/api/all').json())
# session = requests.Session()
...
...
@@ -93,7 +95,7 @@ class PxBypass():
prox
=
f
'http://user-uni001-region-us-sessid-{random.randint(1000,5000)}-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
# prox = 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000'
prox
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
#
prox = 'http://127.0.0.1:8890'
prox
=
'http://127.0.0.1:8890'
self
.
session
.
proxies
=
{
'http'
:
prox
,
'https'
:
prox
,
...
...
@@ -102,7 +104,7 @@ class PxBypass():
self
.
log
.
info
(
f
'proxy: {self.prox}'
)
self
.
tlsUrl
=
'http://52.52.23.116/tls/forward'
#
self.tlsUrl = 'http://127.0.0.1:58000/tls/forward'
self
.
tlsUrl
=
'http://127.0.0.1:58000/tls/forward'
def
inc
(
self
):
self
.
seq
+=
1
...
...
@@ -155,10 +157,10 @@ class PxBypass():
self
.
log
.
info
(
'; '
.
join
(
cks
))
self
.
inc
()
self
.
performanceNow
+=
int
(
time
.
time
()
*
1000
-
self
.
startTs
)
self
.
px12280
=
self
.
startTs2
+
self
.
performanceNow
#
self.px12280 = self.startTs2 + self.performanceNow
def
run
(
self
):
self
.
_init
()
#
self._init()
self
.
seq
=
0
self
.
rsc
=
1
self
.
_step_1
()
...
...
@@ -175,9 +177,9 @@ class PxBypass():
# # time.sleep(2)
self
.
_step_3
()
time
.
sleep
(
1
)
#
self._token()
self
.
add_header
()
time
.
sleep
(
2
)
self
.
_token
()
#
self.add_header()
def
_init
(
self
):
cks
=
'_px2=eyJ1IjoiOGRjYjQ3NjAtODl2jYi0xMWVlLTkwMmUtODE4MTcxMjRjOTBlIiwidiI6IjhlOGIyMGMzLTg5Y2ItMTFlZS05YWI1LTAwMjc4Njk4ZmY1ZiIsInQiOjYyMDIzMzg4MDAwNCwiaCI6Ijk4NjYzMWNkZDBmNTBjMWE5NjZjYjgwOGNlNzFjYTJkMWNkYzc2MjdjYTc4MTBlZDVhODdmN2FiMzYzOGU1OTgifQ==;'
...
...
@@ -240,7 +242,7 @@ class PxBypass():
def
_uuid
(
self
):
# return str(uuid.uuid4())
# return "b8a39670-7866-11ee-9655-63a4f05cd5d1"
#
return ctxStep2.call('genUuid')
return
ctxStep2
.
call
(
'genUuid'
)
r
=
[
"00"
,
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"0a"
,
"0b"
,
"0c"
,
"0d"
,
"0e"
,
"0f"
,
"10"
,
"11"
,
...
...
@@ -316,10 +318,10 @@ class PxBypass():
def
_step_1
(
self
):
t1
=
int
(
time
.
time
()
*
1000
)
t2
=
t1
+
random
.
randint
(
3
,
12
)
t2
=
t1
+
random
.
randint
(
5
,
30
)
self
.
startTs
=
t1
self
.
startTs2
=
t2
self
.
performanceNow
=
random
.
randint
(
2000
,
30
00
)
self
.
performanceNow
=
random
.
randint
(
5000
,
66
00
)
self
.
px12280
=
self
.
startTs2
+
self
.
performanceNow
self
.
uuid
=
self
.
_uuid
()
# "[{"t":"PX12095","d":{"PX11645":self.target_url,"PX12207":0,"PX12458":"MacIntel","PX11902":0,"PX11560":3781,"PX12248":3600,
...
...
@@ -369,7 +371,7 @@ class PxBypass():
# cks.append(f'{k}={v}')
# # resp = requests.post('http://127.0.0.1:59001/akamai/gen', json={
# self.prox = f'http://user-uni001-region-us-sessid-{random.randint(1000, 5000)}-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
self
.
prox
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
#
self.prox = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
cks
=
[]
s
=
set
()
# for k, v in self.cookies.items():
...
...
@@ -380,7 +382,6 @@ class PxBypass():
cks
.
append
(
f
'{k}={v}'
)
s
.
add
(
k
)
url
=
'https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true'
self
.
tlsUrl
=
'http://52.52.23.116/tls/forward'
response
=
requests
.
post
(
self
.
tlsUrl
,
# response = requests.post('http://127.0.0.1:58000/tls/forward',
json
=
dict
(
url
=
url
,
headers
=
{
...
...
@@ -411,12 +412,15 @@ class PxBypass():
# else:
# with open('index.html', 'w') as f:
# f.write(response['text'])
print
(
response
[
'status_code'
])
self
.
session
.
cookies
.
update
(
response
[
'cookies'
]
)
#
self.session.cookies.update(
#
response['cookies']
#
)
if
response
[
'status_code'
]
!=
403
:
self
.
log
.
success
(
f
"请求结果 {response['status_code']}"
)
self
.
add_header
()
else
:
self
.
log
.
error
(
f
"请求结果 {response['status_code']}"
)
def
_step_2
(
self
,
nn
):
...
...
@@ -483,7 +487,9 @@ class PxBypass():
p
=
PxEnv
(
self
.
pxEnv
,
self
.
target_url
,
self
.
sid
,
self
.
vid
,
self
.
ts
,
self
.
num1
,
self
.
num2
,
self
.
str1
,
self
.
uuid
,
self
.
startTs
,
self
.
startTs2
,
self
.
performanceNow
,
self
.
px12280
)
data
=
[
p
.
get_px12123
(),
p
.
get_px11891
(),
p
.
get_px11547
()]
data
=
[
p
.
get_px12123
(),
p
.
get_px11891
(),
p
.
get_px11547
()]
self
.
do_collector
(
data
)
def
parse_resp
(
self
,
resp
):
...
...
src/test.py
View file @
f5443a5e
...
...
@@ -11,7 +11,7 @@ def test():
# webs.request_url = "http://ymx-lcc.unififi.com/ew/shop/rev-vis/shopping"
request_url
=
"http://lcc.unififi.com/f9/shop/rev-vis/shopping"
# webs.request_url = "http://52.52.23.116/f9/shop/rev-vis/shopping"
#
request_url = "http://127.0.0.1:52041/f9/shop/rev-vis/shopping"
request_url
=
"http://127.0.0.1:52041/f9/shop/rev-vis/shopping"
r
=
requests
.
post
(
url
=
request_url
,
json
=
request_data
)
print
(
r
.
text
)
...
...
test_search.py
View file @
f5443a5e
...
...
@@ -9,7 +9,7 @@ headers = {"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-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"
,
"cookie"
:
'_px
2=eyJ1IjoiYzkyMzA4NDAtOGRkOS0xMWVlLTg5YTktNWQzMWNhNmYzMmU2IiwidiI6ImM5ZGIxNmQzLThkZDktMTFlZS05ODllLWI0NjIwMzAwN2VmZiIsInQiOjE3MDExNjgwMDU2MTgsImgiOiJkZmNiYTYwYzcxMDFmMTc0MGQ2MzVjMGIzZWI5OWQ5MmQwMDVjYjI3OTlhOGI0MWVkN2Q0ZTIxZWUxZjA2YzcxIn0=; pxcts=c9db2785-8dd9-11ee-989f-bc093386409b; _pxvid=c9db16d3-8dd9-11ee-989e-b46203007eff; ASP.NET_SessionId=iradg2uke0bcfe0m0ycxnw5b; __RequestVerificationToken=Fa2JeK3Ft5DZPT7gwoZ_dZZG9Wk4WPiLkhxT6Emel_EnZTU6oggQYAfVdH71D2TwL1UrcgfC0YY2a7bHksBlVBcjbBwDCmq2y5MyS3q6jozW1OIirAJe_-zfQV7WlEAjiVN8kA2; _pxhd=89338348b70482bd57032dae5514a89ebc969874949114f8d9c77847ecf1c425:c9db16d3-8dd9-11ee-989e-b46203007eff; dotrez=!vrgOAN0J20FRnLWT9B3Zm8gW+yuktNdYwrAe67ClTG8AmSzfP9d7Refcs2Va42zS1n9fIC3dBEMDLXY
='
"cookie"
:
'_px
vid=4aae3b08-8e7e-11ee-b902-b60760864a65; pxcts=4aae46b1-8e7e-11ee-b902-9e6e61499ea3; _px2=eyJ1IjoiNGEzZjI1ZTAtOGU3ZS0xMWVlLTg0ZDQtNzY5ZDEwYWE4MTk0IiwidiI6IjRhYWUzYjA4LThlN2UtMTFlZS1iOTAyLWI2MDc2MDg2NGE2NSIsInQiOjYyMDIzMzg4MDAwNCwiaCI6IjI4ZmIwYWJiZDYzMWUwMWI2YTIwNTE2YmU3OTlmOTdmNzE0YTY1OWVmY2MxMzRhZWQyNjViZmEwMzgyMWZiMjEifQ=
='
}
...
...
@@ -23,7 +23,7 @@ url = "https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2
prox
=
'http://user-uni001-region-us-sessid-1114-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
# prox = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
prox
=
'http://user-uni001-region-us-sessid-4909-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
#
prox = 'http://user-uni001-region-us-sessid-4909-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
print
(
prox
)
# prox = 'http://127.0.0.1:8890'
response
=
requests
.
post
(
'http://52.52.23.116/tls/forward'
,
...
...
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