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
37d511a2
Commit
37d511a2
authored
Nov 23, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加密函数 转 py
parent
a0d0a3c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
encodepayload.js
js/encodepayload.js
+6
-3
main.py
main.py
+5
-2
utils.py
utils.py
+7
-5
No files found.
js/encodepayload.js
View file @
37d511a2
No preview for this file type
main.py
View file @
37d511a2
...
@@ -14,6 +14,8 @@ import requests
...
@@ -14,6 +14,8 @@ import requests
import
tls_client
import
tls_client
from
loguru
import
logger
from
loguru
import
logger
from
utils
import
PxUtils
with
open
(
'js/encodepayload.js'
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
'js/encodepayload.js'
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
jsCode
=
f
.
read
()
jsCode
=
f
.
read
()
ctx
=
execjs
.
compile
(
jsCode
)
ctx
=
execjs
.
compile
(
jsCode
)
...
@@ -65,7 +67,7 @@ class PxBypass():
...
@@ -65,7 +67,7 @@ class PxBypass():
prox
=
'http://user-uni001-region-us-sessid-1111-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
prox
=
'http://user-uni001-region-us-sessid-1111-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
prox
=
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000'
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
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
prox
=
'http://127.0.0.1:7890'
#
prox = 'http://127.0.0.1:7890'
session
.
proxies
=
{
session
.
proxies
=
{
'http'
:
prox
,
'http'
:
prox
,
'https'
:
prox
,
'https'
:
prox
,
...
@@ -110,7 +112,8 @@ class PxBypass():
...
@@ -110,7 +112,8 @@ class PxBypass():
data_str
=
data
data_str
=
data
self
.
log
.
info
(
f
'data_str {data_str}'
)
self
.
log
.
info
(
f
'data_str {data_str}'
)
self
.
log
.
info
(
f
"gen Payload {self.uuid}, {self.ts}"
)
self
.
log
.
info
(
f
"gen Payload {self.uuid}, {self.ts}"
)
payload
=
ctx
.
call
(
'encodePayload'
,
data_str
,
self
.
uuid
,
self
.
ts
)
# payload = ctx.call('encodePayload', data_str, self.uuid, self.ts)
payload
=
PxUtils
()
.
encode_payload
(
payload
=
data_str
,
uuid
=
self
.
uuid
,
ts
=
self
.
ts
)
self
.
log
.
info
(
f
'payload {payload}'
)
self
.
log
.
info
(
f
'payload {payload}'
)
pc
=
self
.
_gen_pc
(
data_str
,
f
'{self.uuid}:{self.tag}:{self.ft}'
)
pc
=
self
.
_gen_pc
(
data_str
,
f
'{self.uuid}:{self.tag}:{self.ft}'
)
body
=
{
body
=
{
...
...
utils.py
View file @
37d511a2
...
@@ -17,9 +17,9 @@ class PxUtils():
...
@@ -17,9 +17,9 @@ class PxUtils():
t1
=
self
.
ie
(
payload
,
50
)
t1
=
self
.
ie
(
payload
,
50
)
# print(t1)
# print(t1)
BasePayload
=
self
.
encode
(
t1
)
BasePayload
=
self
.
encode
(
t1
)
print
(
BasePayload
)
#
print(BasePayload)
fv
=
self
.
ie
(
self
.
encode
(
sts
),
10
)
fv
=
self
.
ie
(
self
.
encode
(
sts
),
10
)
print
(
fv
)
#
print(fv)
t3
=
self
.
Ev
(
fv
,
len
(
BasePayload
),
uuid
)
t3
=
self
.
Ev
(
fv
,
len
(
BasePayload
),
uuid
)
return
self
.
Fa
(
fv
,
BasePayload
,
t3
)
return
self
.
Fa
(
fv
,
BasePayload
,
t3
)
def
ie
(
self
,
t
,
e
):
def
ie
(
self
,
t
,
e
):
...
@@ -70,10 +70,12 @@ class PxUtils():
...
@@ -70,10 +70,12 @@ class PxUtils():
o
=
0
o
=
0
a
=
t
a
=
t
for
i
in
range
(
len
(
t
)):
for
i
in
range
(
len
(
t
)):
print
(
i
,
o
,
n
[
i
],
n
[
i
]
-
i
-
1
,
e
[
o
:
n
[
i
]
-
i
-
1
],
a
[
i
],
e
[
o
:
n
[
i
]
-
i
-
1
]
+
a
[
i
])
#
print(i,o,n[i], n[i] - i - 1, e[o: n[i] - i - 1], a[i], e[o: n[i] - i - 1]+a[i])
r
+=
e
[
o
:
n
[
i
]
-
i
-
i
]
+
a
[
i
]
r
+=
e
[
o
:
n
[
i
]
-
i
-
1
]
+
a
[
i
]
o
=
n
[
i
]
-
i
-
1
o
=
n
[
i
]
-
i
-
1
print
(
e
[
o
:])
# print('iii',i,r)
# print()
# print(e[o:])
r
+=
e
[
o
:]
r
+=
e
[
o
:]
return
r
return
r
...
...
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