NapCatQQ source snapshot
This commit is contained in:
commit
f954252a34
1111 files changed
+139867
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import * as proto from '@/napcat-core/packet/transformer/proto';
|
||||
import { NapProtoMsg } from 'napcat-protobuf';
|
||||
import { OidbPacket, PacketTransformer } from '@/napcat-core/packet/transformer/base';
|
||||
import OidbBase from '@/napcat-core/packet/transformer/oidb/oidbBase';
|
||||
|
||||
class FetchRkey extends PacketTransformer<typeof proto.OidbSvcTrpcTcp0X9067_202_Rsp_Body> {
|
||||
build (): OidbPacket {
|
||||
const data = new NapProtoMsg(proto.OidbSvcTrpcTcp0X9067_202).encode({
|
||||
reqHead: {
|
||||
common: {
|
||||
requestId: 1,
|
||||
command: 202,
|
||||
},
|
||||
scene: {
|
||||
requestType: 2,
|
||||
businessType: 1,
|
||||
sceneType: 0,
|
||||
},
|
||||
client: {
|
||||
agentType: 2,
|
||||
},
|
||||
},
|
||||
downloadRKeyReq: {
|
||||
key: [10, 20, 2],
|
||||
},
|
||||
});
|
||||
return OidbBase.build(0x9067, 202, data);
|
||||
}
|
||||
|
||||
parse (data: Buffer) {
|
||||
const oidbBody = OidbBase.parse(data).body;
|
||||
return new NapProtoMsg(proto.OidbSvcTrpcTcp0X9067_202_Rsp_Body).decode(oidbBody);
|
||||
}
|
||||
}
|
||||
|
||||
export default new FetchRkey();
|
||||
@@ -0,0 +1 @@
|
||||
export { default as FetchRkey } from './FetchRkey';
|
||||
Reference in new issue
Block a user