-
Notifications
You must be signed in to change notification settings - Fork 39
/
analyze.js
17 lines (13 loc) · 5.08 KB
/
analyze.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const bufferStr = "52,9,33,8,1,86,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,32,53,49,53,98,54,56,99,99,51,52,48,100,54,54,53,53,48,54,56,48,48,51,55,99,56,54,55,55,97,98,98,57,56,175,78,66,9,53,50,51,53,52,56,53,51,50,11,0,32,185,242,154,161,131,44,50,2,116,98,119,0,123,10,32,32,34,110,105,99,107,34,32,58,32,34,116,98,57,50,51,57,50,56,49,34,44,10,32,32,34,117,115,101,114,105,100,34,32,58,32,34,53,50,51,53,52,56,53,51,50,34,44,10,32,32,34,105,100,101,110,116,105,102,121,34,32,58,32,123,10,32,32,32,32,34,65,80,65,83,83,95,85,83,69,82,34,32,58,32,34,48,34,44,10,32,32,32,32,34,86,73,80,95,85,83,69,82,34,32,58,32,34,48,34,10,32,32,125,10,125,48,9,33,8,1,87,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,32,101,100,51,49,97,51,50,48,55,55,100,49,99,49,52,49,57,98,100,57,54,98,100,57,51,55,100,53,98,54,54,51,56,175,78,66,10,49,54,52,56,56,54,50,50,55,56,24,0,18,11,229,130,133,232,138,141,233,156,150,57,56,32,172,236,154,161,131,44,50,2,116,98,89,0,123,34,105,100,101,110,116,105,102,121,34,58,123,34,65,80,65,83,83,95,85,83,69,82,34,58,34,48,34,44,34,86,73,80,95,85,83,69,82,34,58,34,48,34,125,44,34,110,105,99,107,34,58,34,229,130,133,232,138,141,233,156,150,57,56,34,44,34,117,115,101,114,105,100,34,58,34,49,54,52,56,56,54,50,50,55,56,34,125,52,9,33,8,1,87,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,32,101,49,102,49,101,48,53,100,99,101,100,97,54,51,51,99,99,48,98,57,54,55,49,52,52,53,54,48,97,56,52,49,56,175,78,66,10,50,49,57,49,53,57,48,50,51,53,11,0,32,202,236,154,161,131,44,50,2,116,98,123,0,123,10,32,32,34,110,105,99,107,34,32,58,32,34,49,51,50,95,55,49,51,54,95,119,98,98,34,44,10,32,32,34,117,115,101,114,105,100,34,32,58,32,34,50,49,57,49,53,57,48,50,51,53,34,44,10,32,32,34,105,100,101,110,116,105,102,121,34,32,58,32,123,10,32,32,32,32,34,65,80,65,83,83,95,85,83,69,82,34,32,58,32,34,48,34,44,10,32,32,32,32,34,86,73,80,95,85,83,69,82,34,32,58,32,34,48,34,10,32,32,125,10,125,48,9,33,8,1,61,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,16,48,78,81,53,73,105,100,48,100,104,75,99,117,106,78,106,56,102,66,1,48,11,0,32,143,234,154,161,131,44,50,2,116,98,12,0,10,10,10,3,100,105,103,16,203,185,193,13,48,9,33,8,1,87,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,32,97,99,101,54,48,97,49,50,102,99,48,98,99,98,52,53,48,101,55,101,100,101,57,53,54,101,97,56,49,100,49,102,56,175,78,66,10,50,51,48,51,52,53,55,51,52,52,33,0,18,20,229,183,166,228,185,176,228,184,156,232,165,191,230,150,185,228,190,191,49,50,32,189,241,154,161,131,44,50,2,116,98,98,0,123,34,105,100,101,110,116,105,102,121,34,58,123,34,65,80,65,83,83,95,85,83,69,82,34,58,34,48,34,44,34,86,73,80,95,85,83,69,82,34,58,34,48,34,125,44,34,110,105,99,107,34,58,34,229,183,166,228,185,176,228,184,156,232,165,191,230,150,185,228,190,191,49,50,34,44,34,117,115,101,114,105,100,34,58,34,50,51,48,51,52,53,55,51,52,52,34,125,48,9,33,8,1,86,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,32,54,55,52,101,97,99,48,52,49,97,98,102,52,51,49,56,52,101,100,100,49,57,51,97,56,51,53,50,51,97,97,101,56,175,78,66,9,55,51,57,51,50,48,57,53,48,27,0,18,14,116,98,52,54,52,54,53,53,50,95,50,48,49,49,32,217,242,154,161,131,44,50,2,116,98,91,0,123,34,105,100,101,110,116,105,102,121,34,58,123,34,65,80,65,83,83,95,85,83,69,82,34,58,34,48,34,44,34,86,73,80,95,85,83,69,82,34,58,34,48,34,125,44,34,110,105,99,107,34,58,34,116,98,52,54,52,54,53,53,50,95,50,48,49,49,34,44,34,117,115,101,114,105,100,34,58,34,55,51,57,51,50,48,57,53,48,34,125,48,9,33,8,1,70,0,10,36,52,57,53,98,99,51,49,52,45,99,102,100,51,45,52,53,53,57,45,57,49,52,56,45,50,53,54,52,101,55,51,57,51,49,101,100,50,16,48,78,81,53,73,78,110,48,100,104,72,109,97,106,111,68,56,101,66,10,49,54,56,53,49,51,52,55,57,48,22,0,18,9,107,109,110,229,168,156,229,168,156,32,157,249,154,161,131,44,50,2,116,98,126,0,10,30,230,183,152,229,174,157,230,128,142,228,185,136,229,143,175,232,131,189,232,174,169,229,135,186,229,142,159,230,160,135,18,20,10,12,114,101,110,100,101,114,95,97,117,100,105,116,18,4,116,114,117,101,18,13,10,8,86,73,80,95,85,83,69,82,18,1,48,18,22,10,14,109,115,103,95,115,111,117,114,99,101,95,107,101,121,18,4,109,116,111,112,18,14,10,7,116,97,111,113,105,104,105,18,3,55,51,50,18,15,10,10,65,80,65,83,83,95,85,83,69,82,18,1,48"
const bufferArr = bufferStr.split(',')
// const str = new Buffer(bufferArr).toString()
// console.log(str)
const nick = 'kmn娜娜'
const barrage = '淘宝怎么可能让出原标'
console.log(new Buffer(nick).join(','))
console.log(new Buffer(barrage).join(','))
const matched = bufferStr.match(/.*,[0-9]+,0,18,[0-9]+,(.*?),32,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,44,50,2,116,98,[0-9]+,0,10,[0-9]+,(.*?),18,20,10,12/)
if (matched) {
console.log(new Buffer(matched[1].split(',')).toString())
console.log(new Buffer(matched[2].split(',')).toString())
}