From f4f1f11b580069287d69c359fe7a37ec2d858277 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Wed, 8 Jul 2020 03:35:43 +0800 Subject: [PATCH] client.go add: NewClientMd5 --- client/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index f149c9db..1d65ab65 100644 --- a/client/client.go +++ b/client/client.go @@ -79,9 +79,13 @@ func init() { // NewClient create new qq client func NewClient(uin int64, password string) *QQClient { + return NewClientMd5(uin, md5.Sum([]byte(password))) +} + +func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient { cli := &QQClient{ Uin: uin, - PasswordMd5: md5.Sum([]byte(password)), + PasswordMd5: passwordMd5, SequenceId: 0x3635, RandomKey: make([]byte, 16), OutGoingPacketSessionId: []byte{0x02, 0xB0, 0x5B, 0x8B},