-
Notifications
You must be signed in to change notification settings - Fork 8
/
line.thrift
305 lines (259 loc) · 9.27 KB
/
line.thrift
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# key33 = (string) {u,r} + 32byte key. u for user, r for room
# msg_seq = (stringed integer) for unique message
# timestamp = (integer) unix timestamp * 100 for msec
# op_code = (integer) sequence that indicate user operation (perhaps calculated by summation of whole chat counts)
# most message string utf-8 encoded
#method name : loginWithIdentityCredentialForCertificate
#@ 0 # 0 - STRUCT
#@ 2 # 1 - STRING ( 88 ) = DsKeAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAA+a/AA+AAAAAAAAAAAAAAAAAAAAAAAAAA=
#@ 92 # 5 - I32 (1) = 2
#@ 94 # 0 - STOP
#at all flow init
#method name : loginWithVerifierForCertificate
#@ 0 # 0 - STRUCT
#@ 2 # 1 - STRING ( 88 ) = DsKeAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAA+a/AA+AAAAAAAAAAAAAAAAAAAAAAAAAA=
#@ 92 # 2 - STRING ( 64 ) = 5d7b7BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
#@ 158 # 5 - I32 (1) = 2
#@ 160 # 0 - STOP
#method name : loginWithIdentityCredentialForCertificate
#@ 0 # 0 - STRUCT
#@ 2 # 3 - STRING ( 32 ) = rHMIGCCCCCCCCCCCCCCCCCCCCCCCCCCC
#@ 36 # 4 - STRING ( 4 ) = 5210
#@ 42 # 5 - I32 (1) = 6
#@ 44 # 0 - STOP
#@ 0 # 1 - STRUCT
#@ 1 # 2 - I32 (1) = 36
#@ 3 # 3 - STRING ( 38 ) = Account ID and password does not match
#@ 43 # 0 - STOP
#method name : loginWithIdentityCredentialForCertificate
#@ 0 # 1 - STRUCT
#@ 1 # 2 - I32 (1) = 40
#@ 3 # 3 - STRING ( 14 ) = Internal error
#@ 19 # 0 - STOP
struct loginWithIdentityCredentialForCertificateResult {
1: string certificate, # real X-Line-Access key for communitation. DsKeAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAA+a/AA+AAAAAAAAAAAAAAAAAAAAAAAAAA=
2: string key64, #unknown. only offered when login with verifier for querying certificate at first stage. (need verifier)
3: string verifier, # aka. verifier. temp, rHMIGCCCCCCCCCCCCCCCCCCCCCCCCCCC
4: string auth_digit, # 5210
5: i32 code # 3(6): need auth? 1(2): correct login
}
struct getProfileResult {
1: string key33, # 33 byte key ( uac06..... )
3: string line_id, # line account
10: string basekey24, # 24 byte base64ed key
12: string region, # 2 byte code for country. KR for korea
20: string name, # name in line profile
21: string today_message, #not sure. today message seems to
22: string msg_seq,
24: string comment, #thanks to Casey Hall
31: bool flag1, #??
32: bool flag2, #??
33: string profile_url #39 byte (maybe dynamic) url for profile image - gd2.line.naver.jp/[[profile_url]]
}
#@ 3 # 8 - STRING ( 33 ) = ua5...
#@ 38 # 9 - I64 (1) = 1349...
#@ 45 # 17 - I32 (1) = 0
#@ 47 # 18 - I32 (1) = 2
#@ 49 # 28 - I32 (1) = 2
#@ 51 # 29 - STRING ( 9 ) = name
#@ 62 # 31 - STRING ( 13 ) = 1349...
#@ 77 # 33 - STRING (0)
#@ 79 # 35 - I64 (1) = 0
#@ 81 # 38 - BOOL bool - false
#@ 82 # 39 - BOOL bool - false
#@ 83 # 40 - BOOL bool - false
#@ 84 # 41 - BOOL bool - false
#@ 85 # 42 - I32 (1) = 0
#@ 87 # 43 - I64 (1) = 0
#@ 89 # 44 - STRING ( 39 ) = /os/p/ua5...
struct contact {
1: string key33, # 33 byte key (uac06...)
2: i64 timecode2, # not sure (1349...)
10: i32 flag1, # 0, 3, 4
11: i32 flag2, #??
21: i32 flag3, #??
22: string name, #name in line profile
24: string timecode, # not sure but little diff. is it last update?
26: string today_message, # today message
28: i64 flag4, #??
31: bool flag5,
32: bool flag6,
33: bool flag7,
34: bool flag8,
35: i32 flag9,
36: i64 flag10,
37: string profile_url
}
#@ 5 # 5 - STRING ( 33 ) = r49...
#@ 40 # 9 - I64 (1) = 0
#@ 42 # 10 - I64 (1) = 0
#@ 44 # 11 - I64 (1) = 1365...
#@ 51 # 12 - I32 (1) = 0
#@ 53 # 13 - I32 (1) = 2
#@ 55 # 14 - LIST
#@ 56 # 15 - STRUCT
#@ 57 # 16 - STRING ( 33 ) = uac...
#@ 92 # 17 - STRING ( 33 ) = r49...
#@ 127 # 18 - I32 (1) = 2
#@ 129 # 19 - STRING ( 12 ) = 278...
#@ 143 # 20 - I64 (1) = 1365...
#@ 150 # 21 - I64 (1) = 0
#@ 152 # 25 - STRING ( 130 ) = msg
#@ 285 # 29 - BOOL bool - false
#@ 286 # 30 - I32 (1) = 0
#@ 288 # 33 - MAP
struct unknown_struct2 {
1: string key33, # room title or room master
2: string key33_2, # me. so it seems list for joined member
3: i32 var1, #0x02
4: string stamp12, #278....
5: i64 stamp_2, #1365...
6: i64 var2, #0x00
7: string msg, #what message i send(?)
11: bool flag1, #??
12: i32 var3, #0x00
15: map<string, string> seq, #seq, 4013
}
struct unknown_struct3 {
1: string key33,
2: i64 var1,
5: bool flag1,
6: bool flag2,
7: bool flag3,
8: bool flag4,
9: i32 var2,
10: i64 var3
}
struct msgbox_item_str {
1: string room_key33, #if 1:1 user chat room, it takes user_key33, else it takes room_key33
5: i64 var1, #0
6: i64 unread_count, #0x06 = 3? - unread msg count(?)
7: i64 var3, #1365...
8: i32 var4, #0x00
9: i32 msgbox_type, # 0 for user, 1 for room (group)
10: list<unknown_struct2> key33s, #??
11: string var6, #null
12: list<unknown_struct3> unknown_list4 #four structure in here
}
struct msgbox_str {
1: msgbox_item_str msgbox_item,
}
struct unknown_struct_back {
1: string key33, #r49...
5: i64 var1, #0
6: i64 var2, #0
7: i64 var3, #1365...
8: i32 var4, #0x00
9: i32 var5, #0x02
10: list<unknown_struct2> key33s, #??
11: string var6, #null
12: list<unknown_struct3> unknown_list4 #four structure in here
}
struct getMessageBoxCompactWrapUpListResult {
1: list<msgbox_str> msgbox_list #it has two items in list
}
struct sendMessageResult {
1: string user_key33,
4: string stamp_12,
5: i64 var1,
6: i64 code, #0x00
14: bool flag1, #false
15: i32 code2
}
struct getNextMessagesResult {
1: list<string> user_key33s,
2: string room_key33,
3: i32 var1,
4: string msg_seq,
5: i64 timestamp,
6: i64 code, #0x00
10: string msg,
14: bool flag1,
15: i32 var2,
18: map<string, string> seq
}
struct send_msg_str {
1: string my_key33,
2: string room_key33,
10: string msg,
15: i32 code
}
struct getRoomResult {
1: string room_key33,
2: i64 var1,
10: list<contact> room_member
}
struct msg_str {
1: string user_key33,
2: string room_key33,
3: i32 param1,
4: string msg_seq, # unique msg sequence - it needs for original image download in https://os.line.naver.jp/os/m/{msg_seq}
5: i64 timestamp, # unixtime * 100 for microsecond
6: i64 param3,
10: string message,
14: bool flag1,
15: i32 flag_file,
17: string file_content,
18: map<string, string> seq
}
# fetch_type
## 25 for sent msg (to server)
## 26 for msg receive (next struct's i32=0 for text msg, 14 for sticker)
## 28 for your msg is read (maybe)
## 40 for other writing (maybe)
struct fetch_struct {
1: i64 op_code,
2: i64 timestamp,
3: i32 fetch_type,
4: i32 var4,
10: string user_key33,
11: string msg_seq,
20: msg_str msg_item,
}
service Line {
#string loginWithIdentityCredentialForCertificate(1:3:string cr1, 4:string cr2, 5:bool flag1, 6:string ip, 7:string comname, 8: i32 val1 9:string cr5)
#method name : loginWithIdentityCredentialForCertificate
#@ 0 # 3 - STRING ( 9 ) = 100007673
#@ 11 # 4 - STRING ( 202 ) = 1dcAAA202AAADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
#@ 216 # 5 - BOOL bool - false
#@ 217 # 6 - STRING ( 13 ) = 172.20.100.30
#@ 232 # 7 - STRING ( 8 ) = comnames
#@ 242 # 8 - I32 (1) = 4
#@ 244 # 9 - STRING ( 64 ) = 5d7b7BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
#@ 310 # 0 - STOP
#@ 0 # 3 - STRING ( 9 ) = 100007672
#@ 11 # 4 - STRING ( 202 ) = 1dcAAA202AAADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
#@ 216 # 5 - BOOL bool - false
#@ 217 # 6 - STRING ( 11 ) = 172.20.10.3
#@ 230 # 7 - STRING ( 8 ) = comnames
#@ 240 # 8 - I32 (1) = 4 //
#@ 242 # 9 - STRING (0)
loginWithIdentityCredentialForCertificateResult loginWithIdentityCredentialForCertificate
(1:string str1,
2:string str2,
3:string rsakey1,
4:string rsacipher,
5:bool b5,
6:string ip,
7:string comname, # not sure, is it type of login method? (2 or normal, others for qr or else?? )
8:i32 i8,
9:string str9)
# loginWithIdentityCredentialForCertificateResult loginWithIdentityCredentialForCertificate(1:string cr1, 2:string cr2, 3:bool flag1, 4:string ip, 5:string comname, 6: i32 val1 7:string cr5)
#method name : loginWithVerifierForCertificate
#@ 0 # 3 - STRING ( 32 ) = rHMIGCCCCCCCCCCCCCCCCCCCCCCCCCCC
#@ 34 # 0 - STOP
loginWithIdentityCredentialForCertificateResult loginWithVerifierForCertificate(3: string verifier)
getProfileResult getProfile()
i64 getServerTime()
i64 getLastOpRevision()
list<string> getAllContactIds()
list<contact> getContacts(2: list<string> contact_ids)
getMessageBoxCompactWrapUpListResult getMessageBoxCompactWrapUpList(2:i32 param1, 3:i32 param2)
sendMessageResult sendMessage(1: i32 var1, 2: send_msg_str msgs)
# sendMessageResult sendMessage(1: i32 var1, 2: string my_key33, 3: string room_key33, 11: string msg, 16: i32 code)
getNextMessagesResult getNextMessages(2: string room_key33, 3: i64 timecode)
list<fetch_struct> fetchOperations(2:i64 last_op_code, 3: i32 polling_timeout)
void sendChatChecked(1: i32 param1, 2: string room_key33, 3: string timecode)
getRoomResult getRoom(2: string room_key33)
list<msg_str> getRecentMessages(2:string room_key33, 3:i32 param1)
}