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
e568fdb8
Commit
e568fdb8
authored
Mar 22, 2023
by
王明明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚nk
parent
b4001da5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
174 additions
and
23 deletions
+174
-23
easyjet.go
src/model/easyjet.go
+2
-1
sensor.go
src/sensor/sensor.go
+2
-2
test.go
src/test/test.go
+170
-20
No files found.
src/model/easyjet.go
View file @
e568fdb8
...
...
@@ -117,8 +117,9 @@ func (c *AkmClient) GetAbck(times int, urlInput string) error {
if
err
!=
nil
{
return
err
}
abck
,
bmsz
=
c
.
GetCookie
()
c
.
logger
.
Info
(
"第"
,
times
,
"响应abck结果"
,
statusCode
,
"请求耗时"
,
time
.
Since
(
t1
)
.
String
())
c
.
logger
.
Info
(
"第"
,
times
,
"响应abck结果"
,
statusCode
,
"
abck长度 "
,
len
(
abck
),
"
请求耗时"
,
time
.
Since
(
t1
)
.
String
())
//defer akmRes.Body.Close()
return
nil
}
...
...
src/sensor/sensor.go
View file @
e568fdb8
...
...
@@ -169,8 +169,8 @@ func (a AkmSign) genData() string {
arg132
=
XJ
+
","
+
qJ
}
arg129
:=
"5a4dd815976b96d7332ee11d4ad4f22fbd9d8484fb33b68201be1b71ded52cf3,1,0,Google Inc. (ATI Technologies Inc.),ANGLE (ATI Technologies Inc., AMD Radeon RX 560 OpenGL Engine, OpenGL 4.1),2cd06f89ccaf413c4875680e907893d902d434005dea52a232d420825cd4fa5f,28"
zN
:=
a
.
zNfunc
()
fmt
.
Println
(
zN
)
//
zN := a.zNfunc()
//
fmt.Println(zN)
//WN := zN[0]
//DN := zN[1]
//EN := zN[2]
...
...
src/test/test.go
View file @
e568fdb8
...
...
@@ -2,9 +2,11 @@ package main
import
(
"encoding/json"
"flag"
"fmt"
http
"github.com/bogdanfinn/fhttp"
tls_client
"github.com/bogdanfinn/tls-client"
"io"
"io/ioutil"
"net/url"
"strings"
...
...
@@ -17,6 +19,7 @@ func query(data []byte) {
v
:=
model
.
Akm
{}
json
.
Unmarshal
(
data
,
&
v
)
fmt
.
Println
(
v
.
Ua
)
jar
:=
tls_client
.
NewCookieJar
()
options
:=
[]
tls_client
.
HttpClientOption
{
tls_client
.
WithTimeoutSeconds
(
30
),
...
...
@@ -24,7 +27,7 @@ func query(data []byte) {
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://u
nfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521
"),
//tls_client.WithProxyUrl("http://u
ser-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600
"),
tls_client
.
WithInsecureSkipVerify
(),
}
uri
,
_
:=
url
.
Parse
(
"https://www.easyjet.com/"
)
...
...
@@ -62,24 +65,59 @@ func query(data []byte) {
//fmt.Println(string(readBytes))
}
func
main
()
{
for
i
:=
0
;
i
<
1
;
i
++
{
t1
:=
time
.
Now
()
fmt
.
Println
(
t1
)
wg
:=
sync
.
WaitGroup
{}
for
i
:=
0
;
i
<
1
;
i
++
{
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
//172.29.204.120
//resp, err := http.Post("http://172.29.199.203:9999/get-proxy", "application/x-www-form-urlencoded", strings.NewReader("name=NK&type=other&country=us"))
//resp, err := http.Get("http://127.0.0.1:9999/ping")
//resp, err := http.Post("http://lcc.unififi.com/proxy/get-proxy", "application/json", strings.NewReader("{\n \"name\": \"NK\",\n \"type\": \"shopping\"\n}"))
func
querynk
(
data
[]
byte
)
{
v
:=
model
.
Akm
{}
json
.
Unmarshal
(
data
,
&
v
)
fmt
.
Println
(
v
)
jar
:=
tls_client
.
NewCookieJar
()
options
:=
[]
tls_client
.
HttpClientOption
{
tls_client
.
WithTimeoutSeconds
(
30
),
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_110
),
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
.
WithInsecureSkipVerify
(),
}
uri
,
_
:=
url
.
Parse
(
"https://www.spirit.com/"
)
var
cookies
[]
*
http
.
Cookie
for
key
,
value
:=
range
v
.
Cookies
{
cookies
=
append
(
cookies
,
&
http
.
Cookie
{
Name
:
key
,
Value
:
value
,
})
}
jar
.
SetCookies
(
uri
,
cookies
)
Client
,
err
:=
tls_client
.
NewHttpClient
(
tls_client
.
NewNoopLogger
(),
options
...
)
req
,
err
:=
http
.
NewRequest
(
"POST"
,
"https://www.spirit.com/api/nk-token/api/v1/token"
,
strings
.
NewReader
(
"{
\"
applicationName
\"
:
\"
dotRezWeb
\"
}"
))
if
err
!=
nil
{
panic
(
err
)
}
req
.
Header
=
http
.
Header
{
"accept"
:
{
"application/json, text/plain, */*"
},
"accept-language"
:
{
"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"
},
"user-agent"
:
{
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
},
"ocp-apim-subscription-key"
:
{
"dc6844776fe84b1c8b68affe7deb7916"
},
"content-type"
:
{
"application/json"
},
}
resp
,
err
:=
Client
.
Do
(
req
)
if
err
!=
nil
{
panic
(
err
)
}
defer
resp
.
Body
.
Close
()
fmt
.
Println
(
"响应结果"
,
resp
.
StatusCode
)
readBytes
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
string
(
readBytes
))
}
func
actU2
()
{
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\": \"u2\", \"proxy\": \"http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521
\"}"))
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
u
2
\"
,
\"
proxy
\"
:
\"
http://127.0.0.1:8890
\"
}"
))
//"application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600
\"}"))
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
U
2
\"
,
\"
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)
...
...
@@ -89,13 +127,125 @@ func main() {
body
,
_
:=
ioutil
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
"abck cost"
,
time
.
Since
(
t1
)
.
String
())
query
(
body
)
}
func
actVY
()
{
px
:=
"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"
if
*
Debug
{
px
=
"http://127.0.0.1:8890"
}
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\"}"))
//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)
fmt
.
Println
(
err
)
return
}
body
,
_
:=
ioutil
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
"abck cost"
,
time
.
Since
(
t1
)
.
String
())
testVY
(
px
,
body
)
}
func
actnk
()
{
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
\"
:
\"
NK
\"
,
\"
proxy
\"
:
\"
http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600
\"
}"
))
//"application/json", strings.NewReader("{\"type\": \"U2\", \"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)
fmt
.
Println
(
err
)
return
}
body
,
_
:=
ioutil
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
"abck cost"
,
time
.
Since
(
t1
)
.
String
())
querynk
(
body
)
}
var
Debug
*
bool
func
main
()
{
Debug
=
flag
.
Bool
(
"debug"
,
false
,
"本地调试"
)
flag
.
Parse
()
for
i
:=
0
;
i
<
1
;
i
++
{
t1
:=
time
.
Now
()
fmt
.
Println
(
t1
)
wg
:=
sync
.
WaitGroup
{}
for
i
:=
0
;
i
<
1
;
i
++
{
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
//fmt.Println("开始vytest")
//actVY()
fmt
.
Println
(
"开始u2test"
)
actU2
()
//fmt.Println("开始NKtest")
//actnk()
}()
}
wg
.
Wait
()
fmt
.
Println
(
"cost"
,
time
.
Since
(
t1
)
.
String
())
time
.
Sleep
(
time
.
Second
*
5
)
time
.
Sleep
(
time
.
Second
*
1
)
}
}
func
testVY
(
px
string
,
data
[]
byte
)
{
datas
:=
"{
\n\t\"
DeviceType
\"
:
\"
WEB
\"
,
\n\t\"
UserAgent
\"
:
\"
Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
\"
,
\n\t\"
Udid
\"
: 'c4bf-275d-76b1-ff7f-83c3-cfcd',
\n\t\"
IP
\"
:
\"
235.231.34.152
\"
,
\n\t\"
AppVersion
\"
:
\"
17.2.0
\"
,
\n\t\"
Domain
\"
:
\"
https://m.vueling.com
\"
,
\n\t\"
DiscountType
\"
: 0,
\n\t\"
Paxs
\"
: [{
\n\t\t\"
PaxType
\"
:
\"
ADT
\"
,
\n\t\t\"
Quantity
\"
:
\"
1
\"\n\t
}, {
\n\t\t\"
PaxType
\"
:
\"
CHD
\"
,
\n\t\t\"
Quantity
\"
:
\"
0
\"\n\t
}, {
\n\t\t\"
PaxType
\"
:
\"
INF
\"
,
\n\t\t\"
Quantity
\"
:
\"
0
\"\n\t
}],
\n\t\"
CurrencyCode
\"
:
\"
EUR
\"
,
\n\t\"
AirportDateTimeList
\"
: [{
\n\t\t\"
ArrivalStation
\"
:
\"
BCN
\"
,
\n\t\t\"
DepartureStation
\"
:
\"
LCG
\"
,
\n\t\t\"
MarketDateDeparture
\"
:
\"
2023-03-20
\"\n\t
}],
\n\t\"
Language
\"
:
\"
en-GB
\"\n
}"
v
:=
model
.
Akm
{}
json
.
Unmarshal
(
data
,
&
v
)
fmt
.
Println
(
v
.
Ua
)
jar
:=
tls_client
.
NewCookieJar
()
options
:=
[]
tls_client
.
HttpClientOption
{
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
.
WithInsecureSkipVerify
(),
}
uri
,
_
:=
url
.
Parse
(
"https://m.vueling.com/"
)
var
cookies
[]
*
http
.
Cookie
for
key
,
value
:=
range
v
.
Cookies
{
cookies
=
append
(
cookies
,
&
http
.
Cookie
{
Name
:
key
,
Value
:
value
,
})
}
jar
.
SetCookies
(
uri
,
cookies
)
Client
,
err
:=
tls_client
.
NewHttpClient
(
tls_client
.
NewNoopLogger
(),
options
...
)
req
,
err
:=
http
.
NewRequest
(
"POST"
,
"https://apimobile.vueling.com/Vueling.Mobile.AvailabilityService.WebAPI/api/V2/AvailabilityController/DoAirPriceSB"
,
strings
.
NewReader
(
datas
))
if
err
!=
nil
{
panic
(
err
)
}
req
.
Header
.
Set
(
"Host"
,
"apimobile.vueling.com"
)
req
.
Header
.
Set
(
"Upgrade-Insecure-Requests"
,
"1"
)
req
.
Header
.
Set
(
"user-agent"
,
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
)
req
.
Header
.
Set
(
"accept"
,
"application/json, text/plain, */*"
)
req
.
Header
.
Set
(
"sec-fetch-site"
,
"same-site"
)
req
.
Header
.
Set
(
"sec-fetch-mode"
,
"cors"
)
req
.
Header
.
Set
(
"Sec-Fetch-User"
,
"?1"
)
req
.
Header
.
Set
(
"sec-fetch-dest"
,
"empty"
)
req
.
Header
.
Set
(
"accept-language"
,
"en-US,en;q=0.9"
)
req
.
Header
.
Set
(
"pragma"
,
"no-cache"
)
req
.
Header
.
Set
(
"cache-control"
,
"no-cache"
)
req
.
Header
.
Set
(
"content-type"
,
"application/json"
)
req
.
Header
.
Set
(
"origin"
,
"https://m.vueling.com"
)
req
.
Header
.
Set
(
"referer"
,
"https://m.vueling.com/"
)
req
.
Header
.
Set
(
"Content-Type"
,
"application/json"
)
resp
,
err
:=
Client
.
Do
(
req
)
if
err
!=
nil
{
panic
(
err
)
}
defer
resp
.
Body
.
Close
()
fmt
.
Println
(
"响应结果"
,
resp
.
StatusCode
)
readBytes
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
string
(
readBytes
))
}
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