Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-akm
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-akm
Commits
2e2fbf03
Commit
2e2fbf03
authored
Mar 21, 2023
by
anqi-wmm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
随机选择设备参数
parent
20fcd4eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
7 deletions
+44
-7
sensor.go
src/sensor/sensor.go
+37
-0
akm_common.go
src/test/akm_common.go
+1
-1
test.go
src/test/test.go
+4
-4
testnk.go
src/test/testnk.go
+2
-2
No files found.
src/sensor/sensor.go
View file @
2e2fbf03
...
...
@@ -13,6 +13,43 @@ import (
"time"
)
func
floatToHex
(
f
float64
)
string
{
bits
:=
math
.
Float64bits
(
f
)
sign
:=
bits
>>
63
exp
:=
(
bits
>>
52
)
&
0x7ff
frac
:=
bits
&
0xfffffffffffff
if
exp
==
0x7ff
{
if
frac
==
0
{
if
sign
==
0
{
return
"inf"
}
else
{
return
"-inf"
}
}
else
{
return
"NaN"
}
}
exp
-=
1023
hex
:=
fmt
.
Sprintf
(
"%x"
,
frac
)
if
len
(
hex
)
<
13
{
hex
=
fmt
.
Sprintf
(
"%0*s"
,
13
-
len
(
hex
),
hex
)
}
if
exp
>=
0
{
hex
=
hex
[
:
1
]
+
hex
[
1
:
]
hex
=
hex
[
:
exp
+
1
]
+
hex
[
exp
+
1
:
]
}
else
{
hex
=
"0."
+
strings
.
Repeat
(
"0"
,
int
(
-
exp
-
1
))
+
hex
}
if
sign
==
1
{
hex
=
"-"
+
hex
}
return
hex
}
func
hr
(
ngT
,
cgT
int
)
int
{
return
ngT
%
cgT
}
...
...
src/test/akm_common.go
View file @
2e2fbf03
...
...
@@ -52,7 +52,7 @@ func (c *AkmCommonTest) abckSensorCommon(times int) string {
//rs, _ := io.ReadAll(r.Body)
//rsss := strings.Split(string(rs), "|||||")
//sensorData := rsss[0]
sensorData
,
ua
:=
sensor2
.
GenData
(
i
,
abck
,
bm_sz
,
c
.
Ua
,
c
.
IntUrl
)
sensorData
,
ua
:=
sensor2
.
GenData
(
i
,
abck
,
bm_sz
,
c
.
IntUrl
)
c
.
Ua
=
ua
//sensorData, ua := sensor.GenData(i, abck, bm_sz, "Mozilla/5.0 (Linux; Android 9; SM-N9500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36", "https://www.spirit.com/")
//fmt.Println("ua", ua)
...
...
src/test/test.go
View file @
2e2fbf03
...
...
@@ -89,8 +89,8 @@ func actVY() {
t1
:=
time
.
Now
()
//resp, err := http.Post("http://lcc.unififi.com/akamai/gen",
resp
,
err
:=
http
.
Post
(
"http://127.0.0.1:59001/akamai/gen"
,
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
VY
\"
,
\"
proxy
\"
:
\"
"
+
px
+
"
\"
}"
))
//
"application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \"http://127.0.0.1:8890\"}"))
//
"application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \""+px+"\"}"))
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
VY
\"
,
\"
proxy
\"
:
\"
http://127.0.0.1:8890
\"
}"
))
//resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
if
err
!=
nil
{
//panic(err)
...
...
@@ -141,8 +141,8 @@ func testVY(px string, data []byte) {
tls_client
.
WithTimeoutSeconds
(
30
),
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_110
),
tls_client
.
WithCookieJar
(
jar
),
// create cookieJar instance and pass it as argument
//
tls_client.WithProxyUrl("http://127.0.0.1:8890"),
tls_client
.
WithProxyUrl
(
px
),
tls_client
.
WithProxyUrl
(
"http://127.0.0.1:8890"
),
//
tls_client.WithProxyUrl(px),
tls_client
.
WithInsecureSkipVerify
(),
}
uri
,
_
:=
url
.
Parse
(
"https://m.vueling.com/"
)
...
...
src/test/testnk.go
View file @
2e2fbf03
...
...
@@ -87,8 +87,8 @@ func main() {
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_108
),
tls_client
.
WithNotFollowRedirects
(),
tls_client
.
WithCookieJar
(
jar
),
// create cookieJar instance and pass it as argument
//
tls_client.WithProxyUrl("http://127.0.0.1:8890"),
tls_client
.
WithProxyUrl
(
"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"
),
tls_client
.
WithProxyUrl
(
"http://127.0.0.1:8890"
),
//
tls_client.WithProxyUrl("http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"),
//tls_client.WithProxyUrl(px),
//tls_client.WithInsecureSkipVerify(),
}
...
...
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