feat: oidb_0x9067_202

This commit is contained in:
手瓜一十雪 2024-10-12 23:09:33 +08:00
parent dc168bf8b9
commit 7a46f11089
5 changed files with 122 additions and 0 deletions

View File

@ -3,6 +3,9 @@ import { RequestUtil } from '@/common/request';
import offset from '@/core/external/offset.json';
import * as crypto from 'crypto';
import { PacketClient } from '../helper/packet';
import { NapProtoMsg } from '../proto/NapProto';
import { OidbSvcTrpcTcp0X9067_202 } from '../proto/oidb/Oidb.0x9067_202';
import { OidbSvcTrpcTcpBase } from '../proto/oidb/OidbBase';
interface OffsetType {
[key: string]: {
@ -65,4 +68,29 @@ export class NTQQPacketApi {
}).then((res) => resolve(res)).catch((e) => reject(e));
});
}
async sendRkeyPacket() {
let oidb_0x9067_202 = new NapProtoMsg(OidbSvcTrpcTcp0X9067_202).encode({
reqHead: {
common: {
requestId: 1,
command: 2
},
scene: {
requestType: 2,
businessType: 1,
sceneType: 0
},
clent: {
agentType: 2
}
},
downloadRKeyReq: Buffer.from('080a08140802', 'hex'),
});
let oidb_packet = new NapProtoMsg(OidbSvcTrpcTcpBase).encode({
command: 0x9067,
subCommand: 202,
body: oidb_0x9067_202
});
return oidb_0x9067_202;
}
}

View File

@ -0,0 +1,8 @@
import { ScalarType } from "@protobuf-ts/runtime";
import { ProtoField } from "../NapProto";
import { MultiMediaReqHead } from "./common/Ntv2.RichMedia";
export const OidbSvcTrpcTcp0X9067_202 = {
ReqHead: ProtoField(1, () => MultiMediaReqHead),
DownloadRKeyReq: ProtoField(4, ScalarType.BYTES),
}

View File

@ -1,6 +1,7 @@
import { ScalarType } from "@protobuf-ts/runtime";
import { ProtoField } from "../NapProto";
// Send Poke
export const OidbSvcTrpcTcp0XED3_1 = {
uin: ProtoField(1, ScalarType.UINT32),
groupUin: ProtoField(2, ScalarType.UINT32, false, true),

View File

@ -1,6 +1,7 @@
import { ScalarType } from "@protobuf-ts/runtime";
import { ProtoField } from "../NapProto";
export const OidbSvcTrpcTcp0XEE1_2 = {
uin: ProtoField(1, ScalarType.UINT32),
key: ProtoField(3, ScalarType.BYTES, false, true),

View File

@ -0,0 +1,84 @@
import { ScalarType } from "@protobuf-ts/runtime";
import { ProtoField } from "../../NapProto";
export const NTV2RichMediaReq = {
ReqHead: ProtoField(1, ScalarType.BYTES),
DownloadRKeyReq: ProtoField(4, ScalarType.BYTES),
}
export const MultiMediaReqHead = {
Common: ProtoField(1, () => CommonHead),
Scene: ProtoField(2, () => SceneInfo),
Clent: ProtoField(3, () => ClientMeta),
}
export const CommonHead = {
RequestId: ProtoField(1, ScalarType.UINT32),
Command: ProtoField(2, ScalarType.UINT32),
}
export const SceneInfo = {
RequestType: ProtoField(101, ScalarType.UINT32),
BusinessType: ProtoField(102, ScalarType.UINT32),
SceneType: ProtoField(200, ScalarType.UINT32),
}
export const C2CUserInfo = {
AccountType: ProtoField(1, ScalarType.UINT32),
TargetUid: ProtoField(2, ScalarType.STRING),
}
export const GroupInfo = {
GroupUin: ProtoField(1, ScalarType.UINT32),
}
export const ClientMeta = {
AgentType: ProtoField(1, ScalarType.UINT32),
}
export const DownloadReq = {
Node: ProtoField(1, ScalarType.BYTES),
Download: ProtoField(2, ScalarType.BYTES),
}
export const FileInfo = {
FileSize: ProtoField(1, ScalarType.UINT32),
FileHash: ProtoField(2, ScalarType.STRING),
FileSha1: ProtoField(3, ScalarType.STRING),
FileName: ProtoField(4, ScalarType.STRING),
Type: ProtoField(5, ScalarType.BYTES),
Width: ProtoField(6, ScalarType.UINT32),
Height: ProtoField(7, ScalarType.UINT32),
Time: ProtoField(8, ScalarType.UINT32),
Original: ProtoField(9, ScalarType.UINT32),
}
export const IndexNode = {
Info: ProtoField(1, ScalarType.BYTES),
FileUuid: ProtoField(2, ScalarType.STRING),
StoreId: ProtoField(3, ScalarType.UINT32),
UploadTime: ProtoField(4, ScalarType.UINT32),
Ttl: ProtoField(5, ScalarType.UINT32),
subType: ProtoField(6, ScalarType.UINT32),
}
export const FileType = {
Type: ProtoField(1, ScalarType.UINT32),
PicFormat: ProtoField(2, ScalarType.UINT32),
VideoFormat: ProtoField(3, ScalarType.UINT32),
VoiceFormat: ProtoField(4, ScalarType.UINT32),
}
export const DownloadExt = {
Pic: ProtoField(1, ScalarType.BYTES),
Video: ProtoField(2, ScalarType.BYTES),
Ptt: ProtoField(3, ScalarType.BYTES),
}
export const VideoDownloadExt = {
BusiType: ProtoField(1, ScalarType.UINT32),
SceneType: ProtoField(2, ScalarType.UINT32),
SubBusiType: ProtoField(3, ScalarType.UINT32),
}
export const PicDownloadExt = {}
export const PttDownloadExt = {}
export const PicUrlExtInfo = {
OriginalParameter: ProtoField(1, ScalarType.STRING),
BigParameter: ProtoField(2, ScalarType.STRING),
ThumbParameter: ProtoField(3, ScalarType.STRING),
}
export const VideoExtInfo = {
VideoCodecFormat: ProtoField(1, ScalarType.UINT32),
}
export const MsgInfo = {
}