Skip to content

Commit

Permalink
Merge pull request #46 from LagrangeDev/optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn authored May 12, 2024
2 parents 16e6f77 + d909db1 commit ad4a85e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/packets/tlv/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ func T100(ssoVersion, appID, subAppID, appClientVersion, sigmap, dbBufVer int) [
// T106 抄的时候注意参数顺序
func T106(appId, appClientVersion, uin int, guid string, passwordMd5, tgtgtKey, ip []byte, savePassword bool) []byte {
// password_md5 + bytes(4) + write_u32(uin).pack()
key := crypto.MD5Digest(append(passwordMd5, append(make([]byte, 4),
binary.NewBuilder(nil).WriteU32(uint32(uin)).ToBytes()...)...))
key := crypto.MD5Digest(binary.NewBuilder(nil).
WriteBytes(passwordMd5).
WriteU32(0).
WriteU32(uint32(uin)).
ToBytes(),
)

body := binary.NewBuilder(nil).
WriteStruct(uint16(4), // tgtgt version
Expand Down

0 comments on commit ad4a85e

Please sign in to comment.