mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: oidb_0x9067_202
This commit is contained in:
parent
dc168bf8b9
commit
7a46f11089
@ -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;
|
||||
}
|
||||
}
|
8
src/core/proto/oidb/Oidb.0x9067_202.ts
Normal file
8
src/core/proto/oidb/Oidb.0x9067_202.ts
Normal 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),
|
||||
}
|
@ -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),
|
||||
|
@ -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),
|
||||
|
84
src/core/proto/oidb/common/Ntv2.RichMedia.ts
Normal file
84
src/core/proto/oidb/common/Ntv2.RichMedia.ts
Normal 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 = {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user