Revert "fix"

This reverts commit 9334caf50d.
This commit is contained in:
手瓜一十雪
2024-10-13 17:09:23 +08:00
parent 9334caf50d
commit a06dd11c60
3 changed files with 11 additions and 33 deletions

View File

@@ -46,19 +46,8 @@ export class NTQQPacketApi {
await this.PacketClient.connect();
await this.PacketClient.init(process.pid, table.recv, table.send);
this.isInit = true;
this.InitOtherServer()
return this.isInit;
}
async InitOtherServer() {
this.core.apis.FileApi.rkeyManager.regOutputRkey(
async () => {
let rkeylist = await this.core.apis.PacketApi.sendRkeyPacket();
if (rkeylist.length > 0) {
return rkeylist;
}
return undefined;
});
}
randText(len: number) {
let text = '';
let possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
@@ -85,8 +74,8 @@ export class NTQQPacketApi {
async sendRkeyPacket() {
let u8 = await this.core.apis.PacketApi.buildRkeyPacket()
let ret = await this.core.apis.PacketApi.sendPacket('OidbSvcTrpcTcp.0x9067_202', Buffer.from(u8).toString('hex'), true);
if (!ret?.hex_data) return []
let body = new NapProtoMsg(OidbSvcTrpcTcpBaseRsp).decode(Buffer.from(ret.hex_data, 'hex')).body;
if(!ret?.hex_data) return []
let body = new NapProtoMsg(OidbSvcTrpcTcpBaseRsp).decode(Buffer.from(ret.hex_data,'hex')).body;
//console.log('ret: ', Buffer.from(body).toString('hex'));
let retdata = new NapProtoMsg(OidbSvcTrpcTcp0X9067_202_Rsp_Body).decode(body)
//console.log('ret: ', JSON.stringify(retdata.data.rkeyList));