Commit 229c9f98 authored by 王明明's avatar 王明明

vy 0321-17:42

parent 69ff2905
...@@ -577,14 +577,15 @@ function run(times, url, s3, bm_sz, returnData){ ...@@ -577,14 +577,15 @@ function run(times, url, s3, bm_sz, returnData){
let me_cnt = 0; let me_cnt = 0;
let mact = ''; let mact = '';
function event110(type){ function event110(type, pageX, pageY){
var a = type var a = type
var i = Date.now() - bmak.startTs; var i = Date.now() - bmak.startTs;
n = pageX, o = pageY; var n = pageX, o = pageY;
c = me_cnt + "," + a + "," + i + "," + n + "," + o; var c = me_cnt + "," + a + "," + i + "," + n + "," + o;
me_vel = me_vel + me_cnt + a + i + n + o me_vel = me_vel + me_cnt + a + i + n + o
mact = mact + c mact = mact + c +";";
ta += i ta += i
me_cnt ++;
} }
// -117 // -117
let te_vel = 0 let te_vel = 0
...@@ -693,6 +694,16 @@ function run(times, url, s3, bm_sz, returnData){ ...@@ -693,6 +694,16 @@ function run(times, url, s3, bm_sz, returnData){
keyEvent(s[parseInt(Math.random() *s.length)]) keyEvent(s[parseInt(Math.random() *s.length)])
} }
} }
for (let i = 0; i < parseInt(Math.random() * 20 + Math.random() *10); i++) {
const offX = mousepoint.x
+ (Math.random() > 0.5 ? (parseInt(Math.random() * 20) + 1): -(parseInt(Math.random() * 20) + 1));
const offY = mousepoint.y
+ (Math.random() > 0.5 ? (parseInt(Math.random() * 5) + 1): -(parseInt(Math.random() * 5) + 1));
mousepoint = {x:offX,y:offY}
event110(1,offX, offY)
event110(3,offX, offY)
event110(4,offX, offY)
}
if (Math.random() > 0.1){ if (Math.random() > 0.1){
for (let i = 0; i < parseInt(Math.random() * 5 + Math.random() *10); i++) { for (let i = 0; i < parseInt(Math.random() * 5 + Math.random() *10); i++) {
devicemotionEvent() devicemotionEvent()
...@@ -810,6 +821,7 @@ function run(times, url, s3, bm_sz, returnData){ ...@@ -810,6 +821,7 @@ function run(times, url, s3, bm_sz, returnData){
WHA; WHA;
} }
rw = PY(Iq(ua)) + PY(Iq(Vx.startTimestamp)) rw = PY(Iq(ua)) + PY(Iq(Vx.startTimestamp))
return rw;
pw = [] pw = []
uW = '' uW = ''
for (let index = 0; index < 5; index++) { for (let index = 0; index < 5; index++) {
...@@ -876,6 +888,7 @@ function run(times, url, s3, bm_sz, returnData){ ...@@ -876,6 +888,7 @@ function run(times, url, s3, bm_sz, returnData){
let arg129 = ","["concat"](Ff, ",")["concat"](1, ",")["concat"](lf, ",")["concat"](p3, ",")["concat"](I3, ",")["concat"](G3, ",")["concat"](2); let arg129 = ","["concat"](Ff, ",")["concat"](1, ",")["concat"](lf, ",")["concat"](p3, ",")["concat"](I3, ",")["concat"](G3, ",")["concat"](2);
// arg129 = ",f4d428b56c56367428590b96788fb86adb843acff7c654687443c18ea43a263e,2.625,0,Qualcomm,Adreno (TM) 540,b418793279adf3bfc824bb6d7e6f67e40206c5992f3b8eb8aa270e49872c27e7,2" // arg129 = ",f4d428b56c56367428590b96788fb86adb843acff7c654687443c18ea43a263e,2.625,0,Qualcomm,Adreno (TM) 540,b418793279adf3bfc824bb6d7e6f67e40206c5992f3b8eb8aa270e49872c27e7,2"
// arg129 = ",f4d428b56c56367428590b96788fb86adb843acff7c654687443c18ea43a263e,2.625,17369408833fbec07e2e4f29b573bbc1c3e8aaa925bdd17ac22c5b55f9ea9fc7,Qualcomm,Adreno (TM) 540,b418793279adf3bfc824bb6d7e6f67e40206c5992f3b8eb8aa270e49872c27e7,2" // arg129 = ",f4d428b56c56367428590b96788fb86adb843acff7c654687443c18ea43a263e,2.625,17369408833fbec07e2e4f29b573bbc1c3e8aaa925bdd17ac22c5b55f9ea9fc7,Qualcomm,Adreno (TM) 540,b418793279adf3bfc824bb6d7e6f67e40206c5992f3b8eb8aa270e49872c27e7,2"
arg129 = ",479507b7234c45186c995a034296add61e679bb70e95994997a64c22e9b0d79c,3.4999998807907104,,Google Inc. (Intel),ANGLE (Intel, Intel(R) Iris(R) Xe Graphics Direct3D11 vs_5_0 ps_5_0, D3D11),fab37783e5c3bc89f876774bac442ad3e613f7dc5b769b19a8d4d8c6b80ef077,2"
...@@ -1006,7 +1019,7 @@ function run(times, url, s3, bm_sz, returnData){ ...@@ -1006,7 +1019,7 @@ function run(times, url, s3, bm_sz, returnData){
] ]
let tss = Date.now() - bmak.startTs let tss = Date.now() - bmak.startTs
data.push("-110", data.push("-110",
times >= 3 ? mouseMoveData : "") mact)
data.push( data.push(
"-117", "-117",
times > 2?'0,2,1468,-1,-1;1,3,1531,-1,-1;':'', times > 2?'0,2,1468,-1,-1;1,3,1531,-1,-1;':'',
......
...@@ -6,8 +6,10 @@ import ( ...@@ -6,8 +6,10 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"gopkg.in/natefinch/lumberjack.v2" "gopkg.in/natefinch/lumberjack.v2"
"io"
"log" "log"
"net/http" "net/http"
"os"
"path" "path"
"test/model" "test/model"
"test/util" "test/util"
...@@ -55,7 +57,8 @@ func main() { ...@@ -55,7 +57,8 @@ func main() {
// 是否需要压缩滚动日志, 使用的 gzip 压缩 // 是否需要压缩滚动日志, 使用的 gzip 压缩
Compress: true, // disabled by default Compress: true, // disabled by default
} }
logrus.SetOutput(logWriter) //logrus.SetOutput(logWriter)
logrus.SetOutput(io.MultiWriter(os.Stdout, logWriter))
//str := "<noscript><img src=\"https://www.easyjet.com/akam/13/pixel_7b9d10f9?a=dD1lMmMzOTBjM2M4NWUyYz\nkzNjljOTNhZDUyNmRkOGJjMDdjNjM2MWJmJmpzPW9mZg==\" style=\"visibility: hidden; position: absolu\nte; left: -999px; top: -999px;\" /></noscript><script type=\"text/javascript\" src=\"/-Hzovq/uluGM/jHPdr/v3N7/m5OOLVXmDOwY/NG4dCQE/Zy/lnEF9qaQI\"></script></body>\n</html>" //str := "<noscript><img src=\"https://www.easyjet.com/akam/13/pixel_7b9d10f9?a=dD1lMmMzOTBjM2M4NWUyYz\nkzNjljOTNhZDUyNmRkOGJjMDdjNjM2MWJmJmpzPW9mZg==\" style=\"visibility: hidden; position: absolu\nte; left: -999px; top: -999px;\" /></noscript><script type=\"text/javascript\" src=\"/-Hzovq/uluGM/jHPdr/v3N7/m5OOLVXmDOwY/NG4dCQE/Zy/lnEF9qaQI\"></script></body>\n</html>"
//str = "<noscript><img src=\"https://www.easyjet.com/akam/13/pixel_4ac30e0f?a=dD1kZmQ1ODJiODRhNzUxMzAzMDJmN\nTczMjdhMGVlZGEyNWM3MTcwNDY5JmpzPW9mZg==\" style=\"visibility: hidden; position: absolute; left: -999\npx; top: -999px;\" /></noscript><script type=\"text/javascript\" src=\"/9dz5yx/00N2ob/cHtIJhA/oGemj3/BA/SaOXNNXpVab5wO/PVZtb1s9Aw/by/ZID307CB8\"></script></body>\n" //str = "<noscript><img src=\"https://www.easyjet.com/akam/13/pixel_4ac30e0f?a=dD1kZmQ1ODJiODRhNzUxMzAzMDJmN\nTczMjdhMGVlZGEyNWM3MTcwNDY5JmpzPW9mZg==\" style=\"visibility: hidden; position: absolute; left: -999\npx; top: -999px;\" /></noscript><script type=\"text/javascript\" src=\"/9dz5yx/00N2ob/cHtIJhA/oGemj3/BA/SaOXNNXpVab5wO/PVZtb1s9Aw/by/ZID307CB8\"></script></body>\n"
// //
......
...@@ -141,7 +141,6 @@ func (akm *AkmClient) postSensorJs(times int) error { ...@@ -141,7 +141,6 @@ func (akm *AkmClient) postSensorJs(times int) error {
akm.ua = UA akm.ua = UA
t2 := time.Now() t2 := time.Now()
sensor_data := "{\"sensor_data\":\"" + sensorData + "\"}" sensor_data := "{\"sensor_data\":\"" + sensorData + "\"}"
akm.logger.Info("sensor", sensor_data)
statusCode, err := akm.PostJson(times, akm.SensorUrl, sensor_data) statusCode, err := akm.PostJson(times, akm.SensorUrl, sensor_data)
if err != nil { if err != nil {
return err return err
...@@ -159,7 +158,6 @@ func (akm *AkmClient) postSensor(times int) error { ...@@ -159,7 +158,6 @@ func (akm *AkmClient) postSensor(times int) error {
akm.ua = ua akm.ua = ua
t2 := time.Now() t2 := time.Now()
sensor_data := "{\"sensor_data\":\"" + res + "\"}" sensor_data := "{\"sensor_data\":\"" + res + "\"}"
akm.logger.Info("sensor", sensor_data)
statusCode, err := akm.PostJson(times, akm.SensorUrl, sensor_data) statusCode, err := akm.PostJson(times, akm.SensorUrl, sensor_data)
if err != nil { if err != nil {
return err return err
......
...@@ -11,5 +11,5 @@ const ( ...@@ -11,5 +11,5 @@ const (
U2Url = "https://www.easyjet.com/en" U2Url = "https://www.easyjet.com/en"
U2PostUrl = "https://www.easyjet.com/en/buy/flights?isOneWay=on&pid=www.easyjet.com" U2PostUrl = "https://www.easyjet.com/en/buy/flights?isOneWay=on&pid=www.easyjet.com"
VYUrl = "https://m.vueling.com" VYUrl = "https://m.vueling.com"
VYPostUrl = "https://m.vueling.com" VYPostUrl = "https://m.vueling.com/SB"
) )
...@@ -15,8 +15,13 @@ func VueLing(carrierType, proxyUrl string) (*Akm, error) { ...@@ -15,8 +15,13 @@ func VueLing(carrierType, proxyUrl string) (*Akm, error) {
err := akmClient.postSensorJs(i) err := akmClient.postSensorJs(i)
if err != nil { if err != nil {
akmClient.logger.WithError(err).Errorln("请求失败") akmClient.logger.WithError(err).Errorln("请求失败")
return nil, err return nil, err
} }
a, _ := akmClient.GetCookie()
if len(a) == 481 {
break
}
} }
......
...@@ -85,8 +85,8 @@ func actVY() { ...@@ -85,8 +85,8 @@ func actVY() {
t1 := time.Now() t1 := time.Now()
//resp, err := http.Post("http://lcc.unififi.com/akamai/gen", //resp, err := http.Post("http://lcc.unififi.com/akamai/gen",
resp, err := http.Post("http://127.0.0.1:59001/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\": \""+px+"\"}"))
//"application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \"http://127.0.0.1:8890\"}")) "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\"}")) //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 { if err != nil {
//panic(err) //panic(err)
...@@ -98,7 +98,7 @@ func actVY() { ...@@ -98,7 +98,7 @@ func actVY() {
testVY(px, body) testVY(px, body)
} }
func main() { func main() {
for i := 0; i < 10; i++ { for i := 0; i < 1; i++ {
t1 := time.Now() t1 := time.Now()
fmt.Println(t1) fmt.Println(t1)
wg := sync.WaitGroup{} wg := sync.WaitGroup{}
...@@ -109,7 +109,7 @@ func main() { ...@@ -109,7 +109,7 @@ func main() {
fmt.Println("开始vytest") fmt.Println("开始vytest")
actVY() actVY()
fmt.Println("开始u2test") fmt.Println("开始u2test")
actU2() //actU2()
}() }()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment