forked from xbyl1234/instagram_lite_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lite_test2.go
43 lines (36 loc) · 12.8 KB
/
lite_test2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Please let author have a drink, usdt trc20: TEpSxaE3kexE4e5igqmCZRMJNoDiQeWx29
// tg: @fuckins996
package main
import (
"CentralizedControl/common/log"
"CentralizedControl/common/utils"
"CentralizedControl/ins_lite"
"testing"
)
//
//func TestGenModule(t *testing.T) {
// data := "05 a0 0a b8 00 00 00 00 1f 1d 95 30 00 00 00 00 0c 00 00 00 00 02 c8 66 7a 00 00 01 8d bc b6 65 70 98 0e 18 00 0e 33 38 32 2e 30 2e 30 2e 31 31 2e 31 31 35 00 00 00 00 00 00 0a 61 98 00 02 00 00 00 16 69 67 6c 69 74 65 2d 7a 2e 69 6e 73 74 61 67 72 61 6d 2e 63 6f 6d 00 00 1f 99 00 0b 7a 68 5f 43 4e 5f 23 48 61 6e 73 00 5e 53 75 70 70 6f 72 74 73 46 72 65 73 63 6f 3d 31 20 6d 6f 64 75 6c 61 72 3d 33 20 44 61 6c 76 69 6b 2f 32 2e 31 2e 30 20 28 4c 69 6e 75 78 3b 20 55 3b 20 41 6e 64 72 6f 69 64 20 31 30 3b 20 53 4d 2d 4e 39 35 30 46 20 42 75 69 6c 64 2f 51 51 32 41 2e 32 30 30 34 30 35 2e 30 30 35 29 00 08 53 4d 2d 4e 39 35 30 46 01 e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0e 41 73 69 61 2f 53 69 6e 67 61 70 6f 72 65 49 ca 00 24 30 32 30 61 33 32 63 35 2d 61 39 33 35 2d 33 38 63 39 2d 37 63 34 33 2d 65 34 32 32 64 39 34 66 64 62 32 64 00 00 00 00 01 00 00 00 00 00 00 61 33 61 33 4e 09 53 6b 42 c6 00 00 00 00 15 61 72 6d 36 34 2d 76 38 61 7c 61 72 6d 65 61 62 69 2d 76 37 61 20 19 96 28 00 1d 00 02 31 30 13 02 10 5d fa 65 66 de 81 26 ee a4 83 c2 79 c2 1f 9a 0f 00 00 01 00 00 00 00 00 00 00 00 10 31 63 62 65 30 62 61 32 61 39 39 38 62 64 32 32 00 12 36 33 36 30 30 36 39 35 32 36 33 37 38 30 39 2d 66 67 00 00 00 00 40 37 37 61 61 36 62 63 35 37 30 64 32 37 30 31 30 31 33 33 63 39 39 38 64 66 63 32 64 62 31 65 35 62 64 32 34 62 30 62 35 61 39 34 34 31 62 33 30 62 32 64 30 66 31 33 37 62 30 66 31 34 34 34 38 00 00 04 01 45 00 03 20 e2 e4 a6 9b 0f 3d 3f da 39 31 b5 88 11 74 cd c1 3a e4 76 07 b4 8a f2 c5 f8 a4 ea 8e 48 94 93 28 00 00 00 00 00 00 00 00 01 00 00 27 98 00 00 "
// parse := tools.ParseLiteRecvStr(data)
// println(hex.EncodeToString(parse.Data))
//}
func TestScreenDiff(t *testing.T) {
log.DisAbleDebugLog()
client := &ins_lite.InsLiteClient{
//cookies: ck,
//Screen: map[int32]*recver.ScreenReceived{},
}
//client.TestAddScreen("")
client.TestAddScreen("0b 00 01 00 17 00 00 00 65 00 ff ff ff ff 00 00 00 00 8c 20 82 40 00 24 08 01 00 00 00 00 02 00 04 e0 09 00 00 80 00 a5 01 00 00 b5 d4 03 01 01 b8 2a a0 16 00 00 02 0a 00 00 00 00 00 00 01 02 20 84 40 00 24 08 01 00 00 00 00 02 00 04 80 09 00 00 80 00 a5 01 b1 d4 03 b8 2a a0 16 00 00 02 0a 20 10 00 44 08 00 fc 00 00 40 e2 07 e1 01 00 00 30 80 14 e5 c0 f4 0d 00 00 00 00 00 00 00 65 08 6c 6f 61 64 69 6e 67 02 b4 ff 03 02 04 01 01 00 00 0b 7f fe 0c 00 00 7f fd 0a 00 00 7f fc 0b 00 00 7f fb 09 00 00 7f fa 08 00 00 7f f9 17 00 00 7f f8 18 00 00 7f f7 11 00 04 00 00 00 00 7f f6 04 00 00 7f f5 19 00 00 7f f4 0f 00 06 7f f7 7f f6 7f f5")
client.TestAddScreen("0b 00 01 00 23 00 01 00 0c 00 ff ff ff ff 01 00 00 00 88 20 82 40 00 24 08 01 00 00 00 00 02 00 14 f0 09 00 00 80 00 8c 80 08 00 00 b5 d4 03 41 41 02 02 b8 2a a0 16 00 00 02 0a 00 00 00 00 00 00 04 02 20 84 40 00 24 08 00 00 00 00 00 02 00 04 00 09 00 00 80 00 8c 80 08 b0 d4 03 a0 16 00 00 02 0a 00 00 00 40 01 02 00 00 02 20 84 40 00 24 08 01 10 00 00 02 02 00 04 80 09 00 00 80 00 8c 80 08 32 b1 d4 03 b8 2a a0 16 00 00 02 0a 20 12 00 44 08 00 fc 00 06 02 20 84 40 00 24 08 00 20 50 00 00 00 00 04 80 0f 00 00 80 00 8c 80 08 1a 6c 61 6e 67 75 61 67 65 5f 73 65 6c 65 63 74 69 6f 6e 5f 62 75 74 74 6f 6e b5 ff 03 a0 01 a6 08 18 bd 06 00 00 02 0a 00 00 00 00 00 00 02 01 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 8c 80 08 30 ae 06 18 24 00 00 40 2c 20 5c 01 05 53 69 6d 70 6c 69 66 69 65 64 20 43 68 69 6e 65 73 65 20 28 43 68 69 6e 61 29 5c 31 f2 c5 8b 07 01 00 13 20 84 40 00 24 08 00 00 00 00 00 80 00 04 80 0f 00 00 80 00 8c 80 08 71 5e 34 b8 8e 43 94 c5 24 24 1e 9e 07 00 00 00 00 40 05 06 f2 c5 8b 07 13 20 84 40 00 24 08 00 00 00 00 00 80 00 04 80 0f 00 00 80 00 8c 80 08 86 51 de 71 b6 e6 71 27 80 03 80 03 be 0d b0 09 00 00 00 00 40 04 02 13 20 84 40 00 24 08 00 00 00 00 00 80 00 04 80 0f 00 00 80 00 8c 80 08 8a fb af 35 8f 09 fd 7f bd 02 8a 12 b6 12 8b 02 00 00 00 00 40 04 02 02 20 84 40 00 24 08 00 00 00 00 00 00 02 03 80 0f 00 00 80 00 8c 80 08 41 41 0f 0c 0c 0c 0c 84 02 98 15 ab 17 24 00 00 02 0a 00 00 00 00 00 00 01 02 20 84 40 00 24 38 00 e0 51 00 00 00 00 04 a0 09 00 00 80 00 8c 80 08 07 42 75 74 74 6f 6e 04 59 65 73 0d e6 96 b0 e5 bb ba e5 b8 90 e6 88 b7 16 6c 61 6e 64 69 6e 67 5f 73 69 67 6e 75 70 5f 62 75 74 74 6f 6e b4 ff 03 03 84 02 98 15 00 00 02 0a 00 00 00 00 00 00 01 01 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 8c 80 08 38 a6 02 26 99 09 00 00 40 28 16 5c 01 14 5c 45 e6 96 b0 e5 bb ba e5 b8 90 e6 88 b7 5c 31 5c 41 01 00 02 20 84 40 00 24 38 00 e0 51 00 00 00 00 04 80 0f 00 00 80 00 8c 80 08 07 42 75 74 74 6f 6e 04 59 65 73 07 e7 99 bb e5 bd 95 13 6c 61 6e 64 69 6e 67 5f 6c 6f 67 69 6e 5f 6c 69 6e 6b b3 ff 03 84 02 98 15 87 1a 24 00 00 02 0a 00 00 00 00 00 00 01 01 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 8c 80 08 30 8a 01 2a 87 0a 00 00 40 28 10 5c 01 06 5c 44 e7 99 bb e5 bd 95 5c 31 5c 41 01 00 13 20 84 40 00 24 08 00 00 00 00 00 80 00 04 80 0f 00 00 80 00 8c 80 08 b1 36 fb 0e c1 c2 10 e8 a6 01 82 04 90 28 8f 09 00 00 00 00 40 04 02 02 20 84 40 00 24 08 00 00 04 00 00 02 00 04 00 0b 00 00 80 00 8c 80 08 8d db 02 8e db 02 a0 16 b8 2a 00 00 02 0a 00 00 00 00 01 01 00 00 02 20 84 40 00 24 08 01 00 00 00 00 00 00 04 00 09 00 00 80 00 8c 80 08 a0 16 00 00 02 0a 00 00 00 00 03 03 01 00 00 40 e2 23 fb 01 00 04 30 80 14 41 00 00 00 10 00 00 0b fd 1f 63 6f 6d 2e 69 6e 73 74 61 67 72 61 6d 2e 6c 6f 67 69 6e 2e 65 6e 74 72 79 70 6f 69 6e 74 c8 01 6c 69 74 65 6c 69 6e 6b 3a 2f 2f 73 63 72 65 65 6e 2f 31 36 2e 33 30 36 39 3f 24 5f 75 72 6c 24 3d 63 6f 6d 2e 69 6e 73 74 61 67 72 61 6d 2e 6c 6f 67 69 6e 2e 65 6e 74 72 79 70 6f 69 6e 74 26 24 5f 75 72 6c 5f 70 61 72 61 6d 73 5f 73 63 72 69 70 74 24 3d 6c 6f 63 61 6c 65 73 5f 73 75 67 67 65 73 74 69 6f 6e 73 2c 25 35 42 25 32 32 76 69 5f 56 4e 25 32 32 25 32 43 25 32 32 65 6e 5f 55 53 25 32 32 25 32 43 25 32 32 7a 68 5f 43 4e 25 32 32 25 35 44 2c 6c 61 6e 67 75 61 67 65 5f 73 65 6c 65 63 74 69 6f 6e 5f 73 68 6f 77 6e 2c 66 61 6c 73 65 2c 6f 61 75 74 68 61 62 6c 65 5f 65 6d 61 69 6c 73 2c 03 05 02 01 03 04 05 01 02 06 07 07 b8 ff 03 02 01 a3 01 06 07 07 17 16 15 04 13 14 03 b7 ff 03 b6 ff 03 03 14 13 00 00 16 00 63 88 01 00 02 10 03 00 45 02 00 09 00 00 00 00 00 01 00 0e 00 00 01 00 00 00 00 02 00 00 00 00 04 00 00 00 00 05 00 00 00 00 06 00 00 00 00 07 00 00 00 00 08 00 00 00 7f fe 02 00 09 00 00 00 00 00 01 00 0f 04 7f fd 0f 00 04 00 00 00 00 7f fc 02 00 09 00 00 00 00 00 01 00 10 04 7f fb 0f 00 04 7f fc 7f fd 7f fa 02 00 09 00 00 00 00 00 01 00 11 04 7f f9 8d 02 00 15 00 01 20 01 00 05 65 6e 5f 55 53 01 7f fd 7f fd 7f fb 7f fa 00 00 03 0f 00 04 7f fe 7f f9 7f f8 0c 00 00 7f f7 17 00 00 7f f6 18 00 00 7f f5 02 00 09 00 00 00 00 00 01 00 12 00 7f f4 02 00 09 00 00 00 00 00 01 00 13 00 7f f3 02 00 09 00 00 00 00 00 01 00 14 00 ")
data := client.TestScreen2Json()
utils.WriteFile("./1.json", []byte(data))
var diff string
diff = " 2a 00 3d 00 47 00 01 00 15 00 00 00 ff ff ff ff 83 01 20 82 40 00 24 08 01 00 00 00 00 02 00 14 f0 09 00 04 80 00 95 80 08 00 00 b5 d4 03 41 41 02 02 b8 2a a0 16 00 00 02 0a 00 00 00 00 00 00 01 00 01 04 00 02 00 00 03 20 84 40 00 24 08 00 00 04 00 00 02 00 04 80 0b 00 04 80 00 95 80 08 04 0b 86 0c a0 16 24 00 00 02 0a 00 00 00 00 00 00 0b 00 03 04 00 02 00 00 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 95 80 08 3f 90 02 27 ac 04 00 00 40 2c 0e 5c 32 e6 89 8b e6 9c ba e5 8f b7 5c 31 f2 c5 8b 07 01 00 00 01 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 a0 0b 00 00 80 00 95 80 08 05 03 a7 0b 27 00 00 00 00 00 04 04 00 02 00 00 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 95 80 08 3f a2 01 27 ac 04 00 00 40 2c 0b 5c 32 e9 82 ae e7 ae b1 5c 31 c0 80 80 10 01 00 00 01 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 a0 0b 00 00 80 00 95 80 08 04 03 b9 0a 27 00 00 00 00 00 05 01 00 06 01 00 07 01 00 08 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 95 80 08 30 98 15 24 24 00 00 40 2c 18 5c 01 05 e8 be 93 e5 85 a5 e4 bd a0 e7 9a 84 e9 82 ae e7 ae b1 5c 31 f2 c5 8b 07 01 00 00 09 02 03 20 84 40 00 24 08 01 20 50 00 00 02 00 04 80 0f 80 00 80 00 95 80 08 0c 65 6d 61 69 6c 5f 69 6e 70 75 74 9e ff 03 06 92 01 a6 13 1c 33 00 a1 ff 03 00 00 34 c0 80 80 10 05 00 00 08 00 10 08 d8 05 18 7b 81 7d 00 e4 7e 85 00 00 00 01 05 88 03 14 79 6f 75 72 65 6d 61 69 6c 40 65 6d 61 69 6c 2e 63 6f 6d 06 33 30 30 31 31 a1 80 04 0f 93 80 80 08 06 a1 ff 03 a2 ff 03 a0 ff 03 9f ff 03 10 92 01 02 01 01 02 62 5b 61 2d 7a 41 2d 5a 30 2d 39 5c 2b 5c 2e 5c 5f 5c 25 5c 2d 5c 2b 5d 7b 31 2c 32 35 36 7d 5c 40 5b 61 2d 7a 41 2d 5a 30 2d 39 5d 5b 61 2d 7a 41 2d 5a 30 2d 39 5c 2d 5d 7b 30 2c 36 34 7d 28 5c 2e 5b 61 2d 7a 41 2d 5a 30 2d 39 5d 5b 61 2d 7a 41 2d 5a 30 2d 39 5c 2d 5d 7b 30 2c 32 35 7d 29 2b 0b 01 00 09 01 00 0a 02 02 20 84 40 00 24 08 00 00 40 00 00 00 00 04 80 0f 00 04 80 00 95 80 08 9a ff 03 ac 01 a0 01 df 01 9c 14 00 00 02 0a 00 00 00 00 00 00 01 00 00 02 13 20 84 40 00 24 08 00 00 00 00 00 80 00 04 80 0f 00 00 80 00 95 80 08 26 cf bd 80 c0 02 f1 37 24 24 24 1e 00 00 00 00 40 05 06 c0 80 80 10 00 0a 02 0d 20 84 40 00 24 08 00 00 04 00 00 02 00 04 80 0f 00 04 80 00 95 80 08 06 10 ac 01 98 15 ef 01 24 00 00 02 0a 00 00 00 00 00 00 02 00 00 02 02 20 84 40 00 24 08 00 00 00 00 00 02 3e 03 80 09 00 04 80 00 95 80 08 11 ca a8 fb 0f 03 03 03 03 41 0f 0c 0c 0c 0c ac 01 9e 15 00 00 02 0a 00 00 00 00 00 00 00 00 00 02 02 20 84 40 00 24 08 00 00 00 00 00 02 3e 03 80 0b 00 04 80 00 95 80 08 12 f2 c5 8b 07 03 03 03 03 41 0f 0c 0c 0c 0c b2 01 9e 15 ec 01 00 00 02 0a 00 00 00 00 00 00 00 06 11 00 0a 02 0d 20 84 40 00 24 08 00 00 04 00 00 02 00 04 80 0f 00 04 80 00 95 80 08 07 13 84 02 98 15 36 24 00 00 02 0a 00 00 00 00 00 00 02 00 00 02 02 20 84 40 00 24 08 00 00 00 00 00 02 02 03 80 09 00 04 80 00 95 80 08 15 41 41 0f 0c 0c 0c 0c 84 02 98 15 00 00 02 0a 00 00 00 00 00 00 01 00 00 02 02 20 84 40 00 24 38 00 e0 51 00 00 00 00 04 a0 09 00 04 80 00 95 80 08 07 42 75 74 74 6f 6e 04 59 65 73 07 e7 bb a7 e7 bb ad 0c 6e 65 78 74 5f 62 75 74 74 6f 6e 9e ff 03 03 84 02 98 15 00 00 02 0a 00 00 00 00 00 00 01 00 00 02 01 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 95 80 08 38 96 01 26 81 0a 00 00 40 28 10 5c 01 14 5c 45 e7 bb a7 e7 bb ad 5c 31 5c 41 01 00 00 00 02 02 20 84 40 00 24 08 00 00 00 00 00 02 02 03 80 0b 00 04 80 00 95 80 08 14 41 41 0f 0c 0c 0c 0c 84 02 98 15 c4 02 00 00 02 0a 00 00 00 00 00 00 01 00 00 02 02 20 84 40 00 24 38 00 c0 01 00 00 00 00 04 a0 09 00 04 80 00 95 80 08 07 42 75 74 74 6f 6e 04 59 65 73 07 e7 bb a7 e7 bb ad 07 84 02 98 15 00 00 02 0a 00 00 00 00 00 00 01 00 00 02 01 20 84 40 00 24 08 00 00 00 00 00 00 00 04 80 0f 00 00 80 00 95 80 08 38 96 01 26 81 0a 00 00 40 28 10 5c 01 14 5c 45 e7 bb a7 e7 bb ad 5c 31 5c 41 01 00 06 14 00 02 03 20 84 40 00 24 08 00 00 00 00 00 00 00 04 a0 0b 00 00 80 00 95 80 08 06 03 a0 16 af 18 00 00 00 00 01 40 e2 23 fb 01 00 04 30 80 14 41 00 00 00 10 00 00 0b fd 1a 63 6f 6d 2e 69 67 63 61 72 62 6f 6e 2e 72 65 67 69 73 74 72 61 74 69 6f 6e 99 01 6c 69 74 65 6c 69 6e 6b 3a 2f 2f 73 63 72 65 65 6e 2f 31 36 2e 33 30 36 39 3f 24 5f 75 72 6c 24 3d 63 6f 6d 2e 69 67 63 61 72 62 6f 6e 2e 72 65 67 69 73 74 72 61 74 69 6f 6e 26 24 5f 75 72 6c 5f 70 61 72 61 6d 73 5f 73 63 72 69 70 74 24 3d 67 6f 6f 67 6c 65 5f 74 6f 6b 65 6e 73 2c 25 35 42 25 35 44 2c 72 65 67 69 73 74 72 61 74 69 6f 6e 5f 73 63 72 65 65 6e 5f 69 64 2c 31 30 30 30 37 2c 73 74 61 72 74 5f 77 69 74 68 5f 65 6d 61 69 6c 2c 46 61 6c 73 65 03 05 02 01 03 04 05 01 02 06 07 07 be ff 03 02 01 a3 01 06 07 07 17 16 15 04 13 14 03 bd ff 03 bc ff 03 03 14 13 01 00 26 00 09 00 1b 7f e2 76 00 08 00 10 00 11 00 00 00 00 00 1c 7f e1 76 00 08 00 10 00 12 00 00 00 00 00 1d 7f e0 76 00 08 00 13 00 14 00 00 00 00 00 1e 7f df 76 00 08 00 13 00 15 00 00 00 00 00 1f 7f de 02 00 09 00 00 00 00 00 01 00 1e 00 00 20 7f dd 02 00 09 00 00 00 00 00 01 00 1f 04 00 21 7f dc 7a 00 03 00 06 00 00 23 7f db 0f 00 04 7f dc 7f f0 00 24 7f da 0f 00 04 7f dd 7f db "
client.TestUpdateScreen(diff)
data = client.TestScreen2Json()
utils.WriteFile("./2.json", []byte(data))
diff = " 2a 00 44 00 53 00 01 00 20 00 00 00 00 00 00 03 84 01 00 01 00 01 04 00 01 00 01 03 20 84 40 00 24 08 00 00 04 00 00 02 00 04 a0 0b 00 04 80 00 a0 80 08 0b 07 02 8a 08 a0 16 24 00 00 02 0a 00 00 00 00 00 00 02 00 06 02 01 20 84 40 00 24 08 00 00 00 00 00 02 00 04 80 0f 00 00 80 00 a0 80 08 0e 30 98 15 12 24 00 00 40 2c 33 5c 01 05 e9 aa 8c e8 af 81 e7 a0 81 e6 97 a0 e6 95 88 e3 80 82 e4 bd a0 e9 87 8d e6 96 b0 e8 8e b7 e5 8f 96 e9 aa 8c e8 af 81 e7 a0 81 e3 80 82 5c 31 ea da 95 01 01 00 00 06 03 20 84 40 00 24 08 00 00 04 00 00 02 00 04 80 0f 00 04 80 00 a0 80 08 0a 0a 84 02 98 15 0c 24 00 00 02 0a 00 00 00 00 00 00 00 06 0b \"}\n"
client.TestUpdateScreen(diff)
data = client.TestScreen2Json()
utils.WriteFile("./3.json", []byte(data))
}