-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathsimple.js
More file actions
40 lines (34 loc) · 1.03 KB
/
simple.js
File metadata and controls
40 lines (34 loc) · 1.03 KB
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
const thrift = require('thrift-http');
const LineService = require('LineService');
var _client = '';
var gid = '';
var uids = [];
var token = '';
process.argv.forEach(function (val) {
if(val.includes('gid=')){
gid = val.split('gid=').pop();
}else if(val.includes('uid=')){
uids.push(val.split('uid=').pop());
}else if(val.includes('token=')){
token = val.split('token=').pop();
}
});
function setTHttpClient(options) {
var connection =
thrift.createHttpConnection('legy-jp.line.naver.jp', 443, options);
connection.on('error', (err) => {
console.log('err',err);
return err;
});
_client = thrift.createHttpClient(LineService, connection);
}
setTHttpClient(options={
protocol: thrift.TCompactProtocol,
transport: thrift.TBufferedTransport,
headers: {'User-Agent':'Line/8.9.0','X-Line-Application':"IOSIPAD\t11.2.5\tiPhone X\t11.2.5",'X-Line-Access':token},
path: '/S4',
https: true
});
for (var i=0; i < uids.length; i++) {
_client.kickoutFromGroup(0, gid, [uids[i]]);
}