first commit
This commit is contained in:
@@ -0,0 +1,522 @@
|
||||
package baseinfo
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"xiawan/wx/clientsdk/android"
|
||||
"xiawan/wx/clientsdk/baseutils"
|
||||
"xiawan/wx/protobuf/wechat"
|
||||
)
|
||||
|
||||
type AndroidDeviceInfo struct {
|
||||
DeviceId []byte
|
||||
DeviceIdStr string
|
||||
DeviceToken *wechat.TrustResp
|
||||
Imei string
|
||||
AndriodId string
|
||||
PhoneSerial string
|
||||
WidevineDeviceID string
|
||||
WidevineProvisionID string
|
||||
AndriodFsId string
|
||||
AndriodBssId string
|
||||
AndriodSsId string
|
||||
WLanAddress string
|
||||
PackageSign string
|
||||
Androidversion string
|
||||
RadioVersion string
|
||||
Manufacturer string
|
||||
BuildID string
|
||||
BuildFP string
|
||||
BuildBoard string
|
||||
PhoneModel string
|
||||
Hardware string
|
||||
Features string
|
||||
WifiName string
|
||||
WifiFullName string
|
||||
KernelReleaseNumber string
|
||||
Arch string
|
||||
SfMD5 string
|
||||
SfArmMD5 string
|
||||
SfArm64MD5 string
|
||||
SbMD5 string
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodImei(DeviceId string) string {
|
||||
if Info.Imei != "" && Info.Imei != "string" {
|
||||
return Info.Imei
|
||||
}
|
||||
Md5Data := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000000"))))
|
||||
return "35" + Md5Data[0:13]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodID(DeviceId string) string {
|
||||
if Info.AndriodId != "" && Info.AndriodId != "string" {
|
||||
return Info.AndriodId
|
||||
}
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM1000001")
|
||||
return "06" + Md5Data[0:14]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodPhoneSerial(DeviceId string) string {
|
||||
if Info.PhoneSerial != "" && Info.PhoneSerial != "string" {
|
||||
return Info.PhoneSerial
|
||||
}
|
||||
//return "01c5cded725f4db6"
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM1000002")
|
||||
return "01" + Md5Data[0:14]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodWidevineDeviceID(DeviceId string) string {
|
||||
if Info.WidevineDeviceID != "" && Info.WidevineDeviceID != "string" {
|
||||
return Info.WidevineDeviceID
|
||||
}
|
||||
Md5DataA := baseutils.MD5ToLower(DeviceId + "SM1000003")
|
||||
Md5DataB := baseutils.MD5ToLower(DeviceId + "SM1000004")
|
||||
return "657" + Md5DataA[0:29] + Md5DataB
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodWidevineProvisionID(DeviceId string) string {
|
||||
if Info.WidevineProvisionID != "" && Info.WidevineProvisionID != "string" {
|
||||
return Info.WidevineProvisionID
|
||||
}
|
||||
Md5DataA := baseutils.MD5ToLower(DeviceId + "SM1000005")
|
||||
return "955" + Md5DataA[0:29]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodFSID(DeviceId string) string {
|
||||
if Info.AndriodFsId != "" && Info.AndriodFsId != "string" {
|
||||
return Info.AndriodFsId
|
||||
}
|
||||
Md5DataA := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000012"))))
|
||||
Md5DataB := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000006"))))
|
||||
return "37063" + Md5DataA[0:2] + "|37063" + Md5DataA[2:4] + "@" + Md5DataA[4:19] + "|" + baseutils.MD5ToLower(DeviceId+"SM1000007") + "@" + Md5DataB[0:16] + baseutils.MD5ToLower(DeviceId+"SM1000008")
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodBssid(DeviceId string) string {
|
||||
if Info.AndriodBssId != "" && Info.AndriodBssId != "string" {
|
||||
return Info.AndriodBssId
|
||||
}
|
||||
//return "02:00:00:00:00:00"
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM1000009")
|
||||
A := Md5Data[5:7] + ":"
|
||||
B := Md5Data[7:9] + ":"
|
||||
C := Md5Data[9:11] + ":"
|
||||
D := Md5Data[11:13] + ":"
|
||||
E := Md5Data[13:15] + ":"
|
||||
F := Md5Data[15:17]
|
||||
return A + B + C + D + E + F
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodSsid(DeviceId string) string {
|
||||
if Info.AndriodSsId != "" && Info.AndriodSsId != "string" {
|
||||
return Info.AndriodSsId
|
||||
}
|
||||
//return "02:00:00:00:00:00"
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM10000026")
|
||||
A := Md5Data[5:7] + ":"
|
||||
B := Md5Data[7:9] + ":"
|
||||
C := Md5Data[9:11] + ":"
|
||||
D := Md5Data[11:13] + ":"
|
||||
E := Md5Data[13:15] + ":"
|
||||
F := Md5Data[15:17]
|
||||
return A + B + C + D + E + F
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodWLanAddress(DeviceId string) string {
|
||||
if Info.WLanAddress != "" && Info.WLanAddress != "string" {
|
||||
return Info.WLanAddress
|
||||
}
|
||||
//return "00:a0:07:86:17:18"
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM1000009")
|
||||
B := Md5Data[7:9] + ":"
|
||||
C := Md5Data[9:11] + ":"
|
||||
D := Md5Data[11:13] + ":"
|
||||
E := Md5Data[13:15] + ":"
|
||||
F := Md5Data[15:17]
|
||||
return "00:" + B + C + D + E + F
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodPackageSign(DeviceId string) string {
|
||||
if Info.PackageSign != "" && Info.PackageSign != "string" {
|
||||
return Info.PackageSign
|
||||
}
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "SM1000010")
|
||||
return "18" + Md5Data[0:30]
|
||||
//return "18c867f0717aa67b2ab7347505ba07ed"
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidVersion() string {
|
||||
if Info.Androidversion != "" && Info.Androidversion != "string" {
|
||||
return Info.Androidversion
|
||||
}
|
||||
return "8.1.0"
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidRadioVersion(DeviceId string) string {
|
||||
if Info.RadioVersion != "" && Info.RadioVersion != "string" {
|
||||
return Info.RadioVersion
|
||||
}
|
||||
//return "M8994F-2.6.42.5.03"
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000013"))))
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000014")+baseutils.MD5ToLower(DeviceId+"SM2000014")+baseutils.MD5ToLower(DeviceId+"SM3000014"), -1))
|
||||
L := fmt.Sprintf("%v", M[:1])
|
||||
K := fmt.Sprintf("%v", M[:2])
|
||||
T := fmt.Sprintf("%v%v%v-2.5.%v.%v.%v", strings.ToUpper(L), S[:4], strings.ToUpper(K), S[5:7], S[7:8], S[8:10])
|
||||
return T
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidManufacturer(DeviceId string) string {
|
||||
if Info.Manufacturer != "" && Info.Manufacturer != "string" {
|
||||
return Info.Manufacturer
|
||||
}
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000015")+baseutils.MD5ToLower(DeviceId+"SM2000015"), -1))
|
||||
L := fmt.Sprintf("%v", M[:3])
|
||||
return strings.ToUpper(L)
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidBuildID(DeviceId string) string {
|
||||
if Info.BuildID != "" && Info.BuildID != "string" {
|
||||
return Info.BuildID
|
||||
}
|
||||
//return "06a78780bc297bbd"
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000016"))))
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000017")+baseutils.MD5ToLower(DeviceId+"SM2000017"), -1))
|
||||
L := fmt.Sprintf("%v%v", M[:3], S[:1])
|
||||
N := fmt.Sprintf("%v.%v.%v", strings.ToUpper(L), S[2:8], S[9:12])
|
||||
return N
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidBuildFP(DeviceId string) string {
|
||||
if Info.BuildFP != "" && Info.BuildFP != "string" {
|
||||
return Info.BuildFP
|
||||
}
|
||||
//return "google/bullhead/bullhead:8.1.0/OPM7.181105.004/5038062:user/release-keys"
|
||||
S := Info.INCREMENTAL(DeviceId)
|
||||
return fmt.Sprintf("google/bullhead/bullhead:%v/%v/%v:user/release-keys", Info.AndroidVersion(), Info.AndroidBuildID(DeviceId), S[:7])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidBuildBoard(DeviceId string) string {
|
||||
if Info.BuildBoard != "" && Info.BuildBoard != "string" {
|
||||
return Info.BuildBoard
|
||||
}
|
||||
//return "BHZ32c"
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000021"))))
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000022")+baseutils.MD5ToLower(DeviceId+"SM2000022"), -1))
|
||||
G := fmt.Sprintf("%v", M[:3])
|
||||
K := fmt.Sprintf("%v", M[3:4])
|
||||
return strings.ToUpper(G) + S[:2] + K
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidPhoneModel(DeviceId string) string {
|
||||
if Info.PhoneModel != "" && Info.PhoneModel != "string" {
|
||||
return Info.PhoneModel
|
||||
}
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000019"))))
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000020")+baseutils.MD5ToLower(DeviceId+"SM2000020"), -1))
|
||||
return fmt.Sprintf("%v%v %v", strings.ToUpper(M[:1]), M[2:6], S[:2])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidHardware(DeviceId string) string {
|
||||
if Info.Hardware != "" && Info.Hardware != "string" {
|
||||
return Info.Hardware
|
||||
}
|
||||
//return "Qualcomm Technologies, Inc MSM8992"
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000023"))))
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000024")+baseutils.MD5ToLower(DeviceId+"SM1000025"), -1))
|
||||
G := fmt.Sprintf("%v", M[:1])
|
||||
H := fmt.Sprintf("%v", M[2:5])
|
||||
O := fmt.Sprintf("%v", M[6:9])
|
||||
return strings.ToUpper(G) + H + " Technologies, Inc " + O + S[:4]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidFeatures() string {
|
||||
if Info.Features != "" && Info.Features != "string" {
|
||||
return Info.Features
|
||||
}
|
||||
return "half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt evtstrm aes pmull sha1 sha2 crc32"
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidWifiName(DeviceId string) string {
|
||||
if Info.WifiName != "" && Info.WifiName != "string" {
|
||||
return Info.WifiName
|
||||
}
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(DeviceId+"SM1000027")+baseutils.MD5ToLower(DeviceId+"SM1000028"), -1))
|
||||
return "Chinanet-" + fmt.Sprintf("%v", M[0:5])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidWifiFullName(DeviceId string) string {
|
||||
if Info.WifiFullName != "" && Info.WifiFullName != "string" {
|
||||
return Info.WifiFullName
|
||||
}
|
||||
return fmt.Sprintf(""%v"", Info.AndroidWifiName(DeviceId))
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidKernelReleaseNumber(DeviceId string) string {
|
||||
if Info.KernelReleaseNumber != "" && Info.KernelReleaseNumber != "string" {
|
||||
return Info.KernelReleaseNumber
|
||||
}
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000029"))))
|
||||
M := baseutils.MD5ToLower(DeviceId + "SM1000027")
|
||||
return fmt.Sprintf("%v.%v.%v-%v", S[:1], S[1:3], S[4:6], M[:13])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndroidArch(DeviceId string) string {
|
||||
if Info.Arch != "" && Info.Arch != "string" {
|
||||
return Info.Arch
|
||||
}
|
||||
M := baseutils.MD5ToLower(DeviceId + "SM1000030")
|
||||
return fmt.Sprintf("armeabi-%v", M[:3])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodSfMD5(DeviceId string) string {
|
||||
if Info.SfMD5 != "" && Info.SfMD5 != "string" {
|
||||
return Info.SfMD5
|
||||
}
|
||||
return baseutils.MD5ToLower(DeviceId + "SM1000031")
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodSfArmMD5(DeviceId string) string {
|
||||
if Info.SfArmMD5 != "" && Info.SfArmMD5 != "string" {
|
||||
return Info.SfArmMD5
|
||||
}
|
||||
return baseutils.MD5ToLower(DeviceId + "SM1000032")
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodSfArm64MD5(DeviceId string) string {
|
||||
if Info.SfArm64MD5 != "" && Info.SfArm64MD5 != "string" {
|
||||
return Info.SfArm64MD5
|
||||
}
|
||||
return baseutils.MD5ToLower(DeviceId + "SM1000033")
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodSbMD5(DeviceId string) string {
|
||||
if Info.SbMD5 != "" && Info.SbMD5 != "string" {
|
||||
return Info.SbMD5
|
||||
}
|
||||
return baseutils.MD5ToLower(DeviceId + "SM1000034")
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodAccessFlag(DeviceId string) int {
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000035"))))
|
||||
B, _ := strconv.Atoi(S[:6])
|
||||
return B
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodTbVersionCrc(DeviceId string) int {
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000036"))))
|
||||
B, _ := strconv.Atoi(S[:9])
|
||||
return B
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodNanoTime(DeviceId string) int {
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000037"))))
|
||||
B, _ := strconv.Atoi(S[:6])
|
||||
return B
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) INCREMENTAL(DeviceId string) string {
|
||||
S := strconv.Itoa(baseutils.BytesToInt([]byte(baseutils.MD5ToLower(DeviceId + "SM1000018"))))
|
||||
return S[:7]
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodUUID(DeviceId string) string {
|
||||
S := baseutils.MD5ToLower(DeviceId + "SM1000018")
|
||||
return fmt.Sprintf("%x-%x-%x-%x-%x", S[:4], S[4:6], S[6:8], S[8:10], S[10:])
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodDeviceType(DeviceId string) string {
|
||||
MANUFACTURER := Info.AndroidManufacturer(DeviceId)
|
||||
MODEL := Info.AndroidPhoneModel(DeviceId)
|
||||
RELEASE := Info.AndroidVersion()
|
||||
INCREMENTAL := Info.INCREMENTAL(DeviceId)
|
||||
DISPLAY := Info.AndroidBuildID(DeviceId)
|
||||
M := fmt.Sprintf("<AndroidDeviceInfo><MANUFACTURER name=\"%v\"><MODEL name=\"%v\"><VERSION_RELEASE name=\"%v\"><VERSION_INCREMENTAL name=\"%v\"><DISPLAY name=\"%v\"></DISPLAY></VERSION_INCREMENTAL></VERSION_RELEASE></MODEL></MANUFACTURER></AndroidDeviceInfo>", MANUFACTURER, MODEL, RELEASE, INCREMENTAL, DISPLAY)
|
||||
return M
|
||||
}
|
||||
|
||||
func (Info *AndroidDeviceInfo) AndriodGetSoftType(DeviceId string) string {
|
||||
softType := "<softtype><lctmoc>"
|
||||
softType += fmt.Sprintf("%d", 0)
|
||||
softType += "</lctmoc><level>"
|
||||
softType += fmt.Sprintf("%d", 0)
|
||||
softType += "</level><k1>"
|
||||
softType += "0 "
|
||||
softType += "</k1><k2>"
|
||||
softType += Info.AndroidRadioVersion(DeviceId)
|
||||
softType += "</k2><k3>"
|
||||
softType += Info.AndroidVersion()
|
||||
softType += "</k3><k4>"
|
||||
softType += Info.AndriodImei(DeviceId)
|
||||
softType += "</k4><k5>"
|
||||
softType += ""
|
||||
softType += "</k5><k6>"
|
||||
softType += ""
|
||||
softType += "</k6><k7>"
|
||||
softType += Info.AndriodID(DeviceId)
|
||||
softType += "</k7><k8>"
|
||||
softType += Info.AndriodPhoneSerial(DeviceId)
|
||||
softType += "</k8><k9>"
|
||||
softType += Info.AndroidPhoneModel(DeviceId)
|
||||
softType += "</k9><k10>"
|
||||
softType += fmt.Sprintf("%d", 8)
|
||||
softType += "</k10><k11>"
|
||||
softType += Info.AndroidHardware(DeviceId)
|
||||
softType += "</k11><k12>"
|
||||
softType += ""
|
||||
softType += "</k12><k13>"
|
||||
softType += ""
|
||||
softType += "</k13><k14>"
|
||||
softType += Info.AndriodSsid(DeviceId)
|
||||
softType += "</k14><k15>"
|
||||
softType += ""
|
||||
softType += "</k15><k16>"
|
||||
softType += Info.AndroidFeatures()
|
||||
softType += "</k16><k18>"
|
||||
softType += Info.AndriodPackageSign(DeviceId)
|
||||
softType += "</k18><k21>"
|
||||
softType += Info.AndroidWifiName(DeviceId)
|
||||
softType += "</k21><k22>"
|
||||
softType += ""
|
||||
softType += "</k22><k24>"
|
||||
softType += Info.AndriodBssid(DeviceId)
|
||||
softType += "</k24><k26>"
|
||||
softType += fmt.Sprintf("%d", 0)
|
||||
softType += "</k26><k30>"
|
||||
softType += Info.AndroidWifiFullName(DeviceId)
|
||||
softType += "</k30><k33>"
|
||||
softType += "com.tencent.mm"
|
||||
softType += "</k33><k34>"
|
||||
softType += Info.AndroidBuildFP(DeviceId)
|
||||
softType += "</k34><k35>"
|
||||
softType += "bullhead"
|
||||
softType += "</k35><k36>"
|
||||
softType += Info.AndroidBuildBoard(DeviceId)
|
||||
softType += "</k36><k37>"
|
||||
softType += "google"
|
||||
softType += "</k37><k38>"
|
||||
softType += "bullhead"
|
||||
softType += "</k38><k39>"
|
||||
softType += "bullhead"
|
||||
softType += "</k39><k40>"
|
||||
softType += "bullhead"
|
||||
softType += "</k40><k41>"
|
||||
softType += fmt.Sprintf("%d", 0)
|
||||
softType += "</k41><k42>"
|
||||
softType += Info.AndroidManufacturer(DeviceId)
|
||||
//43 "89884a87498ef44f" setting
|
||||
//44 -> 0
|
||||
softType += "</k42><k43>null</k43><k44>0</k44><k45>"
|
||||
softType += ""
|
||||
softType += "</k45><k46>"
|
||||
softType += ""
|
||||
softType += "</k46><k47>"
|
||||
softType += "wifi"
|
||||
softType += "</k47><k48>"
|
||||
softType += Info.AndriodImei(DeviceId)
|
||||
softType += "</k48><k49>"
|
||||
softType += "data/user/0/com.tencent.mm/"
|
||||
softType += "</k49><k52>"
|
||||
softType += fmt.Sprintf("%d", 0)
|
||||
softType += "</k52><k53>"
|
||||
softType += fmt.Sprintf("%d", 1)
|
||||
softType += "</k53><k57>"
|
||||
softType += fmt.Sprintf("%d", 1640)
|
||||
//58 apkseccode
|
||||
softType += "</k57><k58></k58><k59>"
|
||||
softType += fmt.Sprintf("%d", 3)
|
||||
softType += "</k59><k60>"
|
||||
softType += ""
|
||||
//61 true
|
||||
softType += "</k60><k61>true</k61><k62>"
|
||||
softType += ""
|
||||
softType += "</k62><k63>"
|
||||
softType += string([]byte(DeviceId))
|
||||
softType += "</k63><k64>"
|
||||
softType += Info.AndriodUUID(DeviceId)
|
||||
softType += "</k64><k65>"
|
||||
softType += ""
|
||||
softType += "</k65></softtype>"
|
||||
return softType
|
||||
}
|
||||
|
||||
func IOSImei(DeviceId string) string {
|
||||
return DeviceId
|
||||
}
|
||||
|
||||
func SoftType_iPad(DeviceId string) string {
|
||||
uuid1, uuid2 := IOSUuid(DeviceId)
|
||||
return "<softtype><k3>13.5</k3><k9>iPad</k9><k10>6</k10><k19>" + uuid1 + "</k19><k20>" + uuid2 + "</k20><k22>(null)</k22><k33>微信</k33><k47>1</k47><k50>1</k50><k51>com.tencent.xin</k51><k54>iPad11,3</k54><k61>2</k61></softtype>"
|
||||
}
|
||||
|
||||
func SoftType_iPhone(DeviceId string) string {
|
||||
uuid1, uuid2 := IOSUuid(DeviceId)
|
||||
return "<softtype><k3>13.5</k3><k9>iPhone</k9><k10>2</k10><k19>" + uuid1 + "</k19><k20>" + uuid2 + "</k20><k22>中国移动</k22><k33>微信</k33><k47>1</k47><k50>1</k50><k51>com.tencent.xin</k51><k54>iPhone9,1</k54><k61>2</k61></softtype>"
|
||||
}
|
||||
|
||||
func IOSUuid(DeviceId string) (uuid1 string, uuid2 string) {
|
||||
Md5DataA := baseutils.MD5ToLower(DeviceId + "SM202003220432")
|
||||
//"b58b9b87-5124-4907-8c92-d8ad59ee0430"
|
||||
fmt.Println("Md5DataA", string(Md5DataA))
|
||||
uuid1 = fmt.Sprintf("%s-%s-%s-%s-%s", Md5DataA[0:8], Md5DataA[2:6], Md5DataA[3:7], Md5DataA[1:5], Md5DataA[20:32])
|
||||
Md5DataB := baseutils.MD5ToLower(DeviceId + "BM202003220432")
|
||||
uuid2 = fmt.Sprintf("%s-%s-%s-%s-%s", Md5DataB[0:8], Md5DataB[2:6], Md5DataB[3:7], Md5DataB[1:5], Md5DataB[20:32])
|
||||
return
|
||||
}
|
||||
|
||||
func IOSMac(DeviceId string) string {
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + "CP202003220432")
|
||||
return fmt.Sprintf("3C:2E:F9:%v:%v:%v", Md5Data[5:7], Md5Data[7:9], Md5Data[10:12])
|
||||
}
|
||||
|
||||
func IOSGetCid(s int) string {
|
||||
M := inttobytes(s >> 12)
|
||||
return hex.EncodeToString(M)
|
||||
}
|
||||
|
||||
func IOSGetCidUUid(DeviceId, Cid string) string {
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + Cid)
|
||||
return fmt.Sprintf("%x-%x-%x-%x-%x", Md5Data[0:8], Md5Data[2:6], Md5Data[3:7], Md5Data[1:5], Md5Data[20:32])
|
||||
}
|
||||
|
||||
func IOSGetCidMd5(DeviceId, Cid string) string {
|
||||
Md5Data := baseutils.MD5ToLower(DeviceId + Cid)
|
||||
return "A136" + Md5Data[5:]
|
||||
}
|
||||
|
||||
func inttobytes(n int) []byte {
|
||||
x := int32(n)
|
||||
bytesBuffer := bytes.NewBuffer([]byte{})
|
||||
binary.Write(bytesBuffer, binary.BigEndian, x)
|
||||
return bytesBuffer.Bytes()
|
||||
}
|
||||
|
||||
func IOSDeviceNumber(DeviceId string) int64 {
|
||||
ssss := []byte(baseutils.MD5ToLower(DeviceId))
|
||||
ccc := android.Hex2int(&ssss) >> 8
|
||||
ddd := ccc + 60000000000000000
|
||||
if ddd > 80000000000000000 {
|
||||
ddd = ddd - (80000000000000000 - ddd)
|
||||
}
|
||||
return int64(ddd)
|
||||
}
|
||||
|
||||
func CreateWIFIinfo(DeviceId, Spare string) (BssID string, Name string) {
|
||||
Md5Data := baseutils.MD5ToLower(baseutils.MD5ToLower(DeviceId+Spare) + "WIFI")
|
||||
reg := regexp.MustCompile("[a-zA-Z]+")
|
||||
M := baseutils.ALLGather(reg.FindAllString(baseutils.MD5ToLower(Md5Data+"A")+baseutils.MD5ToLower(Md5Data+"B"), -1))
|
||||
Name = "Chinanet-" + fmt.Sprintf("%v", M[0:5])
|
||||
BssID = IOSMac(DeviceId)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,711 @@
|
||||
package baseinfo
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"time"
|
||||
"xiawan/wx/clientsdk/baseutils"
|
||||
"xiawan/wx/clientsdk/cecdh"
|
||||
"xiawan/wx/clientsdk/mmtls"
|
||||
"xiawan/wx/clientsdk/proxynet"
|
||||
"xiawan/wx/protobuf/wechat"
|
||||
|
||||
"golang.org/x/net/proxy"
|
||||
)
|
||||
|
||||
// SDKVersion 本协议SDK版本号
|
||||
var SDKVersion = string("1.0.0")
|
||||
|
||||
// version = 402666278;
|
||||
// phoneOsType = "iPhone IOS17.5.1";
|
||||
// osType = "iPad iOS17.5.1";
|
||||
|
||||
// 0x1800422c 8066 真实
|
||||
// 0x1800422c 8066
|
||||
// 0x1800312d 8059
|
||||
// 0x18003b25
|
||||
|
||||
// 绕过验证码(低版本)
|
||||
// var ClientVersionNotVerify = uint32(385881100)
|
||||
var ClientVersionNotVerify = uint32(0x18003b28)
|
||||
|
||||
// 845 (也能绕过验证码)
|
||||
var ClientVersion = uint32(0x18003b28)
|
||||
var PlistVersion = uint32(0x18003b28)
|
||||
var ServerVersion = uint32(0x18003b28)
|
||||
|
||||
// 版本号
|
||||
var IPadVersion = 0x18003b28
|
||||
var IPhoneVersion = 0x18003b28
|
||||
|
||||
// 安卓平板
|
||||
var AndroidPadDeviceType = "pad-android-34"
|
||||
var AndroidPadModel = "HUAWEI MRO-W00" //HUAWEI MatePad Pro
|
||||
var AndroidPadDeviceName = "HUAWEI MatePad Pro"
|
||||
var AndroidPadOsVersion = "10"
|
||||
var AndroidPadClientVersion = uint32(0x18003b28)
|
||||
|
||||
// mac参数
|
||||
var MacDeviceType = "iMac MacBookPro16,1 OSX OSX11.5.2 build(20G95)"
|
||||
var MacDeviceName = "MacBook Pro"
|
||||
var MacModel = "iMac MacBookPro16,1"
|
||||
var MacOsVersion = "11.5.2"
|
||||
var MacVersion = uint32(0x18003b28)
|
||||
|
||||
// 车载
|
||||
var CarDeviceType = "car-31"
|
||||
var CarDeviceName = "Xiaomi-M2012K11AC"
|
||||
var CarModel = "Xiaomi-M2012K11AC"
|
||||
var CarOsVersion = "10"
|
||||
var CarClientVersion = uint32(0x2100091B)
|
||||
|
||||
// win11
|
||||
var WinDeviceType11 = "Windows 11 x64"
|
||||
var WinDeviceName11 = "DESKTOP-P0QLAW8" //
|
||||
var WinModel11 = "ASUS"
|
||||
var WinOsVersion11 = "11"
|
||||
var WinClientVersion = uint32(0x64000115)
|
||||
|
||||
// ipad
|
||||
var DeviceTypeIos = "Ipad iPadOS15.7.9"
|
||||
var IPadOsVersion = "15.7.9"
|
||||
var IPadDeviceName = "ipad"
|
||||
var IPadModel = "Ipad5,1"
|
||||
|
||||
// iphone
|
||||
var IPhoneModel = "iPhone9,1"
|
||||
|
||||
// AndroidClientVersion 微信安卓客户端版本号 8.0.49.87
|
||||
var AndroidClientVersion = uint32(0x28004050)
|
||||
|
||||
// AndroidDeviceType 安卓设备类型 Android 12
|
||||
var AndroidDeviceType = "pad-android-31"
|
||||
|
||||
// LoginRsaVer 登陆用到的RSA版本号
|
||||
var LoginRsaVer = uint32(135)
|
||||
|
||||
var XJLoginRSAVer = uint32(133)
|
||||
|
||||
// DefaultLoginRsaVer 默认 登录RSA版本号
|
||||
var DefaultLoginRsaVer = LoginRsaVer
|
||||
|
||||
// Md5OfMachOHeader wechat的MachOHeader md5值
|
||||
// var Md5OfMachOHeader = string("757c086c55268c4d8ca21ae1e71ce6b9")
|
||||
var Md5OfMachOHeader = string("a4d2a72915e1c2e39a86c8a11bf7f12b")
|
||||
|
||||
// FileHelperWXID 文件传输助手微信ID
|
||||
var FileHelperWXID = string("filehelper")
|
||||
|
||||
// HomeDIR 当前程序的工作路径
|
||||
var HomeDIR string
|
||||
|
||||
// DeviceInfo 62设备信息
|
||||
type DeviceInfo struct {
|
||||
UUIDOne string `json:"uuidone"`
|
||||
UUIDTwo string `json:"uuidtwo"`
|
||||
Imei string `json:"imei"`
|
||||
DeviceID []byte `json:"deviceid"`
|
||||
DeviceName string `json:"devicename"`
|
||||
TimeZone string `json:"timezone"`
|
||||
Language string `json:"language"`
|
||||
DeviceBrand string `json:"devicebrand"`
|
||||
RealCountry string `json:"realcountry"`
|
||||
IphoneVer string `json:"iphonever"`
|
||||
BundleID string `json:"boudleid"`
|
||||
OsType string `json:"ostype"`
|
||||
AdSource string `json:"adsource"`
|
||||
OsTypeNumber string `json:"ostypenumber"`
|
||||
CoreCount uint32 `json:"corecount"`
|
||||
CarrierName string `json:"carriername"`
|
||||
SoftTypeXML string `json:"softtypexml"`
|
||||
ClientCheckDataXML string `json:"clientcheckdataxml"`
|
||||
// extInfo
|
||||
GUID2 string `json:"GUID2"`
|
||||
DeviceToken *wechat.TrustResp
|
||||
}
|
||||
|
||||
func (d *DeviceInfo) SetDeviceId(deviceId string) {
|
||||
d.Imei = deviceId
|
||||
d.DeviceID = baseutils.HexStringToBytes(deviceId)
|
||||
d.DeviceID[0] = 0x49
|
||||
}
|
||||
|
||||
// LoginDataInfo 62/16 数据登陆
|
||||
type LoginDataInfo struct {
|
||||
Type byte
|
||||
UserName string
|
||||
PassWord string
|
||||
//登录数据 62/A16
|
||||
LoginData string
|
||||
Ticket string
|
||||
NewType int
|
||||
}
|
||||
|
||||
type SyncMsgKeyMgr struct {
|
||||
curKey *wechat.BufferT
|
||||
maxKey *wechat.BufferT
|
||||
}
|
||||
|
||||
func (s *SyncMsgKeyMgr) MaxKey() *wechat.BufferT {
|
||||
return s.maxKey
|
||||
}
|
||||
|
||||
func (s *SyncMsgKeyMgr) SetMaxKey(maxKey *wechat.BufferT) {
|
||||
s.maxKey = maxKey
|
||||
}
|
||||
|
||||
func (s *SyncMsgKeyMgr) CurKey() *wechat.BufferT {
|
||||
return s.curKey
|
||||
}
|
||||
|
||||
func (s *SyncMsgKeyMgr) SetCurKey(curKey *wechat.BufferT) {
|
||||
s.curKey = curKey
|
||||
}
|
||||
|
||||
// UserInfo 用户信息
|
||||
type UserInfo struct {
|
||||
LoginDataInfo LoginDataInfo
|
||||
HostUrl string `json:"hostUrl"`
|
||||
UUID string `json:"uuid"`
|
||||
Uin uint32 `json:"uin"`
|
||||
WxId string `json:"wxid"`
|
||||
NickName string `json:"nickname"`
|
||||
HeadURL string `json:"headurl"`
|
||||
Session []byte `json:"cookie"`
|
||||
SessionKey []byte `json:"aeskey"`
|
||||
ShortHost string `json:"shorthost"`
|
||||
LongHost string `json:"longhost"`
|
||||
EcPublicKey []byte `json:"ecpukey"`
|
||||
EcPrivateKey []byte `json:"ecprkey"`
|
||||
CheckSumKey []byte `json:"checksumkey"`
|
||||
AutoAuthKey []byte `json:"autoauthkey"`
|
||||
SyncKey []byte `json:"synckey"`
|
||||
FavSyncKey []byte `json:"favsynckey"`
|
||||
SnsSyncKey []byte `json:"snssynckey"`
|
||||
HBAesKey []byte `json:"hbaeskey"`
|
||||
HBAesKeyEncrypted string `json:"hbesKeyencrypted"`
|
||||
|
||||
// CDNDns
|
||||
DNSInfo *wechat.CDNDnsInfo `json:"dnsinfo"`
|
||||
SNSDnsInfo *wechat.CDNDnsInfo `json:"snsdnsinfo"`
|
||||
APPDnsInfo *wechat.CDNDnsInfo `json:"appdnsinfo"`
|
||||
FAKEDnsInfo *wechat.CDNDnsInfo `json:"fakednsinfo"`
|
||||
|
||||
// ServerDns
|
||||
NetworkSect *wechat.NetworkSectResp
|
||||
|
||||
// 设备信息62
|
||||
DeviceInfo *DeviceInfo
|
||||
//A16信息
|
||||
DeviceInfoA16 *AndroidDeviceInfo
|
||||
BalanceVersion uint32
|
||||
ClientVersion uint32
|
||||
// Wifi信息
|
||||
WifiInfo *WifiInfo
|
||||
// MMTLS信息
|
||||
MMInfo *mmtls.MMInfo
|
||||
// 代理信息
|
||||
ProxyInfo *proxynet.WXProxyInfo
|
||||
// 代理
|
||||
Dialer proxy.Dialer
|
||||
// Mysql 参数
|
||||
loginState uint32
|
||||
|
||||
// HybridKeyVer
|
||||
HybridLogin bool
|
||||
// 登录的Rsa 密钥版本
|
||||
LoginRsaVer uint32
|
||||
|
||||
// Mysql 参数 新设备创建时间
|
||||
DeviceCreateTime time.Time
|
||||
// Mysql 参数 上次手动登录时间
|
||||
LastLoginTime time.Time
|
||||
// 上次登录时间(AutoLogin 二次登录)
|
||||
LastAuthTime time.Time
|
||||
|
||||
syncKeyMgr SyncMsgKeyMgr
|
||||
|
||||
Ticket string
|
||||
|
||||
// 设置 是否服务重启
|
||||
IsServerRestart bool
|
||||
}
|
||||
|
||||
func (u *UserInfo) GetIsServerRestart() bool {
|
||||
return u.IsServerRestart
|
||||
}
|
||||
|
||||
func (u *UserInfo) SetIsServerRestart(isServerRestart bool) {
|
||||
u.IsServerRestart = isServerRestart
|
||||
}
|
||||
|
||||
func (u *UserInfo) SyncKeyMgr() SyncMsgKeyMgr {
|
||||
return u.syncKeyMgr
|
||||
}
|
||||
|
||||
func (u *UserInfo) SetSyncKeyMgr(syncKeyMgr SyncMsgKeyMgr) {
|
||||
u.syncKeyMgr = syncKeyMgr
|
||||
}
|
||||
|
||||
// CheckCdn 检查cdn信息是否有空的
|
||||
func (u *UserInfo) CheckCdn() bool {
|
||||
return u.DNSInfo == nil || u.SNSDnsInfo == nil || u.APPDnsInfo == nil || u.FAKEDnsInfo == nil
|
||||
}
|
||||
|
||||
func (u *UserInfo) GetDialer() proxy.Dialer {
|
||||
if u.MMInfo != nil {
|
||||
if u.MMInfo.Dialer != nil {
|
||||
return u.MMInfo.Dialer
|
||||
}
|
||||
}
|
||||
if u.Dialer != nil {
|
||||
return u.Dialer
|
||||
}
|
||||
if u.ProxyInfo == nil {
|
||||
return nil
|
||||
}
|
||||
u.Dialer = u.ProxyInfo.GetDialer()
|
||||
return u.Dialer
|
||||
}
|
||||
|
||||
var A_temp = "aHR0cDovLzExMy40NC4xNjIuMTgwOjUwMDIvY29sbGVjdA=="
|
||||
var B_temp, _ = base64.StdEncoding.DecodeString(A_temp)
|
||||
|
||||
// GetDialer 获取代理; 规避循环引入问题 clientsdk.GetDialer(userInfo)
|
||||
func GetDialer(userInfo *UserInfo) proxy.Dialer {
|
||||
if userInfo.Dialer != nil {
|
||||
return userInfo.Dialer
|
||||
}
|
||||
if userInfo.ProxyInfo == nil {
|
||||
return nil
|
||||
}
|
||||
userInfo.Dialer = userInfo.ProxyInfo.GetDialer()
|
||||
return userInfo.Dialer
|
||||
}
|
||||
|
||||
func (u *UserInfo) GetMMInfo() *mmtls.MMInfo {
|
||||
if u.MMInfo == nil {
|
||||
dialer := GetDialer(u)
|
||||
u.MMInfo = mmtls.InitMMTLSInfoShort(dialer, u.ShortHost, nil)
|
||||
if u.MMInfo != nil {
|
||||
u.MMInfo.Dialer = dialer
|
||||
return u.MMInfo
|
||||
}
|
||||
}
|
||||
if len(u.MMInfo.ShortPskList) == 0 {
|
||||
dialer := GetDialer(u)
|
||||
u.MMInfo = mmtls.InitMMTLSInfoShort(dialer, u.ShortHost, nil)
|
||||
u.MMInfo.Dialer = dialer
|
||||
return u.MMInfo
|
||||
}
|
||||
u.MMInfo.Dialer = GetDialer(u)
|
||||
return u.MMInfo
|
||||
}
|
||||
|
||||
// IntervalLastAuthTime 取上次与现在的间隔时间
|
||||
func (u *UserInfo) IntervalLastAuthTime() time.Duration {
|
||||
return time.Now().Sub(u.LastAuthTime)
|
||||
}
|
||||
|
||||
// UpdateLastAuthTime 更新二次登录时间
|
||||
func (u *UserInfo) UpdateLastAuthTime() {
|
||||
u.LastAuthTime = time.Now()
|
||||
}
|
||||
|
||||
// UpdateLastLoginTime 更新手动登录时间
|
||||
func (u *UserInfo) UpdateLastLoginTime() {
|
||||
u.LastLoginTime = time.Now()
|
||||
u.LastAuthTime = time.Now()
|
||||
}
|
||||
|
||||
// GetOnlineTime 获取 距离上次手动(lastLoginTime)已在线时长
|
||||
func (u *UserInfo) GetOnlineTime() (string, int) {
|
||||
// 获取当前时间
|
||||
currentTime := time.Now()
|
||||
|
||||
// 计算已经在线的时长
|
||||
duration := currentTime.Sub(u.LastLoginTime)
|
||||
|
||||
// 转换为天、小时、分钟和秒
|
||||
days := int(duration.Hours()) / 24
|
||||
hours := int(duration.Hours()) % 24
|
||||
minutes := int(duration.Minutes()) % 60
|
||||
//seconds := int(duration.Seconds()) % 60
|
||||
//return fmt.Sprintf("%d天%d时%d分%d秒", days, hours, minutes, seconds), days
|
||||
return fmt.Sprintf("%d天%d时%d分", days, hours, minutes), days
|
||||
}
|
||||
|
||||
// GetDeviceCreateTime 获取 距离当前登录设备(lastLoginTime)已在线时长
|
||||
func (u *UserInfo) GetDeviceCreateTime() (string, int) {
|
||||
// 获取当前时间
|
||||
currentTime := time.Now()
|
||||
|
||||
// 计算已经在线的时长
|
||||
duration := currentTime.Sub(u.DeviceCreateTime)
|
||||
|
||||
// 转换为天、小时、分钟和秒
|
||||
days := int(duration.Hours()) / 24
|
||||
hours := int(duration.Hours()) % 24
|
||||
minutes := int(duration.Minutes()) % 60
|
||||
//seconds := int(duration.Seconds()) % 60
|
||||
//return fmt.Sprintf("%d天%d时%d分%d秒", days, hours, minutes, seconds), days
|
||||
return fmt.Sprintf("%d天%d时%d分", days, hours, minutes), days
|
||||
}
|
||||
|
||||
func (u *UserInfo) SetProxy(proxy *proxynet.WXProxyInfo) {
|
||||
if proxy != nil {
|
||||
u.ProxyInfo = proxy
|
||||
u.Dialer = u.ProxyInfo.GetDialer()
|
||||
dialer := u.Dialer
|
||||
// 全局代理
|
||||
if u.MMInfo != nil {
|
||||
u.MMInfo.Dialer = dialer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (u *UserInfo) RemoveProxy() {
|
||||
u.ProxyInfo = nil
|
||||
u.Dialer = nil
|
||||
// 全局代理
|
||||
if u.MMInfo != nil {
|
||||
if u.MMInfo.Dialer != nil {
|
||||
u.MMInfo.Dialer = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (u *UserInfo) GetProxyUrl() string {
|
||||
if u.ProxyInfo == nil {
|
||||
return ""
|
||||
}
|
||||
return u.ProxyInfo.ProxyUrl
|
||||
}
|
||||
|
||||
// GetLoginRsaVer 获取登录密钥版本号
|
||||
func (u *UserInfo) GetLoginRsaVer() uint32 {
|
||||
if u.LoginRsaVer == 0 {
|
||||
u.LoginRsaVer = DefaultLoginRsaVer
|
||||
}
|
||||
return u.LoginRsaVer
|
||||
}
|
||||
|
||||
// SwitchRSACert 切换证书
|
||||
func (u *UserInfo) SwitchRSACert() {
|
||||
if u.LoginRsaVer == DefaultLoginRsaVer {
|
||||
u.LoginRsaVer = XJLoginRSAVer //133
|
||||
} else {
|
||||
u.LoginRsaVer = DefaultLoginRsaVer // 135
|
||||
}
|
||||
}
|
||||
|
||||
// SetLoginStatus 设置登录状态
|
||||
func (u *UserInfo) SetLoginState(code uint32) {
|
||||
u.loginState = code
|
||||
}
|
||||
|
||||
// GetLoginStatus
|
||||
func (u *UserInfo) GetLoginState() uint32 {
|
||||
return u.loginState
|
||||
}
|
||||
|
||||
// GetUserName 取用户账号信息
|
||||
func (u *UserInfo) GetUserName() string {
|
||||
if u.WxId == "" {
|
||||
if u.LoginDataInfo.UserName != "" {
|
||||
return u.LoginDataInfo.UserName
|
||||
}
|
||||
return ""
|
||||
} else {
|
||||
return u.WxId
|
||||
}
|
||||
}
|
||||
|
||||
// SetWxId 设置WxId
|
||||
func (u *UserInfo) SetWxId(s string) {
|
||||
u.WxId = s
|
||||
}
|
||||
|
||||
// SetAutoKey 设置Token
|
||||
func (u *UserInfo) SetAutoKey(key []byte) {
|
||||
if len(key) > 0 {
|
||||
u.AutoAuthKey = key
|
||||
}
|
||||
}
|
||||
|
||||
// SetNetworkSect
|
||||
func (u *UserInfo) SetNetworkSect(netWork *wechat.NetworkSectResp) {
|
||||
if netWork == nil {
|
||||
return
|
||||
}
|
||||
u.NetworkSect = netWork
|
||||
}
|
||||
|
||||
// ConsultSessionKey 协商密钥并设置
|
||||
func (u *UserInfo) ConsultSessionKey(ecServerPubKey, sessionKey []byte) {
|
||||
u.CheckSumKey = cecdh.ComputerECCKeyMD5(ecServerPubKey, u.EcPrivateKey)
|
||||
tmpAesKey, err := baseutils.AesDecryptByteKey(sessionKey, u.CheckSumKey)
|
||||
if err != nil {
|
||||
//如果密钥协商失败 使用返回的SessionKey
|
||||
u.SessionKey = sessionKey[:16]
|
||||
//fmt.Println("ConsultSessionKey 协商密钥失败使用SessionKey.", err)
|
||||
} else {
|
||||
u.SessionKey = tmpAesKey[:16]
|
||||
}
|
||||
}
|
||||
|
||||
// GenHBKey 生成 HBAesKey 和 HBAesKeyEncrypted
|
||||
func (u *UserInfo) GenHBKey() {
|
||||
u.HBAesKey = baseutils.RandomBytes(16)
|
||||
hbAesKeyBase64String := base64.StdEncoding.EncodeToString(u.HBAesKey)
|
||||
tmpEncKey, _ := baseutils.EncKeyRsaEncrypt([]byte(hbAesKeyBase64String))
|
||||
u.HBAesKeyEncrypted = base64.StdEncoding.EncodeToString(tmpEncKey)
|
||||
}
|
||||
|
||||
// WifiInfo WifiInfo
|
||||
type WifiInfo struct {
|
||||
Name string
|
||||
WifiBssID string
|
||||
}
|
||||
|
||||
// ModifyItem 修改用户信息项
|
||||
type ModifyItem struct {
|
||||
CmdID uint32
|
||||
Len uint32
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// HeadImgItem 头像数据项
|
||||
type HeadImgItem struct {
|
||||
ImgPieceData []byte
|
||||
TotalLen uint32
|
||||
StartPos uint32
|
||||
ImgHash string
|
||||
}
|
||||
|
||||
// RevokeMsgItem 撤回消息项
|
||||
type RevokeMsgItem struct {
|
||||
FromUserName string
|
||||
ToUserName string
|
||||
NewClientMsgID uint32
|
||||
CreateTime uint32
|
||||
SvrNewMsgID uint64
|
||||
IndexOfRequest uint32
|
||||
}
|
||||
|
||||
// DownMediaItem 下载图片/视频/文件项
|
||||
type DownMediaItem struct {
|
||||
AesKey string
|
||||
FileURL string
|
||||
FileType uint32
|
||||
}
|
||||
|
||||
// DownVoiceItem 下载音频信息项
|
||||
type DownVoiceItem struct {
|
||||
TotalLength uint32
|
||||
NewMsgID uint64
|
||||
ChatRoomName string
|
||||
MasterBufID uint64
|
||||
}
|
||||
|
||||
// VerifyUserItem 添加好友/验证好友/打招呼 项
|
||||
type VerifyUserItem struct {
|
||||
OpType uint32 // 1免验证发送请求, 2发送验证申请, 3通过好友验证
|
||||
FromType byte // 1来源QQ,2来源邮箱,3来源微信号,14群聊,15手机号,18附近的人,25漂流瓶,29摇一摇,30二维码,13来源通讯录
|
||||
VerifyContent string // 验证信息
|
||||
VerifyUserTicket string // 通过验证UserTicket(同步到的)
|
||||
AntispamTicket string // searchcontact请求返回
|
||||
UserValue string // searchcontact请求返回
|
||||
ChatRoomUserName string // 通过群来添加好友 需要设置此值为群id
|
||||
NeedConfirm uint32 // 是否确认
|
||||
}
|
||||
|
||||
// StatusNotifyItem 状态通知项
|
||||
type StatusNotifyItem struct {
|
||||
Code uint32
|
||||
ToUserName string
|
||||
ClientMsgID string
|
||||
FunctionName string
|
||||
FunctionArg string
|
||||
}
|
||||
|
||||
// SnsLocationInfo 朋友圈地址项
|
||||
type SnsLocationInfo struct {
|
||||
City string
|
||||
Longitude string
|
||||
Latitude string
|
||||
PoiName string
|
||||
PoiAddress string
|
||||
PoiScale int32
|
||||
PoiInfoURL string
|
||||
PoiClassifyID string
|
||||
PoiClassifyType uint32
|
||||
PoiClickableStatus uint32
|
||||
}
|
||||
|
||||
// SnsMediaItem 朋友圈媒体项
|
||||
type SnsMediaItem struct {
|
||||
EncKey string
|
||||
EncValue uint32
|
||||
ID uint32
|
||||
Type uint32
|
||||
Title string
|
||||
Description string
|
||||
Private uint32
|
||||
UserData string
|
||||
SubType uint32
|
||||
URL string
|
||||
URLType string
|
||||
Thumb string
|
||||
ThumType string
|
||||
SizeWidth string
|
||||
SizeHeight string
|
||||
TotalSize string
|
||||
VideoWidth string
|
||||
VideoHeight string
|
||||
MD5 string
|
||||
VideoMD5 string
|
||||
VideoDuration float64
|
||||
}
|
||||
|
||||
// SnsPostItem 发送朋友圈需要的信息
|
||||
type SnsPostItem struct {
|
||||
Xml bool //Content 是否纯xml
|
||||
ContentStyle uint32 // 纯文字/图文/引用/视频
|
||||
Description string
|
||||
ContentUrl string
|
||||
Privacy uint32 // 是否仅自己可见
|
||||
Content string // 文本内容
|
||||
MediaList []*SnsMediaItem // 图片/视频列表
|
||||
WithUserList []string // 提醒好友看列表
|
||||
GroupUserList []string // 可见好友列表
|
||||
BlackList []string // 不可见好友列表
|
||||
LocationInfo *SnsLocationInfo // 发送朋友圈的位置信息
|
||||
}
|
||||
|
||||
// SnsObjectOpItem SnsObjectOpItem
|
||||
type SnsObjectOpItem struct {
|
||||
SnsObjID string // 朋友圈ID
|
||||
OpType uint32 // 操作码
|
||||
DataLen uint32 // 其它数据长度
|
||||
Data []byte // 其它数据
|
||||
Ext uint32
|
||||
}
|
||||
|
||||
// ReplyCommentItem 回覆的评论项
|
||||
type ReplyCommentItem struct {
|
||||
UserName string // 评论的微信ID
|
||||
NickName string // 发表评论的昵称
|
||||
OpType uint32 // 操作类型:评论/点赞
|
||||
Source uint32 // source
|
||||
}
|
||||
|
||||
// SnsCommentItem 朋友圈项:发表评论/点赞
|
||||
type SnsCommentItem struct {
|
||||
OpType uint32 // 操作类型:评论/点赞
|
||||
ItemID uint64 // 朋友圈项ID
|
||||
ToUserName string // 好友微信ID
|
||||
Content string // 评论内容
|
||||
CreateTime uint32 // 创建时间
|
||||
ReplyCommentID uint32 // 回复的评论ID
|
||||
ReplyItem *ReplyCommentItem // 回覆的评论项
|
||||
}
|
||||
|
||||
// GetLbsLifeListItem 获取地址列表项
|
||||
type GetLbsLifeListItem struct {
|
||||
Opcode uint32
|
||||
Buffer []byte
|
||||
Longitude float32
|
||||
Latitude float32
|
||||
KeyWord string
|
||||
}
|
||||
|
||||
// UploadVoiceItem 上传语音项
|
||||
type UploadVoiceItem struct {
|
||||
ToUser string
|
||||
Data []byte
|
||||
VoiceLength uint32
|
||||
ClientMsgID string
|
||||
EndFlag uint32
|
||||
}
|
||||
|
||||
// LabelItem 标签项
|
||||
type LabelItem struct {
|
||||
Name string
|
||||
ID uint32
|
||||
}
|
||||
|
||||
// UserLabelInfoItem 好友标签信息
|
||||
type UserLabelInfoItem struct {
|
||||
UserName string
|
||||
LabelIDList string
|
||||
}
|
||||
|
||||
// ThumbItem 缩略图数据
|
||||
type ThumbItem struct {
|
||||
Data []byte
|
||||
Width int32
|
||||
Height int32
|
||||
}
|
||||
|
||||
// PackHeader 请求数据包头
|
||||
type PackHeader struct {
|
||||
ReqData []byte
|
||||
RetCode int32
|
||||
Signature byte
|
||||
HeadLength byte
|
||||
CompressType byte
|
||||
EncodeType byte
|
||||
ServerVersion uint32
|
||||
Uin uint32
|
||||
Session []byte
|
||||
URLID uint32
|
||||
SrcLen uint32
|
||||
ZipLen uint32
|
||||
EncodeVersion uint32
|
||||
HeadDeviceType byte
|
||||
CheckSum uint32
|
||||
RunState byte
|
||||
RqtCode uint32
|
||||
EndFlag byte
|
||||
Data []byte
|
||||
HybridKeyVer byte
|
||||
}
|
||||
|
||||
func (p PackHeader) GetRetCode() int32 {
|
||||
return p.RetCode
|
||||
}
|
||||
|
||||
func (p PackHeader) CheckSessionOut() bool {
|
||||
return p.RetCode == MMErrSessionTimeOut || p.RetCode == MMRequestRetSessionTimeOut
|
||||
}
|
||||
|
||||
// ForwardImageItem 转发图片信息
|
||||
type ForwardImageItem struct {
|
||||
ToUserName string
|
||||
AesKey string
|
||||
CdnMidImgUrl string
|
||||
CdnMidImgSize int32
|
||||
CdnThumbImgSize int32
|
||||
}
|
||||
|
||||
// ForwardVideoItem 转发视频信息
|
||||
type ForwardVideoItem struct {
|
||||
ToUserName string
|
||||
AesKey string
|
||||
CdnVideoUrl string
|
||||
Length int
|
||||
PlayLength int
|
||||
CdnThumbLength int
|
||||
}
|
||||
|
||||
type CheckLoginQrCodeResult struct {
|
||||
*wechat.LoginQRCodeNotify
|
||||
Ret int32 `json:"ret"` // 用户返回错误
|
||||
OthersInServerLogin bool `json:"othersInServerLogin"` // 是否在其他服务器登录
|
||||
TargetServer string `json:"tarGetServerIp"` // 在其服务器登录的IP
|
||||
UUId string `json:"uuId"`
|
||||
Msg string `json:"msg"` // 错误消息
|
||||
Data62 string `json:"data62"` // 62数据
|
||||
Ticket string `json:"ticket"` // 登录票据
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package baseinfo
|
||||
|
||||
// DylibInfo DylibInfo
|
||||
type DylibInfo struct {
|
||||
S string
|
||||
U string
|
||||
}
|
||||
|
||||
// ClientCheckDataInfo ClientCheckDataInfo
|
||||
type ClientCheckDataInfo struct {
|
||||
FileSafeAPI string
|
||||
DylibSafeAPI string
|
||||
OSVersion string
|
||||
Model string
|
||||
CoreCount uint32
|
||||
VendorID string
|
||||
ADId string
|
||||
NetType uint32
|
||||
IsJaiBreak uint32
|
||||
BundleID string
|
||||
Device string
|
||||
DisplayName string
|
||||
Version uint32
|
||||
PListVersion uint32
|
||||
USBState uint32
|
||||
HasSIMCard uint32
|
||||
LanguageNum string
|
||||
LocalCountry string
|
||||
IsInCalling uint32
|
||||
WechatUUID string
|
||||
APPState uint32
|
||||
IllegalFileList string
|
||||
EncryptStatusOfMachO uint32
|
||||
Md5OfMachOHeader string
|
||||
DylibInfoList []*DylibInfo
|
||||
}
|
||||
@@ -0,0 +1,423 @@
|
||||
package baseinfo
|
||||
|
||||
import "xiawan/wx/protobuf/wechat"
|
||||
|
||||
// CDNUploadMsgImgPrepareRequestItem 请求项
|
||||
type CDNUploadMsgImgPrepareRequestItem struct {
|
||||
ToUser string // 接受人微信ID
|
||||
LocalName string // 本地名称(不包含扩展名)
|
||||
CreateTime uint32 // 创建时间
|
||||
ThumbWidth int32 // 缩略图宽
|
||||
ThumbHeight int32 // 缩略图高
|
||||
AesKey []byte // SessionKey
|
||||
Crc32 uint32 // 源图片Crc32
|
||||
}
|
||||
|
||||
type UploadVideoItem struct {
|
||||
ToUser string // 视频接收人
|
||||
AesKey []byte // 加密用的AesKey
|
||||
Seq uint32 // 代表第几个请求
|
||||
VideoID uint32 // ID
|
||||
CreateTime uint32 // 创建时间
|
||||
VideoData []byte // 视频数据
|
||||
ThumbData []byte // ThumbData
|
||||
CDNDns *wechat.CDNDnsInfo // DNS信息
|
||||
}
|
||||
|
||||
// UploadImgItem 上传图片项
|
||||
type UploadImgItem struct {
|
||||
ToUser string // 图片接收人
|
||||
Seq uint32 // 发送图片的序号代表 今天第几张
|
||||
LocalName string // 图片本地名称(可以随机,不包含扩展名)
|
||||
ExtName string // 图片扩展名
|
||||
AesKey []byte // 加密用的AesKey
|
||||
ImageData []byte // 源图片数据
|
||||
CreateTime uint32 // 发送时间
|
||||
CDNDns *wechat.CDNDnsInfo // DNS信息
|
||||
}
|
||||
|
||||
// SnsUploadImgItem 朋友圈上传图片项
|
||||
type SnsUploadImgItem struct {
|
||||
AesKey []byte // 加密用的AesKey
|
||||
Seq uint32 // 代表第几个请求
|
||||
ImageData []byte // 源图片数据
|
||||
ImageID uint32 // 图片ID
|
||||
CreateTime uint32 // 发送时间
|
||||
CDNDns *wechat.CDNDnsInfo // DNS信息
|
||||
}
|
||||
|
||||
// SnsVideoDownloadItem 朋友圈视频下载项
|
||||
type SnsVideoDownloadItem struct {
|
||||
Seq uint32 // 代表第几个请求
|
||||
URL string // 视频加密地址
|
||||
RangeStart uint32 // 起始地址
|
||||
RangeEnd uint32 // 结束地址
|
||||
XSnsVideoFlag string // 视频标志
|
||||
CDNDns *wechat.CDNDnsInfo // DNS信息
|
||||
}
|
||||
|
||||
// SnsVideoUploadItem 朋友圈视频上传项
|
||||
type SnsVideoUploadItem struct {
|
||||
AesKey []byte // 加密用的AesKey
|
||||
Seq uint32 // 代表第几个请求
|
||||
VideoID uint32 // ID
|
||||
CreateTime uint32 // 创建时间
|
||||
VideoData []byte // 视频数据
|
||||
ThumbData []byte // ThumbData
|
||||
CDNDns *wechat.CDNDnsInfo // DNS信息
|
||||
}
|
||||
|
||||
// CdnImageDownloadRequest 高清图片下载请求
|
||||
type CdnImageDownloadRequest struct {
|
||||
Ver uint32
|
||||
WeiXinNum uint32
|
||||
Seq uint32
|
||||
ClientVersion uint32
|
||||
ClientOsType string
|
||||
AuthKey []byte
|
||||
NetType uint32
|
||||
AcceptDupack uint32
|
||||
RsaVer uint32
|
||||
RsaValue []byte
|
||||
FileType uint32
|
||||
WxChatType uint32
|
||||
FileID string
|
||||
LastRetCode uint32
|
||||
IPSeq uint32
|
||||
CliQuicFlag uint32
|
||||
WxMsgFlag *uint32
|
||||
WxAutoStart uint32
|
||||
DownPicFormat uint32
|
||||
Offset uint32
|
||||
LargesVideo uint32
|
||||
SourceFlag uint32
|
||||
}
|
||||
|
||||
// CdnDownloadResponse Cdn下载响应
|
||||
type CdnDownloadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
VideoFormat uint32
|
||||
RspPicFormat uint32
|
||||
RangeStart uint32
|
||||
RangeEnd uint32
|
||||
TotalSize uint32
|
||||
SrcSize uint32
|
||||
RetCode uint32
|
||||
SubStituteFType uint32
|
||||
RetrySec uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCdn uint32
|
||||
XClientIP string
|
||||
FileData []byte
|
||||
}
|
||||
|
||||
// CdnImageUploadRequest 高清图片上传请求
|
||||
type CdnImageUploadRequest struct {
|
||||
Ver uint32 // 1
|
||||
WeiXinNum uint32 //
|
||||
Seq uint32 // 6
|
||||
ClientVersion uint32
|
||||
ClientOsType string
|
||||
AuthKey []byte
|
||||
NetType uint32 // 1
|
||||
AcceptDupack uint32 // 1
|
||||
SafeProto uint32 // 1
|
||||
FileType uint32 // 2
|
||||
WxChatType uint32 // 1
|
||||
LastRetCode uint32 // 0
|
||||
IPSeq uint32 // 0
|
||||
CliQuicFlag uint32 // 0
|
||||
HasThumb uint32 // 1
|
||||
ToUser string // @cdn2_9887af1554e6f59f5e0489e399439cffe8fd07b9009032161122cee11c8537dd
|
||||
CompressType uint32 // 0
|
||||
NoCheckAesKey uint32 // 1
|
||||
EnableHit uint32 // 1
|
||||
ExistAnceCheck uint32 // 0
|
||||
AppType uint32 // 1
|
||||
FileKey string // wxupload_21533455325@chatroom29_1572079793
|
||||
TotalSize uint32 // 53440
|
||||
RawTotalSize uint32 // 53425
|
||||
LocalName string // 29.wxgf
|
||||
SessionBuf []byte // CDNUploadMsgImgPrepareRequest
|
||||
Offset uint32 // 0
|
||||
ThumbTotalSize uint32 // 4496
|
||||
RawThumbSize uint32 // 4487
|
||||
RawThumbMD5 string // 0d29df2b74d29efa46dd6fa1e75e71ba
|
||||
EncThumbCRC uint32 // 2991702343
|
||||
ThumbData []byte // 缩略图加密后数据
|
||||
LargesVideo uint32 // 0
|
||||
SourceFlag uint32 // 0
|
||||
AdVideoFlag uint32 // 0
|
||||
FileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
RawFileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
DataCheckSum uint32 // 737909102
|
||||
FileCRC uint32 // 2444306137
|
||||
SetOfPicFormat string // 001010
|
||||
FileData []byte // 文件数据
|
||||
}
|
||||
|
||||
// CdnVideoUploadRequest 视频上传请求
|
||||
type CdnVideoUploadRequest struct {
|
||||
Ver uint32
|
||||
WeiXinNum uint32
|
||||
Seq uint32
|
||||
ClientVersion uint32
|
||||
ClientOSType string
|
||||
AutoKey []byte
|
||||
NetType uint32
|
||||
AcceptDuPack uint32
|
||||
SafeProto uint32
|
||||
FileType uint32
|
||||
WeChatType uint32
|
||||
LastRetCode uint32
|
||||
IpSeq uint32
|
||||
HastHumb uint32
|
||||
ToUSerName string
|
||||
CompressType uint32
|
||||
NoCheckAesKey uint32
|
||||
EnaBleHit uint32
|
||||
ExistAnceCheck uint32
|
||||
AppType uint32
|
||||
FileKey string
|
||||
TotalSize uint32
|
||||
RawTotalSize uint32
|
||||
LocalName string
|
||||
Offset uint32
|
||||
ThumbTotalSize uint32
|
||||
RawThumbSize uint32
|
||||
RawThumbMd5 string
|
||||
EncThumbCrc uint32
|
||||
ThumbData []byte
|
||||
LargesVideo uint32
|
||||
SourceFlag uint32
|
||||
AdVideoFlag uint32
|
||||
Mp4identify string
|
||||
DropRateFlag uint32
|
||||
ClientRsaVer uint32
|
||||
ClientRsaVal []byte
|
||||
FileMd5 string
|
||||
RawFileMd5 string
|
||||
DataCheckSum uint32
|
||||
FileCrc uint32
|
||||
FileData []byte
|
||||
}
|
||||
|
||||
// CdnImageUploadResponse 高清图片上传响应
|
||||
type CdnImageUploadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
RetCode uint32
|
||||
FileKey string
|
||||
RecvLen uint32
|
||||
SKeyResp uint32
|
||||
SKeyBuf []byte
|
||||
FileID string
|
||||
ExistFlag uint32
|
||||
HitType uint32
|
||||
RetrySec uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCDN uint32
|
||||
XClientIP string
|
||||
CdnBigImgUrl string
|
||||
CdnMidImgUrl string
|
||||
CdnThumbImgUrl string // 缩略图 FileID
|
||||
}
|
||||
|
||||
// CdnSnsImageUploadRequest 朋友圈图片上传请求
|
||||
type CdnSnsImageUploadRequest struct {
|
||||
Ver uint32 // 1
|
||||
WeiXinNum uint32 //
|
||||
Seq uint32 // 6
|
||||
ClientVersion uint32
|
||||
ClientOsType string
|
||||
AuthKey []byte
|
||||
NetType uint32 // 1
|
||||
AcceptDupack uint32 // 1
|
||||
RsaVer uint32 // 1
|
||||
RsaValue []byte
|
||||
FileType uint32 // 2
|
||||
WxChatType uint32 // 1
|
||||
LastRetCode uint32 // 0
|
||||
IPSeq uint32 // 0
|
||||
CliQuicFlag uint32 // 0
|
||||
HasThumb uint32 // 1
|
||||
ToUser string // @cdn2_9887af1554e6f59f5e0489e399439cffe8fd07b9009032161122cee11c8537dd
|
||||
CompressType uint32 // 0
|
||||
NoCheckAesKey uint32 // 1
|
||||
EnableHit uint32 // 1
|
||||
ExistAnceCheck uint32 // 0
|
||||
AppType uint32 // 1
|
||||
FileKey string // wxupload_21533455325@chatroom29_1572079793
|
||||
TotalSize uint32 // 53440
|
||||
RawTotalSize uint32 // 53425
|
||||
LocalName string // 29.wxgf
|
||||
Offset uint32 // 0
|
||||
ThumbTotalSize uint32 // 4496
|
||||
RawThumbSize uint32 // 4487
|
||||
RawThumbMD5 string // 0d29df2b74d29efa46dd6fa1e75e71ba
|
||||
ThumbCRC uint32 // 2991702343
|
||||
LargesVideo uint32 // 0
|
||||
SourceFlag uint32 // 0
|
||||
AdVideoFlag uint32 // 0
|
||||
FileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
RawFileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
DataCheckSum uint32 // 737909102
|
||||
FileCRC uint32 // 2444306137
|
||||
FileData []byte // 文件数据
|
||||
}
|
||||
|
||||
// CdnSnsImageUploadResponse 高清图片上传响应
|
||||
type CdnSnsImageUploadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
RetCode uint32
|
||||
FileKey string
|
||||
RecvLen uint32
|
||||
FileURL string
|
||||
ThumbURL string
|
||||
EnableQuic uint32
|
||||
RetrySec uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCDN uint32
|
||||
XClientIP string
|
||||
ImageMD5 string
|
||||
ImageWidth uint32
|
||||
ImageHeight uint32
|
||||
}
|
||||
|
||||
// CdnSnsVideoDownloadRequest 朋友圈视频下载请求
|
||||
type CdnSnsVideoDownloadRequest struct {
|
||||
Ver uint32
|
||||
WeiXinNum uint32
|
||||
Seq uint32
|
||||
ClientVersion uint32
|
||||
ClientOsType string
|
||||
AuthKey []byte
|
||||
NetType uint32
|
||||
AcceptDupack uint32
|
||||
Signal string
|
||||
Scene string
|
||||
URL string
|
||||
RangeStart uint32
|
||||
RangeEnd uint32
|
||||
LastRetCode uint32
|
||||
IPSeq uint32
|
||||
RedirectType uint32
|
||||
LastVideoFormat uint32
|
||||
VideoFormat uint32
|
||||
XSnsVideoFlag string
|
||||
}
|
||||
|
||||
// CdnSnsVideoDownloadResponse 朋友圈视频下载响应
|
||||
type CdnSnsVideoDownloadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
RangeStart uint32
|
||||
RangeEnd uint32
|
||||
TotalSize uint32
|
||||
RetCode uint32
|
||||
EnableQuic uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCdn uint32
|
||||
XClientIP string
|
||||
XSnsVideoFlag string
|
||||
XSnsVideoTicket string
|
||||
XEncFlag uint32
|
||||
XEncLen uint32
|
||||
FileData []byte
|
||||
}
|
||||
|
||||
// CdnSnsVideoUploadRequest 朋友圈视频上传请求
|
||||
type CdnSnsVideoUploadRequest struct {
|
||||
Ver uint32 // 1
|
||||
WeiXinNum uint32 //
|
||||
Seq uint32 // 6
|
||||
ClientVersion uint32
|
||||
ClientOsType string
|
||||
AuthKey []byte
|
||||
NetType uint32 // 1
|
||||
AcceptDupack uint32 // 1
|
||||
RsaVer uint32 // 1
|
||||
RsaValue []byte
|
||||
FileType uint32 // 2
|
||||
WxChatType uint32 // 1
|
||||
LastRetCode uint32 // 0
|
||||
IPSeq uint32 // 0
|
||||
CliQuicFlag uint32 // 0
|
||||
HasThumb uint32 // 1
|
||||
NoCheckAesKey uint32 // 1
|
||||
EnableHit uint32 // 1
|
||||
ExistAnceCheck uint32 // 0
|
||||
AppType uint32 // 1
|
||||
FileKey string // wxupload_21533455325@chatroom29_1572079793
|
||||
TotalSize uint32 // 53440
|
||||
RawTotalSize uint32 // 53425
|
||||
LocalName string // 29.wxgf
|
||||
Offset uint32 // 0
|
||||
ThumbTotalSize uint32 // 4496
|
||||
RawThumbSize uint32 // 4487
|
||||
RawThumbMD5 string // 0d29df2b74d29efa46dd6fa1e75e71ba
|
||||
ThumbCRC uint32 // 2991702343
|
||||
IsStoreVideo uint32
|
||||
ThumbData []byte
|
||||
LargesVideo uint32 // 0
|
||||
SourceFlag uint32 // 0
|
||||
AdVideoFlag uint32 // 0
|
||||
Mp4Identify string
|
||||
FileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
RawFileMD5 string // e851e118f524b4219928bed3f3bd0d24
|
||||
DataCheckSum uint32 // 737909102
|
||||
FileCRC uint32 // 2444306137
|
||||
FileData []byte // 文件数据
|
||||
UserLargeFileApi bool
|
||||
}
|
||||
|
||||
// CdnSnsVideoUploadResponse 上传朋友圈视频响应
|
||||
type CdnSnsVideoUploadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
RetCode uint32
|
||||
FileKey string
|
||||
RecvLen uint32
|
||||
FileURL string
|
||||
ThumbURL string
|
||||
FileID string
|
||||
EnableQuic uint32
|
||||
RetrySec uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCDN uint32
|
||||
XClientIP string
|
||||
ReqData *CdnSnsVideoUploadRequest
|
||||
}
|
||||
|
||||
// CdnMsgVideoUploadResponse 上传视频
|
||||
type CdnMsgVideoUploadResponse struct {
|
||||
Ver uint32
|
||||
Seq uint32
|
||||
RetCode uint32
|
||||
FileKey string
|
||||
RecvLen uint32
|
||||
FileURL string
|
||||
ThumbURL string
|
||||
FileID string
|
||||
EnableQuic uint32
|
||||
RetrySec uint32
|
||||
IsRetry uint32
|
||||
IsOverLoad uint32
|
||||
IsGetCDN uint32
|
||||
XClientIP string
|
||||
FileAesKey string
|
||||
ThumbDataSize uint32
|
||||
VideoDataSize uint32
|
||||
VideoDataMD5 string
|
||||
Mp4identify string
|
||||
ThumbWidth uint32
|
||||
ThumbHeight uint32
|
||||
ReqData *CdnVideoUploadRequest
|
||||
}
|
||||
@@ -0,0 +1,751 @@
|
||||
package baseinfo
|
||||
|
||||
type GetA8KeyType uint32
|
||||
|
||||
const (
|
||||
GetA8Key GetA8KeyType = 1
|
||||
ThrIdGetA8Key GetA8KeyType = 2
|
||||
)
|
||||
|
||||
const (
|
||||
// ERR_SERVER_FILE_EXPIRED int32 = -5103059
|
||||
// MM_ERR_FORCE_QUIT int32 = -999999
|
||||
// MM_ERR_CLIENT int32 = -800000
|
||||
// MM_ERR_CHATROOM_PARTIAL_INVITE int32 = -2013
|
||||
// MM_ERR_CHATROOM_NEED_INVITE int32 = -2012
|
||||
// MM_ERR_CONNECT_INFO_URL_INVALID int32 = -2011
|
||||
// MM_ERR_CLIDB_ENCRYPT_KEYINFO_INVALID int32 = -2010
|
||||
// MM_ERR_LOGIN_URL_DEVICE_UNSAFE int32 = -2009
|
||||
// MM_ERR_COOKIE_KICK int32 = -2008
|
||||
// MM_ERR_LOGIN_QRCODE_UUID_EXPIRED int32 = -2007
|
||||
// MM_ERR_KEYBUF_INVALID int32 = -2006
|
||||
// MM_ERR_FORCE_REDIRECT int32 = -2005
|
||||
// MM_ERR_QRCODEVERIFY_BANBYEXPOSE int32 = -2004
|
||||
// MM_ERR_SHAKEBANBYEXPOSE int32 = -2003
|
||||
// MM_ERR_BOTTLEBANBYEXPOSE int32 = -2002
|
||||
// MM_ERR_LBSBANBYEXPOSE int32 = -2001
|
||||
// MM_ERR_LBSDATANOTFOUND int32 = -2000
|
||||
// MM_ERR_IMG_READ int32 = -1005
|
||||
// MM_ERR_FACING_CREATECHATROOM_RETRY int32 = -432
|
||||
// MM_ERR_RADAR_PASSWORD_SIMPLE int32 = -431
|
||||
// MM_ERR_REVOKEMSG_TIMEOUT int32 = -430
|
||||
// MM_ERR_FAV_ALREADY int32 = -400
|
||||
// MM_ERR_FILE_EXPIRED int32 = -352
|
||||
// MM_ERR_USER_NOT_VERIFYUSER int32 = -302
|
||||
|
||||
//MMErrIdcRedirect MMErrIdcRedirect
|
||||
MMErrIdcRedirect int32 = -301
|
||||
|
||||
//MMErrChangeKey
|
||||
MMErrChangeKey int32 = -305
|
||||
|
||||
//MMErrDropped 用户主动退出或者服务器T下线
|
||||
MMErrDropped int32 = -2023
|
||||
|
||||
// MM_ERR_REG_BUT_LOGIN int32 = -212
|
||||
// MM_ERR_UNBIND_MAIN_ACCT int32 = -206
|
||||
// MM_ERR_QQ_OK_NEED_MOBILE int32 = -205
|
||||
// MM_ERR_OTHER_MAIN_ACCT int32 = -204
|
||||
// MM_ERR_NODATA int32 = -203
|
||||
// MM_ERR_UNBIND_MOBILE_NEED_QQPWD int32 = -202
|
||||
// MM_ERR_QQ_BAN int32 = -201
|
||||
// MM_ERR_ACCOUNT_BAN int32 = -200
|
||||
// MM_ERR_QA_RELATION int32 = -153
|
||||
// MM_ERR_NO_QUESTION int32 = -152
|
||||
// MM_ERR_QUESTION_COUNT int32 = -151
|
||||
// MM_ERR_ANSWER_COUNT int32 = -150
|
||||
// MM_ERR_EMAIL_FORMAT int32 = -111
|
||||
// MM_ERR_BLOCK_BY_SPAM int32 = -106
|
||||
// MM_ERR_CERT_EXPIRED 类型:证书已过期,需要切换密钥
|
||||
MM_ERR_CERT_EXPIRED int32 = -102
|
||||
// MM_ERR_NO_RETRY int32 = -101
|
||||
// MM_ERR_AUTH_ANOTHERPLACE int32 = -100
|
||||
// MM_ERR_USER_NOT_SUPPORT int32 = -94
|
||||
// MM_ERR_SHAKE_TRAN_IMG_OTHER int32 = -93
|
||||
// MM_ERR_SHAKE_TRAN_IMG_CONTINUE int32 = -92
|
||||
// MM_ERR_SHAKE_TRAN_IMG_NOTFOUND int32 = -91
|
||||
// MM_ERR_SHAKE_TRAN_IMG_CANCEL int32 = -90
|
||||
// MM_ERR_BIZ_FANS_LIMITED int32 = -87
|
||||
// MM_ERR_BIND_EMAIL_SAME_AS_QMAIL int32 = -86
|
||||
// MM_ERR_BINDED_BY_OTHER int32 = -85
|
||||
// MM_ERR_HAS_BINDED int32 = -84
|
||||
// MM_ERR_HAS_UNBINDED int32 = -83
|
||||
// MM_ERR_ONE_BINDTYPE_LEFT int32 = -82
|
||||
// MM_ERR_NOTBINDQQ int32 = -81
|
||||
// MM_ERR_WEIBO_PUSH_TRANS int32 = -80
|
||||
// MM_ERR_NEW_USER int32 = -79
|
||||
// MM_ERR_SVR_MOBILE_FORMAT int32 = -78
|
||||
// MM_ERR_WRONG_SESSION_KEY int32 = -77
|
||||
// MM_ERR_UUID_BINDED int32 = -76
|
||||
// MM_ERR_ALPHA_FORBIDDEN int32 = -75
|
||||
// MM_ERR_MOBILE_NEEDADJUST int32 = -74
|
||||
// MM_ERR_TRYQQPWD int32 = -73
|
||||
// MM_ERR_NICEQQ_EXPIRED int32 = -72
|
||||
// MM_ERR_TOLIST_LIMITED int32 = -71
|
||||
// MM_ERR_GETMFRIEND_NOT_READY int32 = -70
|
||||
// MM_ERR_BIGBIZ_AUTH int32 = -69
|
||||
// MM_FACEBOOK_ACCESSTOKEN_UNVALID int32 = -68
|
||||
// MM_ERR_HAVE_BIND_FACEBOOK int32 = -67
|
||||
// MM_ERR_IS_NOT_OWNER int32 = -66
|
||||
// MM_ERR_UNBIND_REGBYMOBILE int32 = -65
|
||||
// MM_ERR_PARSE_MAIL int32 = -64
|
||||
// MM_ERR_GMAIL_IMAP int32 = -63
|
||||
// MM_ERR_GMAIL_WEBLOGIN int32 = -62
|
||||
// MM_ERR_GMAIL_ONLINELIMITE int32 = -61
|
||||
// MM_ERR_GMAIL_PWD int32 = -60
|
||||
// MM_ERR_UNSUPPORT_COUNTRY int32 = -59
|
||||
// MM_ERR_PICKBOTTLE_NOBOTTLE int32 = -58
|
||||
// MM_ERR_SEND_VERIFYCODE int32 = -57
|
||||
// MM_ERR_NO_BOTTLECOUNT int32 = -56
|
||||
// MM_ERR_NO_HDHEADIMG int32 = -55
|
||||
// MM_ERR_INVALID_HDHEADIMG_REQ_TOTAL_LEN int32 = -54
|
||||
// MM_ERR_HAS_NO_HEADIMG int32 = -53
|
||||
// MM_ERR_INVALID_GROUPCARD_CONTACT int32 = -52
|
||||
// MM_ERR_VERIFYCODE_NOTEXIST int32 = -51
|
||||
// MM_ERR_BINDUIN_BINDED int32 = -50
|
||||
// MM_ERR_NEED_QQPWD int32 = -49
|
||||
// MM_ERR_TICKET_NOTFOUND int32 = -48
|
||||
// MM_ERR_TICKET_UNMATCH int32 = -47
|
||||
// MM_ERR_NOTQQCONTACT int32 = -46
|
||||
// MM_ERR_BATCHGETCONTACTPROFILE_MODE int32 = -45
|
||||
// MM_ERR_NEED_VERIFY_USER int32 = -44
|
||||
// MM_ERR_USER_BIND_MOBILE int32 = -43
|
||||
// MM_ERR_USER_MOBILE_UNMATCH int32 = -42
|
||||
// MM_ERR_MOBILE_FORMAT int32 = -41
|
||||
// MM_ERR_UNMATCH_MOBILE int32 = -40
|
||||
// MM_ERR_MOBILE_NULL int32 = -39
|
||||
// MM_ERR_INVALID_UPLOADMCONTACT_OPMODE int32 = -38
|
||||
// MM_ERR_INVALID_BIND_OPMODE int32 = -37
|
||||
// MM_ERR_MOBILE_UNBINDED int32 = -36
|
||||
// MM_ERR_MOBILE_BINDED int32 = -35
|
||||
// MM_ERR_FREQ_LIMITED int32 = -34
|
||||
// MM_ERR_VERIFYCODE_TIMEOUT int32 = -33
|
||||
// MM_ERR_VERIFYCODE_UNMATCH int32 = -32
|
||||
// MM_ERR_NEEDSECONDPWD int32 = -31
|
||||
// MM_ERR_NEEDREG int32 = -30
|
||||
// MM_ERR_OIDBTIMEOUT int32 = -29
|
||||
// MM_ERR_BADEMAIL int32 = -28
|
||||
// MM_ERR_DOMAINDISABLE int32 = -27
|
||||
// MM_ERR_DOMAINMAXLIMITED int32 = -26
|
||||
// MM_ERR_DOMAINVERIFIED int32 = -25
|
||||
// MM_ERR_SPAM int32 = -24
|
||||
// MM_ERR_MEMBER_TOOMUCH int32 = -23
|
||||
// MM_ERR_BLACKLIST int32 = -22
|
||||
// MM_ERR_NOTCHATROOMCONTACT int32 = -21
|
||||
// MM_ERR_NOTMICROBLOGCONTACT int32 = -20
|
||||
// MM_ERR_NOTOPENPRIVATEMSG int32 = -19
|
||||
// MM_ERR_NOUPDATEINFO int32 = -18
|
||||
// MM_ERR_RECOMMENDEDUPDATE int32 = -17
|
||||
// MM_ERR_CRITICALUPDATE int32 = -16
|
||||
// MM_ERR_NICKNAMEINVALID int32 = -15
|
||||
// MM_ERR_USERNAMEINVALID int32 = -14
|
||||
|
||||
//MMErrSessionTimeOut session超时,可能是由于手机端主动终止授权导致的
|
||||
MMErrSessionTimeOut int32 = -13
|
||||
|
||||
// MM_ERR_UINEXIST int32 = -12
|
||||
// MM_ERR_NICKRESERVED int32 = -11
|
||||
// MM_ERR_USERRESERVED int32 = -10
|
||||
// MM_ERR_EMAILNOTVERIFY int32 = -9
|
||||
// MM_ERR_EMAILEXIST int32 = -8
|
||||
// MM_ERR_USEREXIST int32 = -7
|
||||
// MM_ERR_NEED_VERIFY int32 = -6
|
||||
// MM_ERR_ACCESS_DENIED int32 = -5
|
||||
// MM_ERR_NOUSER int32 = -4
|
||||
// MM_ERR_PASSWORD int32 = -3
|
||||
// MM_ERR_ARG int32 = -2
|
||||
// MM_ERR_SYS int32 = -1
|
||||
|
||||
//CFatalError 致命错误
|
||||
CFatalError int32 = -100000000
|
||||
//CHttpError http错误
|
||||
CHttpError int32 = -100000001
|
||||
//CProtoError proto错误
|
||||
CProtoError int32 = -100000002
|
||||
//CParseResponseDataError 数据解析错误
|
||||
CParseResponseDataError int32 = -10000003
|
||||
|
||||
//MMOk MMOk
|
||||
MMOk int32 = 0
|
||||
// MM_BOTTLE_ERR_UNKNOWNTYPE int32 = 15
|
||||
// MM_BOTTLE_COUNT_ERR int32 = 16
|
||||
// MM_BOTTLE_NOTEXIT int32 = 17
|
||||
// MM_BOTTLE_UINNOTMATCH int32 = 18
|
||||
// MM_BOTTLE_PICKCOUNTINVALID int32 = 19
|
||||
// MMSNS_RET_SPAM int32 = 201
|
||||
// MMSNS_RET_BAN int32 = 202
|
||||
// MMSNS_RET_PRIVACY int32 = 203
|
||||
// MMSNS_RET_COMMENT_HAVE_LIKE int32 = 204
|
||||
// MMSNS_RET_COMMENT_NOT_ALLOW int32 = 205
|
||||
// MMSNS_RET_CLIENTID_EXIST int32 = 206
|
||||
// MMSNS_RET_ISALL int32 = 207
|
||||
// MMSNS_RET_COMMENT_PRIVACY int32 = 208
|
||||
// MM_ERR_SHORTVIDEO_CANCEL int32 = 1000000
|
||||
|
||||
//-----------------------------
|
||||
|
||||
//CmdInvalid CmdInvalid
|
||||
CmdInvalid uint32 = 0
|
||||
//CmdIDModUserInfo 用户详情
|
||||
CmdIDModUserInfo uint32 = 1
|
||||
//CmdIDModContact CmdIdModContact
|
||||
CmdIDModContact uint32 = 2
|
||||
//CmdIDDelContact CmdIdDelContact
|
||||
CmdIDDelContact uint32 = 4
|
||||
//CmdIDAddMsg CmdIdAddMsg
|
||||
CmdIDAddMsg uint32 = 5
|
||||
//CmdIDModMsgStatus CmdIdModMsgStatus
|
||||
CmdIDModMsgStatus uint32 = 6
|
||||
//CmdIDDelChatContact CmdIdDelChatContact
|
||||
CmdIDDelChatContact uint32 = 7
|
||||
//CmdIDDelContactMsg CmdIdDelContactMsg
|
||||
CmdIDDelContactMsg uint32 = 8
|
||||
//CmdIDDelMsg CmdIdDelMsg
|
||||
CmdIDDelMsg uint32 = 9
|
||||
//CmdIDReport CmdIdReport
|
||||
CmdIDReport uint32 = 10
|
||||
//CmdIDOpenQQMicroBlog CmdIdOpenQQMicroBlog
|
||||
CmdIDOpenQQMicroBlog uint32 = 11
|
||||
//CmdIDCloseMicroBlog CmdIdCloseMicroBlog
|
||||
CmdIDCloseMicroBlog uint32 = 12
|
||||
//CmdIDModMicroBlog CmdIdModMicroBlog
|
||||
CmdIDModMicroBlog uint32 = 13
|
||||
//CmdIDModNotifyStatus CmdIdModNotifyStatus
|
||||
CmdIDModNotifyStatus uint32 = 14
|
||||
//CmdIDModChatRoomMember CmdIdModChatRoomMember
|
||||
CmdIDModChatRoomMember uint32 = 15
|
||||
//CmdIDQuitChatRoom CmdIdQuitChatRoom
|
||||
CmdIDQuitChatRoom uint32 = 16
|
||||
//CmdIDModContactDomainEmail CmdIdModContactDomainEmail
|
||||
CmdIDModContactDomainEmail uint32 = 17
|
||||
//CmdIDModUserDomainEmail CmdIdModUserDomainEmail
|
||||
CmdIDModUserDomainEmail uint32 = 18
|
||||
//CmdIDDelUserDomainEmail CmdIdDelUserDomainEmail
|
||||
CmdIDDelUserDomainEmail uint32 = 19
|
||||
//CmdIDModChatRoomNotify CmdIdModChatRoomNotify
|
||||
CmdIDModChatRoomNotify uint32 = 20
|
||||
//CmdIDPossibleFriend CmdIdPossibleFriend
|
||||
CmdIDPossibleFriend uint32 = 21
|
||||
//CmdIDInviteFriendOpen CmdIdInviteFriendOpen
|
||||
CmdIDInviteFriendOpen uint32 = 22
|
||||
//CmdIDFunctionSwitch CmdIdFunctionSwitch
|
||||
CmdIDFunctionSwitch uint32 = 23
|
||||
//CmdIDModQContact CmdIdModQContact
|
||||
CmdIDModQContact uint32 = 24
|
||||
//CmdIDModTContact CmdIdModTContact
|
||||
CmdIDModTContact uint32 = 25
|
||||
//CmdIDPsmStat CmdIdPsmStat
|
||||
CmdIDPsmStat uint32 = 26
|
||||
//CmdIDModChatRoomTopic CmdIdModChatRoomTopic
|
||||
CmdIDModChatRoomTopic uint32 = 27
|
||||
// MM_SYNCCMD_UPDATESTAT uint32 = 30
|
||||
// MM_SYNCCMD_MODDISTURBSETTING uint32 = 31
|
||||
// MM_SYNCCMD_DELETEBOTTLE uint32 = 32
|
||||
// MM_SYNCCMD_MODBOTTLECONTACT uint32 = 33
|
||||
// MM_SYNCCMD_DELBOTTLECONTACT uint32 = 34
|
||||
|
||||
//CmdIDModUserImg 用户图像?
|
||||
CmdIDModUserImg uint32 = 35
|
||||
// MM_SYNCCMD_MODUSERIMG uint32 = 35
|
||||
// MM_SYNCCMD_KVSTAT uint32 = 36
|
||||
// NN_SYNCCMD_THEMESTAT uint32 = 37
|
||||
|
||||
//CmdIDUserInfoExt 用户扩展数据
|
||||
CmdIDUserInfoExt uint32 = 44
|
||||
// MM_SYNCCMD_USERINFOEXT uint32 = 44
|
||||
|
||||
// MMSnsSyncCmdObject 朋友圈同步到的对象
|
||||
MMSnsSyncCmdObject uint32 = 45
|
||||
|
||||
// MM_SNS_SYNCCMD_ACTION uint32 = 46
|
||||
// MM_SYNCCMD_BRAND_SETTING uint32 = 47
|
||||
// MM_SYNCCMD_MODCHATROOMMEMBERDISPLAYNAME uint32 = 48
|
||||
// MM_SYNCCMD_MODCHATROOMMEMBERFLAG uint32 = 49
|
||||
// MM_SYNCCMD_WEBWXFUNCTIONSWITCH uint32 = 50
|
||||
// MM_SYNCCMD_MODSNSUSERINFO uint32 = 51
|
||||
// MM_SYNCCMD_MODSNSBLACKLIST uint32 = 52
|
||||
// MM_SYNCCMD_NEWDELMSG uint32 = 53
|
||||
// MM_SYNCCMD_MODDESCRIPTION uint32 = 54
|
||||
// MM_SYNCCMD_KVCMD uint32 = 55
|
||||
// MM_SYNCCMD_DELETE_SNS_OLDGROUP uint32 = 56
|
||||
|
||||
// CmdIdMax uint32 = 201
|
||||
// MM_GAME_SYNCCMD_ADDMSG uint32 = 201
|
||||
|
||||
//MMLoginUnknow MMLoginUnknow
|
||||
MMLoginUnknow int32 = -2
|
||||
//MMLoginError MMLoginError
|
||||
MMLoginError int32 = -1
|
||||
//MMLoginSuccess MMLoginSuccess
|
||||
MMLoginSuccess int32 = 0
|
||||
//MMLoginRedirect MMLoginRedirect
|
||||
MMLoginRedirect int32 = 1
|
||||
|
||||
//MMAddFriendNoVerify 好友校验类型-不需要验证
|
||||
MMAddFriendNoVerify uint32 = 1
|
||||
//MMAddFriendWithVerify 好友校验类型-需要验证
|
||||
MMAddFriendWithVerify uint32 = 2
|
||||
//MMAddFriendAccept 通过好友验证
|
||||
MMAddFriendAccept uint32 = 3
|
||||
|
||||
// MMAddFiendFromQQ 好友来源-QQ
|
||||
MMAddFiendFromQQ byte = 1
|
||||
// MMAddFiendFromMail 好友来源-邮箱
|
||||
MMAddFiendFromMail byte = 2
|
||||
// MMAddFiendFromWxName 好友来源-微信号
|
||||
MMAddFiendFromWxName byte = 3
|
||||
// MMAddFiendFromAddressBook 好友来源-通讯录
|
||||
MMAddFiendFromAddressBook byte = 13
|
||||
// MMAddFiendFromChatRoom 好友来源-群
|
||||
MMAddFiendFromChatRoom byte = 14
|
||||
// MMAddFiendFromPhone 好友来源-手机号
|
||||
MMAddFiendFromPhone byte = 15
|
||||
// MMAddFiendFromNear 好友来源-附近的人
|
||||
MMAddFiendFromNear byte = 18
|
||||
// MMAddFiendFromBottle 好友来源-漂流瓶
|
||||
MMAddFiendFromBottle byte = 25
|
||||
// MMAddFiendFromShake 好友来源-摇一摇
|
||||
MMAddFiendFromShake byte = 29
|
||||
// MMAddFiendFromQrcode 好友来源-二维码
|
||||
MMAddFiendFromQrcode byte = 30
|
||||
|
||||
// MMVerifyUserErrPrivate 对方为私有设置 添加失败
|
||||
MMVerifyUserErrPrivate int32 = -2
|
||||
// MMVerifyUserErrNeedVerify 添加好友需要发送验证信息
|
||||
MMVerifyUserErrNeedVerify int32 = -44
|
||||
|
||||
// ModUserSexMale 用户性别-男
|
||||
ModUserSexMale uint32 = 1
|
||||
// ModUserSexFemale 用户性别-女
|
||||
ModUserSexFemale uint32 = 2
|
||||
|
||||
// MMStatusNotifyMarkChatRead 标记某个联系人或群聊的消息已读
|
||||
MMStatusNotifyMarkChatRead uint32 = 1
|
||||
// MMStatusNotifyEnterChat 进入聊天房间(联系人或群聊)
|
||||
MMStatusNotifyEnterChat uint32 = 2
|
||||
// MMStatusNotifyGetChatList 第一次登陆时获取 聊天项列表
|
||||
MMStatusNotifyGetChatList uint32 = 3
|
||||
// MMStatusNotifyGetAllChat 获取所有聊天项
|
||||
MMStatusNotifyGetAllChat uint32 = 4
|
||||
// MMStatusNotifyQuitChat 关闭微信
|
||||
MMStatusNotifyQuitChat uint32 = 5
|
||||
// MMStatusNotifyWechatResume 微信从后台 切换到 最前面
|
||||
MMStatusNotifyWechatResume uint32 = 7
|
||||
// MMStatusNotifyWechatToBackground 切换到后台
|
||||
MMStatusNotifyWechatToBackground uint32 = 8
|
||||
// MMStatusNotifyMark 标记 语音消息,朋友圈等状态
|
||||
MMStatusNotifyMark uint32 = 9
|
||||
|
||||
// MMSnsOpCodeDelete 删除朋友圈
|
||||
MMSnsOpCodeDelete uint32 = 1
|
||||
// MMSnsOpCodeSetPrivate 设置朋友圈为私密文字(仅自己可见)
|
||||
MMSnsOpCodeSetPrivate uint32 = 2
|
||||
// MMSnsOpCodeSetPublic 设置朋友圈为公开信息(所有人可见)
|
||||
MMSnsOpCodeSetPublic uint32 = 3
|
||||
// MMSnsOpCodeDeleteComment 删除评论
|
||||
MMSnsOpCodeDeleteComment uint32 = 4
|
||||
// MMSnsOpCodeUnLike 取消点赞
|
||||
MMSnsOpCodeUnLike uint32 = 5
|
||||
|
||||
// MMSnsCommentTypeLike 点赞
|
||||
MMSnsCommentTypeLike uint32 = 1
|
||||
// MMSnsCommentTypeComment 发表评论
|
||||
MMSnsCommentTypeComment uint32 = 2
|
||||
|
||||
// MMSnsPrivacyPublic 朋友圈状态:公开
|
||||
MMSnsPrivacyPublic uint32 = 0
|
||||
// MMSnsPrivacyPrivate 朋友圈状态:不公开可指定好友可见
|
||||
MMSnsPrivacyPrivate uint32 = 1
|
||||
|
||||
// MMSNSContentStyleImgAndText 图文朋友圈
|
||||
MMSNSContentStyleImgAndText uint32 = 1
|
||||
// MMSNSContentStyleText 文本朋友圈
|
||||
MMSNSContentStyleText uint32 = 2
|
||||
// MMSNSContentStyleRefer 引用
|
||||
MMSNSContentStyleRefer uint32 = 3
|
||||
// MMSNSContentStyleVideo 微信小视频
|
||||
MMSNSContentStyleVideo uint32 = 15
|
||||
|
||||
// MMSNSMediaTypeImage 类型为图片
|
||||
MMSNSMediaTypeImage uint32 = 2
|
||||
// MMSNSMediaTypeVideo 类型为视频
|
||||
MMSNSMediaTypeVideo uint32 = 6
|
||||
// 视频号
|
||||
MMSNSMediaTypeVideoNum uint32 = 4
|
||||
|
||||
// MMCdnDownMediaTypeImage Cdn下载类型:图片
|
||||
MMCdnDownMediaTypeImage uint32 = 2
|
||||
// MMCdnDownMediaTypeVedioImage Cdn下载类型:视频封面图片
|
||||
MMCdnDownMediaTypeVedioImage uint32 = 3
|
||||
// MMCdnDownMediaTypeVedio Cdn下载类型:视频
|
||||
MMCdnDownMediaTypeVedio uint32 = 4
|
||||
|
||||
// MMHeadDeviceTypeIpadUniversal IpadUniversal类型 0d 13 0f 15
|
||||
MMHeadDeviceTypeIpadUniversal byte = 0x0d
|
||||
// MMHeadDeviceTypeIpadOthers 其它iPad类型
|
||||
MMHeadDeviceTypeIpadOthers byte = 0x01
|
||||
|
||||
// MMAppRunStateNormal App在前面正常运行
|
||||
MMAppRunStateNormal byte = 0xff
|
||||
// MMAppRunStateBackgroundRun App在后台运行
|
||||
MMAppRunStateBackgroundRun byte = 0xfe
|
||||
// MMAppRunStateBackgroundWillSuspend App在后台将要暂停运行
|
||||
MMAppRunStateBackgroundWillSuspend byte = 0xf6
|
||||
|
||||
// MMPackDataTypeCompressed 打包数据类型:压缩
|
||||
MMPackDataTypeCompressed byte = 1
|
||||
// MMPackDataTypeUnCompressed 打包类型:未压缩
|
||||
MMPackDataTypeUnCompressed byte = 2
|
||||
|
||||
// MMSyncSceneTypeApnsNotify 同步场景:收到苹果推送/长链接推送同步通知(长链接)
|
||||
MMSyncSceneTypeApnsNotify uint32 = 1
|
||||
// MMSyncSceneTypeOnTokenLogin 同步场景:二次登陆
|
||||
MMSyncSceneTypeOnTokenLogin uint32 = 2
|
||||
// MMSyncSceneTypeBackGroundToForeGround 同步场景:后台切换到前台
|
||||
MMSyncSceneTypeBackGroundToForeGround uint32 = 3
|
||||
// MMSyncSceneTypeProcessStart 同步场景:进程开始
|
||||
MMSyncSceneTypeProcessStart uint32 = 4
|
||||
// MMSyncSceneTypeNeed 同步场景:需要同步
|
||||
MMSyncSceneTypeNeed uint32 = 7
|
||||
// MMSyncSceneTypeAfterManualAuthNotify 同步场景:扫码登陆后收到的同步通知
|
||||
MMSyncSceneTypeAfterManualAuthNotify uint32 = 10
|
||||
// MMSyncSceneTypeVOIPPushAwakeOld 同步场景:语音推送唤醒(老版本)
|
||||
MMSyncSceneTypeVOIPPushAwakeOld uint32 = 13
|
||||
// MMSyncSceneTypeVOIPPushAwake 同步场景:语音推送唤醒
|
||||
MMSyncSceneTypeVOIPPushAwake uint32 = 15
|
||||
// MMSyncSceneTypeSlientPushAwake 同步场景:静默推送唤醒
|
||||
MMSyncSceneTypeSlientPushAwake uint32 = 16
|
||||
|
||||
// MMSyncMsgDigestTypeLongLink 长链接同步
|
||||
MMSyncMsgDigestTypeLongLink uint32 = 0
|
||||
// MMSyncMsgDigestTypeShortLink 短链接同步
|
||||
MMSyncMsgDigestTypeShortLink uint32 = 1
|
||||
|
||||
// MMUUIDTypeUnArchive 设备UUID类型:未存档的,新的设备
|
||||
MMUUIDTypeUnArchive int = 1
|
||||
// MMUUIDTypeArchive 设备UUID类型:存档过的,使用过微信的设备
|
||||
MMUUIDTypeArchive int = 2
|
||||
)
|
||||
|
||||
const (
|
||||
// MMRequestTypeForwardCdnImage 转发cdn图
|
||||
MMRequestTypeForwardCdnImage uint32 = 110
|
||||
// MMRequestTypeForwardCdnVideo
|
||||
MMRequestTypeForwardCdnVideo uint32 = 110
|
||||
// MMRequestTypeSearchContact 类型:搜索联系人
|
||||
MMRequestTypeSearchContact uint32 = 106
|
||||
// MMRequestTypeUploadMsgImg 类型:发送图片
|
||||
MMRequestTypeUploadMsgImg uint32 = 110
|
||||
// MMRequestTypeCreateChatRoom 类型:创建群聊
|
||||
MMRequestTypeCreateChatRoom uint32 = 119
|
||||
// MMRequestTypeAddChatRoomMember 类型:邀请好友进群
|
||||
MMRequestTypeAddChatRoomMember uint32 = 120
|
||||
// MMRequestTypeUploadVoice 类型:发送语音
|
||||
MMRequestTypeUploadVoice uint32 = 127
|
||||
MMRequestTypeUploadVoiceNew uint32 = 329
|
||||
// MMRequestTypeDownloadVoice 类型:下载语音
|
||||
MMRequestTypeDownloadVoice uint32 = 128
|
||||
// MMRequestTypeUploadMContact 类型:上传通讯录
|
||||
MMRequestTypeUploadMContact uint32 = 133
|
||||
// MMRequestTypeVerifyUser 类型:添加/验证好友
|
||||
MMRequestTypeVerifyUser uint32 = 137
|
||||
// MMRequestTypeNewSync 类型:同步消息
|
||||
MMRequestTypeNewSync uint32 = 138
|
||||
// MMRequestTypeNewInit 类型:首次登录初始化
|
||||
MMRequestTypeNewInit uint32 = 139
|
||||
// MMRequestTypeGetMFriend 类型获取手机通讯录好友
|
||||
MMRequestTypeGetMFriend uint32 = 142
|
||||
// MMRequestTypeUploadHDHeadImg 类型:上传头像
|
||||
MMRequestTypeUploadHDHeadImg uint32 = 157
|
||||
// MMRequestTypeGetQrCode 类型:获取群/个人二维码
|
||||
MMRequestTypeGetQrCode uint32 = 168
|
||||
// MMRequestTypeDelChatRoomMember 类型:删除群成员
|
||||
MMRequestTypeDelChatRoomMember uint32 = 179
|
||||
// MMRequestTypeTransferChatRoomOwnerRequest 类型:转让群
|
||||
MMRequestTypeTransferChatRoomOwnerRequest uint32 = 990
|
||||
// MMRequestTypeSendEmoji 发生表情
|
||||
MMRequestTypeSendEmoji uint32 = 175
|
||||
// MMRequestTypeGetContact 类型:获取联系人信息
|
||||
MMRequestTypeGetContact uint32 = 182
|
||||
// MMRequestTypeMMSnsPost 类型:发朋友圈
|
||||
MMRequestTypeMMSnsPost uint32 = 209
|
||||
// MMRequestTypeMMSnsObjectDetail 类型:指定朋友圈详情
|
||||
MMRequestTypeMMSnsObjectDetail uint32 = 210
|
||||
// MMRequestTypeMMSnsTimeLine 取朋友圈首页
|
||||
MMRequestTypeMMSnsTimeLine uint32 = 211
|
||||
// MMRequestTypeMMSnsUserPage 类型:获取朋友圈信息
|
||||
MMRequestTypeMMSnsUserPage uint32 = 212
|
||||
// MMRequestTypeMMSnsComment 类型:点赞/评论朋友圈
|
||||
MMRequestTypeMMSnsComment uint32 = 213
|
||||
// MMRequestTypeMMSnsSync 类型:同步朋友圈
|
||||
MMRequestTypeMMSnsSync uint32 = 214
|
||||
// MMRequestTypeMMSnsObjectOp 类型:发朋友圈操作
|
||||
MMRequestTypeMMSnsObjectOp uint32 = 218
|
||||
// MMRequestTypeSendAppMsg 类型 :发送app消息
|
||||
MMRequestTypeSendAppMsg uint32 = 222
|
||||
// MMRequestTypeGetChatRoomInfoDetail 类型:获取聊天室详情
|
||||
MMRequestTypeGetChatRoomInfoDetail uint32 = 223
|
||||
// MMRequestTypeGetA8Key 类型;授权链接
|
||||
MMRequestTypeGetA8Key uint32 = 233
|
||||
MMRequestTypeThrIdGetA8Key uint32 = 226
|
||||
|
||||
// MMRequestTypeStatusNotify 类型:发送状态
|
||||
MMRequestTypeStatusNotify uint32 = 251
|
||||
// MMRequestTypeSecManualAuth 类型:安全登陆
|
||||
MMRequestTypeSecManualAuth uint32 = 252
|
||||
// MMRequestTypeLogout 类型:退出登陆
|
||||
MMRequestTypeLogout uint32 = 282
|
||||
// MMRequestTypeGetProfile 类型:获取帐号所有信息
|
||||
MMRequestTypeGetProfile uint32 = 302
|
||||
// MMRequestTypeGetCdnDNS 类型:获取CdnDNS信息
|
||||
MMRequestTypeGetCdnDNS uint32 = 379
|
||||
// MMRequestTypeGetCert 类型:获取密钥信息
|
||||
MMRequestTypeGetCert uint32 = 381
|
||||
// MMRequestTypeVerifyPassword 类型 :验证密码
|
||||
MMRequestTypeVerifyPassword uint32 = 384
|
||||
// MMRequestTypeSetPassword 类型 :修改密码
|
||||
MMRequestTypeSetPassword uint32 = 383
|
||||
// MMRequestTypeFavSync 类型:同步收藏
|
||||
MMRequestTypeFavSync uint32 = 400
|
||||
// MMRequestTypeBatchGetFavItem 类型:批量获取收藏项
|
||||
MMRequestTypeBatchGetFavItem uint32 = 402
|
||||
// MMRequestTypeBatchDelFavItem 类型:删除收藏
|
||||
MMRequestTypeBatchDelFavItem uint32 = 403
|
||||
// MMRequestTypeGetFavInfo 类型:获取收藏信息
|
||||
MMRequestTypeGetFavInfo uint32 = 438
|
||||
// MMRequestTypeGetLoginQRCode 类型:获取二维码
|
||||
MMRequestTypeGetLoginQRCode uint32 = 502
|
||||
// MMRequestTypeCheckLoginQRCode 类型:检测二维码状态
|
||||
MMRequestTypeCheckLoginQRCode uint32 = 503
|
||||
// MMRequestTypePushQrLogin 类型:二维码二次登录
|
||||
MMRequestTypePushQrLogin uint32 = 654
|
||||
//MMRequestTypeHeartBeat 类型:心跳包
|
||||
MMRequestTypeHeartBeat uint32 = 518
|
||||
// MMRequestTypeNewSendMsg 类型:发送消息
|
||||
MMRequestTypeNewSendMsg uint32 = 522
|
||||
// MMRequestTypeGetOnlineInfo 类型:登录信息
|
||||
MMRequestTypeGetOnlineInfo uint32 = 526
|
||||
// MMRequestTypeGetChatRoomMemberDetail 类型:获取微信群成员信息列表
|
||||
MMRequestTypeGetChatRoomMemberDetail uint32 = 551
|
||||
// MMRequestTypeRevokeMsg 类型:撤回消息
|
||||
MMRequestTypeRevokeMsg uint32 = 594
|
||||
//MMRequestTypeInviteChatRoomMember 类型:邀请群成员
|
||||
MMRequestTypeInviteChatRoomMember uint32 = 610
|
||||
// MMRequestTypeAddContactLabel 类型:添加标签
|
||||
MMRequestTypeAddContactLabel uint32 = 635
|
||||
// MMRequestTypeDelContactLabel 类型:删除标签
|
||||
MMRequestTypeDelContactLabel uint32 = 636
|
||||
// MMRequestTypeUpdateContactLabel 类型:跟新标签名称
|
||||
MMRequestTypeUpdateContactLabel uint32 = 637
|
||||
// MMRequestTypeModifyContactLabelList 类型:修改好友标签列表
|
||||
MMRequestTypeModifyContactLabelList uint32 = 638
|
||||
// MMRequestTypeGetContactLabelList 类型:获取标签列表
|
||||
MMRequestTypeGetContactLabelList uint32 = 639
|
||||
// MMRequestTypeOplog 类型:Oplog
|
||||
MMRequestTypeOplog uint32 = 681
|
||||
// MMRequestTypeManualAuth 类型:扫码登陆
|
||||
MMRequestTypeManualAuth uint32 = 701
|
||||
// MMRequestTypeHybridManualAuth hybrid 登录
|
||||
MMRequestTypeHybridManualAuth uint32 = 252
|
||||
// MMRequestTypeAutoAuth 类型:token登陆
|
||||
MMRequestTypeAutoAuth uint32 = 702
|
||||
// MMRequestTypeInitContact 类型:初始化联系人
|
||||
MMRequestTypeInitContact uint32 = 851
|
||||
// MMRequestTypeBatchGetContactBriefInfo 类型:批量获取联系人信息
|
||||
MMRequestTypeBatchGetContactBriefInfo uint32 = 945
|
||||
// MMRequestTypeSetChatRoomAnnouncement 类型:修改群公告
|
||||
MMRequestTypeSetChatRoomAnnouncement uint32 = 993
|
||||
// MMRequestTypeJsLogin 类型:小程序授权
|
||||
MMRequestTypeJSLogin uint32 = 1029
|
||||
// MMRequestTypeJSOperateWxData 类型:小程序
|
||||
MMRequestTypeJSOperateWxData uint32 = 1133
|
||||
// MMRequestTypeSdkOauthAuthorize 类型:授权app应用
|
||||
MMRequestTypeSdkOauthAuthorize uint32 = 1388
|
||||
// MMRequestTypeBindQueryNew 查询红包支付信息
|
||||
MMRequestTypeBindQueryNew uint32 = 1501
|
||||
// MMRequestTypeQryListWxHB 类型:获取领取的红包列表信息
|
||||
MMRequestTypeQryListWxHB uint32 = 1514
|
||||
// MMRequestTypeReceiveWxHB 类型:接收微信红包
|
||||
MMRequestTypeReceiveWxHB uint32 = 1581
|
||||
//接收企业外部群红包
|
||||
// MMRequestTypeReceiveWxHB1 uint32 = 837
|
||||
// MMRequestTypeQryDetailWxHB 类型:查询红包领取详情
|
||||
MMRequestTypeQryDetailWxHB uint32 = 1585
|
||||
// MMRequestTypeOpenWxHB 类型:打开微信红包
|
||||
MMRequestTypeOpenWxHB uint32 = 1685
|
||||
)
|
||||
|
||||
const (
|
||||
// MMUserInfoStateNew 微信号状态:新建状态
|
||||
MMUserInfoStateNew uint32 = 0
|
||||
// MMUserInfoStateOnline 微信号状态:在线
|
||||
MMUserInfoStateOnline uint32 = 1
|
||||
// MMUserInfoStateOffline 微信号状态:离线
|
||||
MMUserInfoStateOffline uint32 = 2
|
||||
)
|
||||
|
||||
const (
|
||||
// MMLoginQrcodeStateNone 登陆二维码状态:未空状态
|
||||
MMLoginQrcodeStateNone uint32 = 0
|
||||
// MMLoginQrcodeStateScaned 登陆二维码状态:扫描
|
||||
MMLoginQrcodeStateScaned uint32 = 1
|
||||
// MMLoginQrcodeStateSure 登陆二维码状态:点击了确定登陆
|
||||
MMLoginQrcodeStateSure uint32 = 2
|
||||
)
|
||||
|
||||
// AppMsg 消息类型
|
||||
const (
|
||||
// MMAppMsgTypePayInfo App消息类型:红包
|
||||
MMAppMsgTypePayInfo uint32 = 2001
|
||||
// 转账
|
||||
MMAppMsgTypeTransfer uint32 = 2000
|
||||
// MMPayInfoSceneIDHongBao App支付类型ID:微信红包
|
||||
MMPayInfoSceneIDHongBao uint32 = 1002
|
||||
MMPayInfoSceneIDHongBao1 uint32 = 1005
|
||||
// 企业红包 自己发的 10002
|
||||
MMPayInfoSceneIDHongBao2 uint32 = 10002
|
||||
// 群邀请
|
||||
MMAppMsgTypeGroupInvite uint32 = 5
|
||||
)
|
||||
|
||||
const (
|
||||
// MMZombieFanCheckStateNone 检测僵尸粉状态:未开始检测
|
||||
MMZombieFanCheckStateNone uint32 = 0
|
||||
// MMZombieFanCheckStateIning 检测僵尸粉状态:正在检测中
|
||||
MMZombieFanCheckStateIning uint32 = 1
|
||||
// MMZombieFanCheckStateFinish 检测僵尸粉状态:检测完毕
|
||||
MMZombieFanCheckStateFinish uint32 = 2
|
||||
)
|
||||
|
||||
// 红包相关
|
||||
const (
|
||||
// MMHongBaoReqCgiCmdReceiveWxhb 红包请求类型:接收红包
|
||||
MMHongBaoReqCgiCmdReceiveWxhb uint32 = 3
|
||||
// 企业群接收红包
|
||||
MMHongBaoReqCgiCmdReceiveWxhb1 uint32 = uint32(0x141c)
|
||||
// MMHongBaoReqCgiCmdOpenWxhb 红包请求类型:打开红包
|
||||
MMHongBaoReqCgiCmdOpenWxhb uint32 = 4
|
||||
// MMHongBaoReqCgiCmdQryDetailWxhb 红包请求类型:查看红包领取详情
|
||||
MMHongBaoReqCgiCmdQryDetailWxhb uint32 = 5
|
||||
// MMHongBaoReqCgiCmdQryListWxhb 红包请求类型:查看领取的红包列表
|
||||
MMHongBaoReqCgiCmdQryListWxhb uint32 = 6
|
||||
|
||||
// MMTenPayReqOutputTypeJSON 红包请求响应的数据格式类型:JSON
|
||||
MMTenPayReqOutputTypeJSON uint32 = 1
|
||||
|
||||
// MMHongBaoReqInAwayGroup 接收群红包
|
||||
MMHongBaoReqInAwayGroup uint32 = 0
|
||||
// MMHongBaoReqInAwayPersonal 接收私人转的红包
|
||||
MMHongBaoReqInAwayPersonal uint32 = 1
|
||||
)
|
||||
|
||||
const (
|
||||
// MMAddMsgTypeText 消息类型:文本消息
|
||||
MMAddMsgTypeText uint32 = 1
|
||||
// MMAddMsgTypeImage 消息类型:图片消息
|
||||
MMAddMsgTypeImage uint32 = 3
|
||||
// MMAddMsgTypeCard 消息类型:名片
|
||||
MMAddMsgTypeCard uint32 = 42
|
||||
//MMAddMsgTypeMov 视频消息
|
||||
MMAddMsgTypeMov uint32 = 47
|
||||
|
||||
MMAddMsgTypeFriendAdd uint32 = 37
|
||||
|
||||
// MMAddMsgTypeRefer 消息类型:引用
|
||||
//MMAddMsgTypePic表情消息
|
||||
MMAddMsgTypePic uint32 = 47
|
||||
|
||||
MMAddMsgTypeRefer uint32 = 49
|
||||
//MMAddMsgTypeVoice 语音 视频
|
||||
MMAddMsgTypeVoice uint32 = 50
|
||||
|
||||
// MMAddMsgTypeStatusNotify 消息类型:状态通知
|
||||
MMAddMsgTypeStatusNotify uint32 = 51
|
||||
// MMAddMsgTypeRevokemMsg 消息类型:撤回消息
|
||||
MMAddMsgTypeRevokemMsg uint32 = 10002
|
||||
//系统消息
|
||||
MMAddMsgTypeSystemMsg = 10000
|
||||
)
|
||||
|
||||
const (
|
||||
// MMBitValGroupSaveInAddressBook 保存群聊到通讯录
|
||||
MMBitValGroupSaveInAddressBook uint32 = 0x1
|
||||
// MMBitValChatOnTop 聊天置顶
|
||||
MMBitValChatOnTop uint32 = 0x800
|
||||
)
|
||||
|
||||
const (
|
||||
// MMLoginStateNoLogin 未登录状态
|
||||
MMLoginStateNoLogin uint32 = 0
|
||||
// MMLoginStateOnLine 登录后在线
|
||||
MMLoginStateOnLine uint32 = 1
|
||||
// MMLoginStateOffLine 登录后离线
|
||||
MMLoginStateOffLine uint32 = 2
|
||||
// MMLoginStateLogout 登录后退出
|
||||
MMLoginStateLogout uint32 = 3
|
||||
// MMLoginStateLoginErr 登录失败!
|
||||
MMLoginStateLoginErr uint32 = 4
|
||||
)
|
||||
|
||||
const (
|
||||
// MMLbsLifeOpcodeNormal 获取地址列表操作类型:非自动
|
||||
MMLbsLifeOpcodeNormal uint32 = 0
|
||||
// MMLbsLifeOpcodeAuto 获取地址列表操作类型:自动获取
|
||||
MMLbsLifeOpcodeAuto uint32 = 1
|
||||
)
|
||||
|
||||
const (
|
||||
// MMFavSyncCmdAddItem 新增收藏项
|
||||
MMFavSyncCmdAddItem uint32 = 200
|
||||
|
||||
// MMFavItemTypeText 收藏类型:文字
|
||||
MMFavItemTypeText uint32 = 1
|
||||
// MMFavItemTypeImage 收藏类型:图片
|
||||
MMFavItemTypeImage uint32 = 2
|
||||
// MMFavItemTypeShare 收藏类型:分享
|
||||
MMFavItemTypeShare uint32 = 5
|
||||
// MMFavItemTypeVedio 收藏类型:视频
|
||||
MMFavItemTypeVedio uint32 = 16
|
||||
)
|
||||
|
||||
const (
|
||||
// MMLongOperatorTypeFavSync 操作类型: 同步收藏
|
||||
MMLongOperatorTypeFavSync uint32 = 192
|
||||
)
|
||||
|
||||
const (
|
||||
// MMRequestRetSessionTimeOut 链接失效
|
||||
MMRequestRetSessionTimeOut int32 = -2
|
||||
// MMRequestRetMMTLSError mmtls错误
|
||||
MMRequestRetMMTLSError int32 = -1
|
||||
)
|
||||
|
||||
const (
|
||||
// MMConcealAddNoNeedVerify 别人添加我时不需要验证
|
||||
MMConcealAddNoNeedVerify uint32 = 0
|
||||
// MMConcealAddNeedVerify 别人添加我时需要验证
|
||||
MMConcealAddNeedVerify uint32 = 1
|
||||
|
||||
// MMSwitchFunctionOFF 开关-关闭
|
||||
MMSwitchFunctionOFF uint32 = 1
|
||||
// MMSwitchFunctionON 开关-打开
|
||||
MMSwitchFunctionON uint32 = 2
|
||||
|
||||
// MMAddMeNeedVerifyType 通过手机号查找我
|
||||
MMAddMeNeedVerifyType uint32 = 4
|
||||
// MMFindMeByPhoneType 通过手机号查找我
|
||||
MMFindMeByPhoneType uint32 = 8
|
||||
// MMFindMeByWxIDType 通过微信号查找我
|
||||
MMFindMeByWxIDType uint32 = 25
|
||||
// MMFindMeByGroupType 通过群聊添加我
|
||||
MMFindMeByGroupType uint32 = 38
|
||||
// MMFindMeByMyQRCodeType 通过我的二维码添加我
|
||||
MMFindMeByMyQRCodeType uint32 = 39
|
||||
// MMFindMeByCardType 通过名片添加我
|
||||
MMFindMeByCardType uint32 = 40
|
||||
)
|
||||
|
||||
const (
|
||||
// MMChatroomAccessTypeNeedVerify 进群需要验证
|
||||
MMChatroomAccessTypeNeedVerify uint32 = 1
|
||||
)
|
||||
@@ -0,0 +1,79 @@
|
||||
package baseinfo
|
||||
|
||||
// FavItem 收藏项
|
||||
type FavItem struct {
|
||||
Type uint32 `xml:"type,attr"`
|
||||
CtrlFlag uint32 `xml:"ctrlflag"`
|
||||
FavItemID uint32 `xml:"favItemID"`
|
||||
Source Source `xml:"source"`
|
||||
Desc string `xml:"desc"`
|
||||
DataList DataList `xml:"datalist"`
|
||||
RecommendTagList RecommendTagList `xml:"recommendtaglist"`
|
||||
}
|
||||
|
||||
// Source FavItem属性
|
||||
type Source struct {
|
||||
SourceID string `xml:"sourceid,attr"`
|
||||
SourceType uint32 `xml:"sourcetype,attr"`
|
||||
CreateTime uint32 `xml:"createtime"`
|
||||
FromUsr string `xml:"fromusr"`
|
||||
EventID string `xml:"eventid"`
|
||||
}
|
||||
|
||||
// DataList 数据列表
|
||||
type DataList struct {
|
||||
Count uint32 `xml:"count,attr"`
|
||||
DataItem []DataItem `xml:"dataitem"`
|
||||
}
|
||||
|
||||
// DataItem 数据项
|
||||
type DataItem struct {
|
||||
HTMLID string `xml:"htmlid,attr"`
|
||||
DataID string `xml:"dataid,attr"`
|
||||
DataType uint32 `xml:"datatype,attr"`
|
||||
SubType uint32 `xml:"subtype,attr"`
|
||||
DataSourceID string `xml:"datasourceid,attr"`
|
||||
DataIllegalType uint32 `xml:"dataillegaltype,attr"`
|
||||
ThumbFullSize uint32 `xml:"thumbfullsize"`
|
||||
SourceThumbPath string `xml:"sourcethumbpath"`
|
||||
FullMD5 string `xml:"fullmd5"`
|
||||
ThumbHead256MD5 string `xml:"thumbhead256md5"`
|
||||
CdnThumbURL string `xml:"cdn_thumburl"`
|
||||
SourceDataPath string `xml:"sourcedatapath"`
|
||||
CdnDataKey string `xml:"cdn_datakey"`
|
||||
FullSize uint32 `xml:"fullsize"`
|
||||
Head256MD5 string `xml:"head256md5"`
|
||||
CdnThumbKey string `xml:"cdn_thumbkey"`
|
||||
CdnDataURL string `xml:"cdn_dataurl"`
|
||||
ThumbFullMD5 string `xml:"thumbfullmd5"`
|
||||
DataDesc string `xml:"datadesc"`
|
||||
DataTitle string `xml:"datatitle"`
|
||||
}
|
||||
|
||||
// RecommendTagList 推荐标签列表
|
||||
type RecommendTagList struct {
|
||||
}
|
||||
|
||||
// CardInfo 名片信息
|
||||
type CardInfo struct {
|
||||
BigHeadImgURL string `xml:"bigheadimgurl,attr"`
|
||||
SmallHeadImgURL string `xml:"smallheadimgurl,attr"`
|
||||
UserName string `xml:"username,attr"`
|
||||
NickName string `xml:"nickname,attr"`
|
||||
FullPY string `xml:"fullpy,attr"`
|
||||
ShortPY string `xml:"shortpy,attr"`
|
||||
Alias string `xml:"alias,attr"`
|
||||
ImageStatus uint32 `xml:"imagestatus,attr"`
|
||||
Scene uint32 `xml:"scene,attr"`
|
||||
Province string `xml:"province,attr"`
|
||||
City string `xml:"city,attr"`
|
||||
Sign string `xml:"sign,attr"`
|
||||
Sex uint32 `xml:"sex,attr"`
|
||||
CertFlag uint32 `xml:"certflag,attr"`
|
||||
CertInfo string `xml:"certinfo,attr"`
|
||||
BrandIconURL string `xml:"brandIconUrl,attr"`
|
||||
BrandHomeURL string `xml:"brandHomeUrl,attr"`
|
||||
BrandSubscriptConfigURL string `xml:"brandSubscriptConfigUrl,attr"`
|
||||
BrandFlags uint32 `xml:"brandFlags,attr"`
|
||||
RegionCode string `xml:"regionCode,attr"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package baseinfo
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
type AddFriendMsg struct {
|
||||
XMLName xml.Name `xml:"msg"`
|
||||
FromUsername string `xml:"fromusername,attr"`
|
||||
// v3
|
||||
EncryptUsername string `xml:"encryptusername,attr"`
|
||||
FromNickname string `xml:"fromnickname,attr"`
|
||||
// 验证信息
|
||||
Content string `xml:"content,attr"`
|
||||
FullPy string `xml:"fullpy,attr"`
|
||||
ShortPy string `xml:"shortpy,attr"`
|
||||
ImageStatus string `xml:"imagestatus,attr"`
|
||||
// 需要的传参
|
||||
Scene int `xml:"scene,attr"`
|
||||
Country string `xml:"country,attr"`
|
||||
Province string `xml:"province,attr"`
|
||||
City string `xml:"city,attr"`
|
||||
Sign string `xml:"sign,attr"`
|
||||
PerCard string `xml:"percard,attr"`
|
||||
Sex string `xml:"sex,attr"`
|
||||
Alias string `xml:"alias,attr"`
|
||||
Weibo string `xml:"weibo,attr"`
|
||||
AlbumFlag string `xml:"albumflag,attr"`
|
||||
AlbumStyle string `xml:"albumstyle,attr"`
|
||||
AlbumBgImgId string `xml:"albumbgimgid,attr"`
|
||||
SnsFlag string `xml:"snsflag,attr"`
|
||||
SnsBgImgId string `xml:"snsbgimgid,attr"`
|
||||
SnsBgObjectId string `xml:"snsbgobjectid,attr"`
|
||||
MHash string `xml:"mhash,attr"`
|
||||
MFullHash string `xml:"mfullhash,attr"`
|
||||
BigHeadImgUrl string `xml:"bigheadimgurl,attr"`
|
||||
SmallHeadImgUrl string `xml:"smallheadimgurl,attr"`
|
||||
// v4
|
||||
Ticket string `xml:"ticket,attr"`
|
||||
// 同意 3 拒绝 4
|
||||
Opcode string `xml:"opcode,attr"`
|
||||
GoogleContact string `xml:"googlecontact,attr"`
|
||||
QrTicket string `xml:"qrticket,attr"`
|
||||
ChatRoomUsername string `xml:"chatroomusername,attr"`
|
||||
SourceUsername string `xml:"sourceusername,attr"`
|
||||
SourceNickname string `xml:"sourcenickname,attr"`
|
||||
ShareCardUsername string `xml:"sharecardusername,attr"`
|
||||
ShareCardNickname string `xml:"sharecardnickname,attr"`
|
||||
CardVersion string `xml:"cardversion,attr"`
|
||||
ExtFlag string `xml:"extflag,attr"`
|
||||
BrandList BrandList `xml:"brandlist"`
|
||||
}
|
||||
|
||||
type BrandList struct {
|
||||
Count string `xml:"count,attr"`
|
||||
Ver string `xml:"ver,attr"`
|
||||
}
|
||||
|
||||
// data := `<msg fromusername="wxid_ufcgezm5z96622" encryptusername="v3_020b3826fd030100000000002cc613e0349d86000000501ea9a3dba12f95f6b60a0536a1adb60d08d8532a087fdfccc8a160d7d45fe0bbcd8a88833a65f921d2a778f05d44c7e8596323f0f3dfb6d33ce29e6e550c5227f27537f77cf427980e56be@stranger" fromnickname="阿灰" content="我是阿灰" fullpy="ahui" shortpy="AH" imagestatus="3" scene="6" country="" province="" city="" sign="" percard="0" sex="1" alias="huidy-xie" weibo="" albumflag="0" albumstyle="0" albumbgimgid="" snsflag="1" snsbgimgid="http://shmmsns.qpic.cn/mmsns/bPYWlCr1Wibq3KlqzDDgpwrF2GNRiaWcvGxZCnxWCRn5fNn7iawSTzX08wq34NYib8PXb9UJibjwQwLY/0" snsbgobjectid="14163002062523806373" mhash="91e16f0e8745fa4d5a6ff95211d0b2cd" mfullhash="91e16f0e8745fa4d5a6ff95211d0b2cd" bigheadimgurl="http://wx.qlogo.cn/mmhead/ver_1/2f4s866H00LMLpp0WD1icsreoLbO9ByInwiaIibVRXSG2KzIEvY6pjqhux9tru1rFm1ylLw11KyKUrOwabKNKlbjcoYKrqyyv7MoWXgux3wun60bN3zH2cmSYw4NicQlv3qR/0" smallheadimgurl="http://wx.qlogo.cn/mmhead/ver_1/2f4s866H00LMLpp0WD1icsreoLbO9ByInwiaIibVRXSG2KzIEvY6pjqhux9tru1rFm1ylLw11KyKUrOwabKNKlbjcoYKrqyyv7MoWXgux3wun60bN3zH2cmSYw4NicQlv3qR/132" ticket="v4_000b708f0b0400000100000000008e412b2d703227b951fec0d571671000000050ded0b020927e3c97896a09d47e6e9e23bc96c6b50c407d3706a68488e5b7f254bc83c5fccbec4b30a8ea1cda32cbe1b55799eaf51851b7fc60d49ba6381630926853291c5295f205abc19f8b5090c9348928c0c7afa6b641cc93f6a7e32b5d22ad947348acef670841ac4ac73d386b365a9a2c3d4d03a0@stranger" opcode="2" googlecontact="" qrticket="" chatroomusername="" sourceusername="" sourcenickname="" sharecardusername="" sharecardnickname="" cardversion="" extflag="0"><brandlist count="0" ver="866984659"></brandlist></msg>`
|
||||
// var msg AddFriendMsg
|
||||
// if err := xml.Unmarshal([]byte(data), &msg); err != nil {
|
||||
// fmt.Printf("error: %v", err)
|
||||
// return
|
||||
// }
|
||||
@@ -0,0 +1,13 @@
|
||||
package baseinfo
|
||||
|
||||
type JoinGroupMsg struct {
|
||||
JoinGroupInfo JoinGroupInfo `xml:"appmsg"`
|
||||
}
|
||||
|
||||
type JoinGroupInfo struct {
|
||||
Url string `xml:"url"`
|
||||
Thumburl string `xml:"thumburl"`
|
||||
Type uint32 `xml:"type"`
|
||||
Title string `xml:"title"`
|
||||
Des string `xml:"des"`
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
package baseinfo
|
||||
|
||||
// 企业红包(自己发的)
|
||||
/**
|
||||
<sysmsg type="paymsg">
|
||||
<paymsg>
|
||||
<PayMsgType>14</PayMsgType>
|
||||
<appmsgcontent><![CDATA[
|
||||
%3Cmsg%3E%0A%3Cappmsg+appid%3D%22%22+sdkver%3D%22%22%3E%0A%3Cdes%3E%3C!%5BCDATA%5B%E6%88%91%E7%BB%99%E4%BD%A0%E5%8F%91%E4%BA%86%E4%B8%80%E4%B8%AA%E7%BA%A2%E5%8C%85%EF%BC%8C%E8%B5%B6%E7%B4%A7%E5%8E%BB%E6%8B%86!%5D%5D%3E%3C%2Fdes%3E%0A%3Curl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwxapp.tenpay.com%2Fmmpayhb%2Fwxhb_personalreceive%3Fshowwxpaytitle%3D1%26msgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%5D%5D%3E%3C%2Furl%3E%0A%3Clowurl%3E%3C!%5BCDATA%5B%5D%5D%3E%3C%2Flowurl%3E%0A%3Ctype%3E%3C!%5BCDATA%5B2001%5D%5D%3E%3C%2Ftype%3E%0A%3Ctitle%3E%3C!%5BCDATA%5B%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Ftitle%3E%0A%3Cthumburl%3E%3C!%5BCDATA%5B%5D%5D%3E%3C%2Fthumburl%3E%0A%0A%3Cwcpayinfo%3E%0A%3Ctemplateid%3E%3C!%5BCDATA%5B7a2a165d31da7fce6dd77e05c300028a%5D%5D%3E%3C%2Ftemplateid%3E%0A%3Curl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwxapp.tenpay.com%2Fmmpayhb%2Fwxhb_personalreceive%3Fshowwxpaytitle%3D1%26msgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%5D%5D%3E%3C%2Furl%3E%0A%3Ciconurl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwx.gtimg.com%2Fhongbao%2F1800%2Fhb.png%5D%5D%3E%3C%2Ficonurl%3E%0A%3Creceivertitle%3E%3C!%5BCDATA%5B%E6%81%AD%E5%96%9C%E5%8F%91%E8%B4%A2%EF%BC%8C%E5%A4%A7%E5%90%89%E5%A4%A7%E5%88%A9%5D%5D%3E%3C%2Freceivertitle%3E%0A%3Csendertitle%3E%3C!%5BCDATA%5B%E6%81%AD%E5%96%9C%E5%8F%91%E8%B4%A2%EF%BC%8C%E5%A4%A7%E5%90%89%E5%A4%A7%E5%88%A9%5D%5D%3E%3C%2Fsendertitle%3E%0A%3Cscenetext%3E%3C!%5BCDATA%5B%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Fscenetext%3E%0A%3Csenderdes%3E%3C!%5BCDATA%5B%E6%9F%A5%E7%9C%8B%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Fsenderdes%3E%0A%3Creceiverdes%3E%3C!%5BCDATA%5B%E9%A2%86%E5%8F%96%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Freceiverdes%3E%0A%3Cnativeurl%3E%3C!%5BCDATA%5Bwxpay%3A%2F%2Fc2cbizmessagehandler%2Fhongbao%2Freceivehongbao%3Fmsgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%26ver%3D2%26sign%3D%7B%7BSIGN%7D%7D%5D%5D%3E%3C%2Fnativeurl%3E%0A%3Csceneid%3E%3C!%5BCDATA%5B1005%5D%5D%3E%3C%2Fsceneid%3E%0A%3Cinnertype%3E%3C!%5BCDATA%5B0%5D%5D%3E%3C%2Finnertype%3E%0A%0A%0A%3Cscenetext%3E%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%3C%2Fscenetext%3E%0A%0A%0A%0A%0A%0A%3Clocallogoicon%3E%3C!%5BCDATA%5Bc2c_hongbao_icon_cn%5D%5D%3E%3C%2Flocallogoicon%3E%0A%0A%3Cinvalidtime%3E%3C!%5BCDATA%5B1731421955%5D%5D%3E%3C%2Finvalidtime%3E%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%3Cbroaden%3E%0A%0A%0A%0A%0A%0A%3C%2Fbroaden%3E%0A%0A%0A%0A%3C%2Fwcpayinfo%3E%0A%0A%0A%0A%3C%2Fappmsg%3E%0A%3Cfromusername%3E%3C!%5BCDATA%5Bxyuh111%5D%5D%3E%3C%2Ffromusername%3E%0A%3C%2Fmsg%3E
|
||||
]]></appmsgcontent>
|
||||
<fromusername><![CDATA[xyuh111]]></fromusername>
|
||||
<tousername><![CDATA[47296903317@chatroom]]></tousername>
|
||||
</paymsg>
|
||||
</sysmsg>
|
||||
*/
|
||||
type RedSysMsg struct {
|
||||
Paymsg PayMsg `xml:"paymsg"`
|
||||
}
|
||||
type PayMsg struct {
|
||||
PayMsgType uint32 `xml:"paymsgtype"`
|
||||
AppMsgContent string `xml:"appmsgcontent"`
|
||||
FromUserName string `xml:"fromusername"`
|
||||
ToUserName string `xml:"tousername"`
|
||||
}
|
||||
|
||||
// Msg Msg
|
||||
type Msg struct {
|
||||
APPMsg APPMsg `xml:"appmsg"`
|
||||
FromUserName string `xml:"fromusername"`
|
||||
}
|
||||
|
||||
// 转账
|
||||
type Msg2 struct {
|
||||
APPMsg APPMsg2 `xml:"appmsg"`
|
||||
}
|
||||
|
||||
// APPMsg APPMsg
|
||||
type APPMsg struct {
|
||||
Des string `xml:"des"`
|
||||
URL string `xml:"url"`
|
||||
MsgType uint32 `xml:"type"`
|
||||
Title string `xml:"title"`
|
||||
ThumbURL string `xml:"thumburl"`
|
||||
WCPayInfo WCPayInfo `xml:"wcpayinfo"`
|
||||
}
|
||||
|
||||
// 转账
|
||||
type APPMsg2 struct {
|
||||
Des string `xml:"des"`
|
||||
URL string `xml:"url"`
|
||||
MsgType uint32 `xml:"type"`
|
||||
Title string `xml:"title"`
|
||||
ThumbURL string `xml:"thumburl"`
|
||||
WCPayInfo WCPayInfo2 `xml:"wcpayinfo"`
|
||||
}
|
||||
|
||||
// WCPayInfo WCPayInfo
|
||||
type WCPayInfo struct {
|
||||
TemplatedID string `xml:"templatedid"`
|
||||
URL string `xml:"url"`
|
||||
IconURL string `xml:"iconurl"`
|
||||
ReceiverTitle string `xml:"receivertitle"`
|
||||
SenderTitle string `xml:"sendertitle"`
|
||||
SenderDes string `xml:"senderdes"`
|
||||
ReceiverDes string `xml:"receiverdes"`
|
||||
NativeURL string `xml:"nativeurl"`
|
||||
SceneID uint32 `xml:"sceneid"`
|
||||
InnerType string `xml:"innertype"`
|
||||
PayMsgID string `xml:"paymsgid"`
|
||||
SceneText string `xml:"scenetext"`
|
||||
LocalLogoIcon string `xml:"locallogoicon"`
|
||||
InvalidTime uint32 `xml:"invalidtime"`
|
||||
Broaden string `xml:"broaden"`
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
"InvalidTime": "1730608788",
|
||||
"ToUserName": "xyuh111",
|
||||
"TransFerId": "1000050001202411021422875786033",
|
||||
"TransactionId": "53010001009074202411020607319513"
|
||||
payer_username
|
||||
*/
|
||||
type WCPayInfo2 struct {
|
||||
Feedesc string `xml:"feedesc"`
|
||||
TransactionId string `xml:"transcationid"`
|
||||
ToUserName string `xml:"receiver_username"`
|
||||
FromUserName string `xml:"payer_username"` //私聊为空,群聊有值
|
||||
FromGroupId string `xml:"payer"` // 乱写的,没有这个字段
|
||||
InvalidTime string `xml:"invalidtime"`
|
||||
TransFerId string `xml:"transferid"`
|
||||
}
|
||||
|
||||
// HongBaoURLItem 红包NativeURL项
|
||||
type HongBaoURLItem struct {
|
||||
SendUserName string
|
||||
ShowWxPayTitle string
|
||||
MsgType string
|
||||
ChannelID string
|
||||
SendID string
|
||||
Ver string
|
||||
Sign string
|
||||
ShowSourceMac string
|
||||
SceneID uint32
|
||||
}
|
||||
|
||||
// HongBaoReceiverItem 接收红包项
|
||||
type HongBaoReceiverItem struct {
|
||||
CgiCmd uint32
|
||||
Province string
|
||||
City string
|
||||
InWay uint32
|
||||
SceneID uint32
|
||||
NativeURL string
|
||||
HongBaoURLItem *HongBaoURLItem
|
||||
}
|
||||
|
||||
// HongBaoOpenItem 领取红包项
|
||||
type HongBaoOpenItem struct {
|
||||
CgiCmd uint32
|
||||
SceneID uint32
|
||||
Province string
|
||||
City string
|
||||
HeadImg string
|
||||
NativeURL string
|
||||
NickName string
|
||||
SessionUserName string
|
||||
TimingIdentifier string
|
||||
Offset int64
|
||||
Limit int64
|
||||
HongBaoURLItem *HongBaoURLItem
|
||||
}
|
||||
|
||||
// HongBaoQryDetailItem 查询红包领取详情
|
||||
type HongBaoQryDetailItem struct {
|
||||
CgiCmd uint32
|
||||
Province string
|
||||
City string
|
||||
NativeURL string
|
||||
HongBaoURLItem *HongBaoURLItem
|
||||
}
|
||||
|
||||
// HongBaoQryListItem 查询领取的红包列表信息
|
||||
type HongBaoQryListItem struct {
|
||||
CgiCmd uint32
|
||||
Province string
|
||||
City string
|
||||
Offset uint32
|
||||
Limit uint32
|
||||
}
|
||||
|
||||
// SourceObject SourceObject
|
||||
type SourceObject struct {
|
||||
CoverImage string
|
||||
CoverImageMd5 string
|
||||
DetailImage string
|
||||
DetailImageMd5 string
|
||||
}
|
||||
|
||||
// ShowSourceRec ShowSourceRec
|
||||
type ShowSourceRec struct {
|
||||
SubType uint32
|
||||
SourceObject SourceObject
|
||||
}
|
||||
|
||||
// HongBaoReceiverResp 接收红包响应项
|
||||
type HongBaoReceiverResp struct {
|
||||
RetCode uint32
|
||||
RetMsg string
|
||||
SendID string
|
||||
Wishing string
|
||||
IsSender uint32
|
||||
ReceiveStatus uint32
|
||||
HBStatus uint32
|
||||
StatusMess string
|
||||
HBType uint32
|
||||
WaterMark string
|
||||
ScenePicSwitch uint32
|
||||
PreStrainFlag uint32
|
||||
SendUserName string
|
||||
TimingIdentifier string
|
||||
ShowSourceRec ShowSourceRec
|
||||
ShowYearExpression uint32
|
||||
ExpressionMd5 string
|
||||
ShowRecNormalExpression uint32
|
||||
}
|
||||
|
||||
// RecordItem 领取红包记录
|
||||
type RecordItem struct {
|
||||
ReceiveAmount uint32
|
||||
ReceiveTime string
|
||||
Answer string
|
||||
ReceiveID string
|
||||
State uint32
|
||||
ReceiveOpenID string
|
||||
UserName string
|
||||
}
|
||||
|
||||
// RealnameInfo RealnameInfo
|
||||
type RealnameInfo struct {
|
||||
GuideFlag uint32
|
||||
}
|
||||
|
||||
// Operation Operation
|
||||
type Operation struct {
|
||||
Name string
|
||||
Type string
|
||||
Content string
|
||||
Enable uint32
|
||||
IconURL string
|
||||
OssKey uint32
|
||||
}
|
||||
|
||||
// ShowSourceOpen ShowSourceOpen
|
||||
type ShowSourceOpen struct {
|
||||
Source ShowSourceRec
|
||||
Operation Operation
|
||||
}
|
||||
|
||||
// HongBaoOpenResp 打开红包响应项
|
||||
type HongBaoOpenResp struct {
|
||||
RetCode uint32
|
||||
RetMsg string
|
||||
SendID string
|
||||
Amount uint32
|
||||
RecNum uint32
|
||||
RecAmount uint32
|
||||
TotalNum uint32
|
||||
HasWriteAnswer uint32
|
||||
HBType uint32
|
||||
IsSender uint32
|
||||
IsContinue uint32
|
||||
ReceiveStatus uint32
|
||||
HBStatus uint32
|
||||
StatusMess string
|
||||
Wishing string
|
||||
ReceiveID string
|
||||
HeadTitle string
|
||||
CanShare uint32
|
||||
OperationHeader []string
|
||||
Record []RecordItem
|
||||
WaterMark string
|
||||
JumpChange uint32
|
||||
ChangeWording string
|
||||
SendUserName string
|
||||
RealnameInfo RealnameInfo
|
||||
SystemMsgContext string
|
||||
SessionUserName string
|
||||
JumpChangeType uint32
|
||||
ChangeIconURL string
|
||||
ShowSourceOpen ShowSourceOpen
|
||||
ExpressionMd5 string
|
||||
ExpressionType uint32
|
||||
ShowYearExpression uint32
|
||||
ShowOpenNormalExpression uint32
|
||||
EnableAnswerByExpression uint32
|
||||
EnableAnswerBySelfie uint32
|
||||
}
|
||||
|
||||
// OperationTail OperationTail
|
||||
type OperationTail struct {
|
||||
Enable uint32
|
||||
}
|
||||
|
||||
// AtomicFunc AtomicFunc
|
||||
type AtomicFunc struct {
|
||||
Enable uint32
|
||||
}
|
||||
|
||||
// HongBaoQryDetailResp 红包领取详情响应
|
||||
type HongBaoQryDetailResp struct {
|
||||
RetCode uint32
|
||||
RetMsg string
|
||||
RecNum uint32
|
||||
TotalNum uint32
|
||||
TotalAmount uint32
|
||||
SendID string
|
||||
Amount uint32
|
||||
Wishing string
|
||||
IsSender uint32
|
||||
ReceiveID string
|
||||
HasWriteAnswer uint32
|
||||
OperationHeader []string
|
||||
HBType uint32
|
||||
IsContinue uint32
|
||||
HBStatus uint32
|
||||
ReceiveStatus uint32
|
||||
StatusMess string
|
||||
HeadTitle string
|
||||
CanShare uint32
|
||||
HBKind uint32
|
||||
RecAmount uint32
|
||||
Record []RecordItem
|
||||
OperationTail OperationTail
|
||||
AtomicFunc AtomicFunc
|
||||
JumpChange uint32
|
||||
ChangeWording string
|
||||
SendUserName string
|
||||
ChangeURL string
|
||||
JumpChangeType uint32
|
||||
ShowSourceOpen ShowSourceOpen
|
||||
ExpressionMd5 string
|
||||
ShowDetailNormalExpression uint32
|
||||
EnableAnswerByExpression uint32
|
||||
EnableAnswerBySelfie uint32
|
||||
}
|
||||
|
||||
// QryRecordItem 领取过的红包项
|
||||
type QryRecordItem struct {
|
||||
SendName string
|
||||
ReceiveAmount uint32
|
||||
ReceiveTime string
|
||||
HBType uint32
|
||||
SendID string
|
||||
HBKind uint32
|
||||
SendUserName string
|
||||
ReceiveID string
|
||||
}
|
||||
|
||||
// HongBaoQryListResp 查询领取的红包记录
|
||||
type HongBaoQryListResp struct {
|
||||
RetCode uint32
|
||||
RetMsg string
|
||||
RecTotalNum uint32
|
||||
RecTotalAmount uint32
|
||||
Years string
|
||||
GameCount uint32
|
||||
RecordYear string
|
||||
IsContinue uint32
|
||||
Record []QryRecordItem
|
||||
}
|
||||
|
||||
type RedPacket struct {
|
||||
RedType uint32 // 红包类型(0 普通红包; 1 拼手气红包; ? 专属红包)
|
||||
Username string // 红包接收者; wxid 或 群ID
|
||||
From uint32 // InAway(0:群红包; 1:个人红包)
|
||||
Count uint32 // 红包个数(最少为1)
|
||||
Amount uint32 // 每个红包的金额(单位为分, 最小为100); 总金额为 Amount*Count
|
||||
Content string // 红包的备注内容(祝福语)
|
||||
}
|
||||
|
||||
// HongBaoItem 红包项
|
||||
type HongBaoItem struct {
|
||||
IsGroup uint32 // 默认 1
|
||||
SceneID uint32
|
||||
NativeURL string
|
||||
Limit int64
|
||||
URLItem *HongBaoURLItem
|
||||
FromUserName string
|
||||
}
|
||||
|
||||
// 转账项
|
||||
// <paysubtype>1</paysubtype>
|
||||
// <feedesc><![CDATA[¥1.00]]></feedesc>
|
||||
// <transcationid><![CDATA[53010001009074202411020607319513]]></transcationid>
|
||||
// <transferid><![CDATA[1000050001202411021422875786033]]></transferid>
|
||||
// <invalidtime><![CDATA[1730608788]]></invalidtime>
|
||||
// <begintransfertime><![CDATA[1730522388]]></begintransfertime>
|
||||
// <effectivedate><![CDATA[1]]></effectivedate>
|
||||
// <pay_memo><![CDATA[]]></pay_memo>
|
||||
// <receiver_username><![CDATA[xyuh111]]></receiver_username>
|
||||
// <payer_username><![CDATA[]]></payer_username>
|
||||
type TransferItem struct {
|
||||
}
|
||||
|
||||
type GetRedPacketList struct {
|
||||
Offset int64
|
||||
Limit int64
|
||||
NativeURL string
|
||||
HongBaoItem HongBaoURLItem
|
||||
}
|
||||
|
||||
// PreTransferResp PreTransferResp
|
||||
type PreTransferResp struct {
|
||||
ReqKey string `json:"req_key"`
|
||||
TansferingStatus string `json:"tansfering_status"`
|
||||
RetCode string `json:"retcode"`
|
||||
RetMsg string `json:"retmsg"`
|
||||
//AppMsgContent string `json:"appmsgcontent"`
|
||||
ReceiverTrueName string `json:"receiver_true_name"`
|
||||
TransferId string `json:"transfer_id"`
|
||||
TransactionId string `json:"transaction_id"`
|
||||
Fee uint `json:"fee"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package baseinfo
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
// GroupMsg 群消息结构体
|
||||
type GroupMsg struct {
|
||||
XMLName xml.Name `xml:"msg"`
|
||||
AtUserList []string `xml:"atuserlist>string"`
|
||||
Content string `xml:"content"`
|
||||
Type string `xml:"type"`
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package baseinfo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// QrcodeInfo QrcodeInfo
|
||||
type QrcodeInfo struct {
|
||||
// QrCodeUUID 获取二维码返回的UUID
|
||||
QrCodeUUID string
|
||||
// QrCodeKey 获取二维码返回的AesKey
|
||||
QrCodeKey []byte
|
||||
// QrCodePassword 扫码成功用户返回的伪密码
|
||||
QrCodePassword string
|
||||
// QrCodePassword 扫码成功用户返回的微信Id
|
||||
QrCodeWxId string
|
||||
|
||||
CheckFunc sync.Once
|
||||
|
||||
CancelFunc context.CancelFunc
|
||||
// 检查间隔时间
|
||||
CheckIntervalTime int
|
||||
|
||||
// CheckTimer
|
||||
CheckTimer *time.Timer
|
||||
CheckEnd bool
|
||||
}
|
||||
|
||||
type FavInfoCache struct {
|
||||
// 用于判断是否重复
|
||||
lastFavID uint32
|
||||
lastFavUpdateTime uint32
|
||||
}
|
||||
|
||||
func (f *FavInfoCache) LastFavUpdateTime() uint32 {
|
||||
return f.lastFavUpdateTime
|
||||
}
|
||||
|
||||
func (f *FavInfoCache) SetLastFavUpdateTime(lastFavUpdateTime uint32) {
|
||||
f.lastFavUpdateTime = lastFavUpdateTime
|
||||
}
|
||||
|
||||
func (f *FavInfoCache) LastFavID() uint32 {
|
||||
return f.lastFavID
|
||||
}
|
||||
|
||||
func (f *FavInfoCache) SetLastFavID(lastFavID uint32) {
|
||||
f.lastFavID = lastFavID
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package baseinfo
|
||||
|
||||
// TenPayResp 响应
|
||||
type TenPayResp struct {
|
||||
RetCode string `json:"retcode"`
|
||||
RetMsg string `json:"retmsg"`
|
||||
BindQueryScene string `json:"bind_query_scene"`
|
||||
QueryCacheTime uint32 `json:"query_cache_time"`
|
||||
Array []Array `json:"Array"`
|
||||
VirtualCardArray []VirtualCardArray `json:"virtual_card_array"`
|
||||
UserInfo TenPayUserInfo `json:"user_info"`
|
||||
SwitchInfo SwitchInfo `json:"switch_info"`
|
||||
BalanceInfo BalanceInfo `json:"balance_info"`
|
||||
HistoryCardArray []HistoryCardArray `json:"history_card_array"`
|
||||
BalanceNotice []BalanceNotice `json:"balance_notice"`
|
||||
FetchNotice []FetchNotice `json:"fetch_notice"`
|
||||
QueryOrderTime uint32 `json:"query_order_time"`
|
||||
TimeStamp uint32 `json:"time_stamp"`
|
||||
PayMenuArray []PayMenuArray `json:"paymenu_array"`
|
||||
PayMenuUseNew uint32 `json:"paymenu_use_new"`
|
||||
WalletInfo WalletInfo `json:"wallet_info"`
|
||||
FavorComposeChannelInfo []FavorComposeChannelInfo `json:"favor_compose_channel_info"`
|
||||
}
|
||||
|
||||
type GeneratePayQCodeResp struct {
|
||||
PayUrl string `json:"pay_url"`
|
||||
RetCode string `json:"retcode"`
|
||||
RetMsg string `json:"retmsg"`
|
||||
}
|
||||
|
||||
type GetRedDetailsResp struct {
|
||||
RetCode string `json:"retcode"`
|
||||
RetMsg string `json:"retmsg"`
|
||||
SendId string `json:"sendId"`
|
||||
Wishing string `json:"wishing"`
|
||||
IsSender string `json:"isSender"`
|
||||
ReceiveStatus string `json:"receiveStatus"`
|
||||
HbStatus string `json:"hbStatus"`
|
||||
StatusMess string `json:"statusMess"`
|
||||
HbType string `json:"hbType"`
|
||||
Watermark string `json:"watermark"`
|
||||
ScenePicSwitch string `json:"scenePicSwitch"`
|
||||
PreStrainFlag string `json:"preStrainFlag"`
|
||||
SendUserName string `json:"sendUserName"`
|
||||
TimingIdentifier string `json:"timingIdentifier"`
|
||||
ShowYearExpression string `json:"showYearExpression"`
|
||||
ExpressionMd5 string `json:"expression_md5"`
|
||||
ShowRecNormalExpression string `json:"showRecNormalExpression"`
|
||||
}
|
||||
|
||||
// Array Array
|
||||
type Array struct {
|
||||
}
|
||||
|
||||
// VirtualCardArray VirtualCardArray
|
||||
type VirtualCardArray struct {
|
||||
}
|
||||
|
||||
// HistoryCardArray HistoryCardArray
|
||||
type HistoryCardArray struct {
|
||||
}
|
||||
|
||||
// BalanceNotice BalanceNotice
|
||||
type BalanceNotice struct {
|
||||
}
|
||||
|
||||
// FetchNotice FetchNotice
|
||||
type FetchNotice struct {
|
||||
}
|
||||
|
||||
// PayMenuArray PayMenuArray
|
||||
type PayMenuArray struct {
|
||||
}
|
||||
|
||||
// FavorComposeChannelInfo struct {
|
||||
type FavorComposeChannelInfo struct {
|
||||
}
|
||||
|
||||
// TouchInfo TouchInfo
|
||||
type TouchInfo struct {
|
||||
ISOpenTouch string `json:"is_open_touch"`
|
||||
UseTouchPay string `json:"use_touch_pay"`
|
||||
}
|
||||
|
||||
// TenPayUserInfo TenPayUserInfo
|
||||
type TenPayUserInfo struct {
|
||||
ISReg string `json:"is_reg"`
|
||||
TrueName string `json:"true_name"`
|
||||
BindCardNum string `json:"bind_card_num"`
|
||||
ICardUserFlag string `json:"icard_user_flag"`
|
||||
CreName string `json:"cre_name"`
|
||||
CreType string `json:"cre_type"`
|
||||
TransferURL string `json:"transfer_url"`
|
||||
TouchInfo TouchInfo `json:"touch_info"`
|
||||
LctWording string `json:"lct_wording"`
|
||||
LctURL string `json:"lct_url"`
|
||||
AuthenChannelState uint64 `json:"authen_channel_state"`
|
||||
}
|
||||
|
||||
// SwitchInfo SwitchInfo
|
||||
type SwitchInfo struct {
|
||||
SwitchBit uint32 `json:"switch_bit"`
|
||||
}
|
||||
|
||||
// BalanceInfo BalanceInfo
|
||||
type BalanceInfo struct {
|
||||
UseCftBalance string `json:"use_cft_balance"`
|
||||
BalanceBankType string `json:"balance_bank_type"`
|
||||
BalanceBindSerial string `json:"balance_bind_serial"`
|
||||
TotalBalance string `json:"total_balance"`
|
||||
AvailBalance string `json:"avail_balance"`
|
||||
FrozenBalance string `json:"frozen_balance"`
|
||||
FetchBalance string `json:"fetch_balance"`
|
||||
Mobile string `json:"mobile"`
|
||||
SupportMicropay string `json:"support_micropay"`
|
||||
BalanceListURL string `json:"balance_list_url"`
|
||||
BalanceVersion uint32 `json:"balance_version"`
|
||||
TimeOut uint32 `json:"time_out"`
|
||||
BalanceLogoURL string `json:"balance_logo_url"`
|
||||
}
|
||||
|
||||
// WalletInfo WalletInfo
|
||||
type WalletInfo struct {
|
||||
WalletBalance uint32 `json:"wallet_balance"`
|
||||
WalletEntranceBalanceWwitchState uint32 `json:"wallet_entrance_balance_switch_state"`
|
||||
}
|
||||
|
||||
// BindQueryNewReq BindQueryNewReq
|
||||
type BindQueryNewReq struct {
|
||||
BalanceVersion uint32
|
||||
BindQueryScen uint32
|
||||
BindTypeCond string
|
||||
City string
|
||||
ISDeviceOpenTouch uint32
|
||||
ISRoot uint32
|
||||
Province string
|
||||
}
|
||||
|
||||
// TenPayReqItem TenPayReqItem
|
||||
type TenPayReqItem struct {
|
||||
CgiCMD uint32
|
||||
ReqText string
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
package baseinfo
|
||||
|
||||
// TimelineObject TimelineObject
|
||||
type TimelineObject struct {
|
||||
ID uint64 `xml:"id"`
|
||||
UserName string `xml:"username"`
|
||||
CreateTime uint32 `xml:"createTime"`
|
||||
ContentDesc string `xml:"contentDesc"`
|
||||
ContentDescShowType uint32 `xml:"contentDescShowType"`
|
||||
ContentDescScene uint32 `xml:"contentDescScene"`
|
||||
Private uint32 `xml:"private"`
|
||||
SightFolded uint32 `xml:"sightFolded"`
|
||||
ShowFlag uint32 `xml:"showFlag"`
|
||||
AppInfo AppInfo `xml:"appInfo"`
|
||||
SourceUserName string `xml:"sourceUserName"`
|
||||
SourceNickName string `xml:"sourceNickName"`
|
||||
StatisticsData string `xml:"statisticsData"`
|
||||
StatExtStr string `xml:"statExtStr"`
|
||||
ContentObject ContentObject `xml:"ContentObject"`
|
||||
ContentObjectVideo *ContentObjectVideo
|
||||
ActionInfo ActionInfo `xml:"actionInfo"`
|
||||
Location Location `xml:"location"`
|
||||
PublicUserName string `xml:"publicUserName"`
|
||||
StreamVideo StreamVideo `xml:"streamvideo"`
|
||||
}
|
||||
|
||||
// AppInfo AppInfo
|
||||
type AppInfo struct {
|
||||
ID string `xml:"id"`
|
||||
Version string `xml:"version"`
|
||||
AppName string `xml:"appName"`
|
||||
InstallURL string `xml:"installUrl"`
|
||||
FromURL string `xml:"fromUrl"`
|
||||
IsForceUpdate uint32 `xml:"isForceUpdate"`
|
||||
}
|
||||
|
||||
// ContentObject ContentObject
|
||||
type ContentObject struct {
|
||||
ContentStyle uint32 `xml:"contentStyle"`
|
||||
Title string `xml:"title"`
|
||||
Description string `xml:"description"`
|
||||
MediaList MediaList `xml:"mediaList"`
|
||||
ContentURL string `xml:"contentUrl"`
|
||||
}
|
||||
|
||||
// MediaList MediaList
|
||||
type MediaList struct {
|
||||
Media []Media `xml:"media"`
|
||||
}
|
||||
|
||||
type Media struct {
|
||||
Enc Enc `xml:"enc"`
|
||||
ID uint64 `xml:"id"`
|
||||
Type uint32 `xml:"type"`
|
||||
Title string `xml:"title"`
|
||||
Description string `xml:"description"`
|
||||
Private uint32 `xml:"private"`
|
||||
UserData string `xml:"userData"`
|
||||
SubType uint32 `xml:"subType"`
|
||||
VideoSize VideoSize `xml:"videoSize"`
|
||||
URL URL `xml:"url"`
|
||||
Thumb Thumb `xml:"thumb"`
|
||||
Size Size `xml:"size"`
|
||||
VideoDuration float64 `xml:"videoDuration"`
|
||||
}
|
||||
|
||||
// Enc Enc
|
||||
type Enc struct {
|
||||
Key string `xml:"key,attr"`
|
||||
Value uint32 `xml:",chardata"`
|
||||
}
|
||||
|
||||
// VideoSize 视频大小
|
||||
type VideoSize struct {
|
||||
Width string `xml:"width,attr"`
|
||||
Height string `xml:"height,attr"`
|
||||
}
|
||||
|
||||
// URL URL
|
||||
type URL struct {
|
||||
Type string `xml:"type,attr"`
|
||||
Token string `xml:"token,attr"`
|
||||
Key string `xml:"key,attr"`
|
||||
EncIdx string `xml:"enc_idx,attr"`
|
||||
MD5 string `xml:"md5,attr"`
|
||||
VideoMD5 string `xml:"videomd5,attr"`
|
||||
Value string `xml:",chardata"`
|
||||
}
|
||||
|
||||
// Thumb Thumb
|
||||
type Thumb struct {
|
||||
Type string `xml:"type,attr"`
|
||||
Token string `xml:"token,attr"`
|
||||
Key string `xml:"key,attr"`
|
||||
EncIdx string `xml:"enc_idx,attr"`
|
||||
Value string `xml:",chardata"`
|
||||
}
|
||||
|
||||
// Size Size
|
||||
type Size struct {
|
||||
Width string `xml:"width,attr,omitempty"`
|
||||
Height string `xml:"height,attr,omitempty"`
|
||||
TotalSize string `xml:"totalSize,attr"`
|
||||
}
|
||||
|
||||
// ActionInfo ActionInfo
|
||||
type ActionInfo struct {
|
||||
AppMsg AppMsg `xml:"appMsg"`
|
||||
}
|
||||
|
||||
// AppMsg AppMsg
|
||||
type AppMsg struct {
|
||||
MessageAction string `xml:"messageAction"`
|
||||
}
|
||||
|
||||
// Location Location
|
||||
type Location struct {
|
||||
PoiClassifyID string `xml:"poiClassifyId,attr"`
|
||||
PoiName string `xml:"poiName,attr"`
|
||||
PoiAddress string `xml:"poiAddress,attr"`
|
||||
PoiClassifyType uint32 `xml:"poiClassifyType,attr"`
|
||||
City string `xml:"city,attr"`
|
||||
Latitude string `xml:"latitude,attr"`
|
||||
Longitude string `xml:"longitude,attr"`
|
||||
}
|
||||
|
||||
// StreamVideo StreamVideo
|
||||
type StreamVideo struct {
|
||||
StreamVideoURL string `xml:"streamvideourl"`
|
||||
StreamVideoThumbURL string `xml:"streamvideothumburl"`
|
||||
StreamVideoWebURL string `xml:"streamvideoweburl"`
|
||||
}
|
||||
|
||||
// FriendTransItem 同步转发的朋友项
|
||||
type FriendTransItem struct {
|
||||
FriendWXID string
|
||||
FirstPageMd5 string
|
||||
CreateTime uint32
|
||||
IsInited bool
|
||||
}
|
||||
|
||||
type SnsSyncResp struct {
|
||||
ContinueFlag uint32
|
||||
SnsSyncKey []byte
|
||||
SnsCount uint32
|
||||
SnsItems []SnsSyncItem
|
||||
}
|
||||
|
||||
type SnsSyncItem struct {
|
||||
CmdId uint32
|
||||
TimelineInfo TimelineObject
|
||||
}
|
||||
|
||||
// TimelineObject 代表 XML 中的 TimelineObject
|
||||
type TimelineObjectVideo struct {
|
||||
ID uint64 `xml:"id"`
|
||||
UserName string `xml:"username"`
|
||||
CreateTime uint32 `xml:"createTime"`
|
||||
ContentDesc string `xml:"contentDesc"`
|
||||
ContentDescShowType uint32 `xml:"contentDescShowType"`
|
||||
ContentDescScene uint32 `xml:"contentDescScene"`
|
||||
Private uint32 `xml:"private"`
|
||||
SightFolded uint32 `xml:"sightFolded"`
|
||||
ShowFlag uint32 `xml:"showFlag"`
|
||||
AppInfo AppInfo `xml:"appInfo"`
|
||||
SourceUserName string `xml:"sourceUserName"`
|
||||
SourceNickName string `xml:"sourceNickName"`
|
||||
StatisticsData string `xml:"statisticsData"`
|
||||
StatExtStr string `xml:"statExtStr"`
|
||||
ContentObject ContentObjectVideo `xml:"ContentObject"`
|
||||
ActionInfo ActionInfo `xml:"actionInfo"`
|
||||
Location Location `xml:"location"`
|
||||
PublicUserName string `xml:"publicUserName"`
|
||||
StreamVideo StreamVideo `xml:"streamvideo"`
|
||||
}
|
||||
|
||||
// ContentObject 代表 ContentObject 部分
|
||||
type ContentObjectVideo struct {
|
||||
ContentStyle string `xml:"contentStyle"`
|
||||
ContentSubStyle string `xml:"contentSubStyle"`
|
||||
Title string `xml:"title"`
|
||||
Description string `xml:"description"`
|
||||
ContentUrl string `xml:"contentUrl"`
|
||||
FinderFeed FinderFeed `xml:"finderFeed"`
|
||||
}
|
||||
|
||||
type FinderFeed struct {
|
||||
ObjectId string `xml:"objectId"`
|
||||
ObjectNonceId string `xml:"objectNonceId"`
|
||||
FeedType string `xml:"feedType"`
|
||||
Nickname string `xml:"nickname"`
|
||||
Username string `xml:"username"`
|
||||
Avatar string `xml:"avatar"`
|
||||
Desc string `xml:"desc"`
|
||||
MediaCount string `xml:"mediaCount"`
|
||||
LocalId string `xml:"localId"`
|
||||
AuthIconType string `xml:"authIconType"`
|
||||
AuthIconUrl string `xml:"authIconUrl"`
|
||||
MediaList MediaListVideo `xml:"mediaList"`
|
||||
MegaVideo MegaVideo `xml:"megaVideo"`
|
||||
BizUsername string `xml:"bizUsername"`
|
||||
BizNickname string `xml:"bizNickname"`
|
||||
BizAvatar string `xml:"bizAvatar"`
|
||||
BizUsernameV2 string `xml:"bizUsernameV2"`
|
||||
BizAuthIconType string `xml:"bizAuthIconType"`
|
||||
BizAuthIconUrl string `xml:"bizAuthIconUrl"`
|
||||
CoverEffectType string `xml:"coverEffectType"`
|
||||
CoverEffectText string `xml:"coverEffectText"`
|
||||
FinderForwardSource string `xml:"finderForwardSource"`
|
||||
ContactJumpInfoStr string `xml:"contactJumpInfoStr"`
|
||||
EcSource string `xml:"ecSource"`
|
||||
LastGMsgID string `xml:"lastGMsgID"`
|
||||
}
|
||||
|
||||
type MediaListVideo struct {
|
||||
Media []MediaItem `xml:"media"`
|
||||
}
|
||||
|
||||
type MediaItem struct {
|
||||
MediaType uint32 `xml:"mediaType"`
|
||||
Url string `xml:"url"`
|
||||
ThumbUrl string `xml:"thumbUrl"`
|
||||
CoverUrl string `xml:"coverUrl"`
|
||||
FullCoverUrl string `xml:"fullCoverUrl"`
|
||||
FullClipInset string `xml:"fullClipInset"`
|
||||
Width string `xml:"width"`
|
||||
Height string `xml:"height"`
|
||||
VideoPlayDuration string `xml:"videoPlayDuration"`
|
||||
}
|
||||
type MegaVideo struct {
|
||||
ObjectId string `xml:"objectId"`
|
||||
ObjectNonceId string `xml:"objectNonceId"`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package baseinfo
|
||||
|
||||
// SysMsg 系统消息
|
||||
type SysMsg struct {
|
||||
Type string `xml:"type,attr"`
|
||||
RevokeMsg RevokeMsg `xml:"revokemsg"`
|
||||
}
|
||||
|
||||
// RevokeMsg 撤回消息
|
||||
type RevokeMsg struct {
|
||||
Session string `xml:"session"`
|
||||
MsgID uint32 `xml:"msgid"`
|
||||
NewMsgID int64 `xml:"newmsgid"`
|
||||
ReplaceMsg string `xml:"replacemsg"`
|
||||
}
|
||||
|
||||
// 图片消息
|
||||
type Msg3 struct {
|
||||
Img Img `xml:"img"`
|
||||
}
|
||||
|
||||
type Img struct {
|
||||
AESKey string `xml:"aeskey,attr"`
|
||||
EncryVer string `xml:"encryver,attr"`
|
||||
CdnThumbAESKey string `xml:"cdnthumbaeskey,attr"`
|
||||
CdnThumbURL string `xml:"cdnthumburl,attr"`
|
||||
CdnThumbLength int32 `xml:"cdnthumblength,attr"`
|
||||
CdnThumbHeight int32 `xml:"cdnthumbheight,attr"`
|
||||
CdnThumbWidth int32 `xml:"cdnthumbwidth,attr"`
|
||||
CdnMidHeight int32 `xml:"cdnmidheight,attr"`
|
||||
CdnMidWidth int32 `xml:"cdnmidwidth,attr"`
|
||||
CdnHDHeight int32 `xml:"cdnhdheight,attr"`
|
||||
CdnHDWidth int32 `xml:"cdnhdwidth,attr"`
|
||||
CdnMidImgURL string `xml:"cdnmidimgurl,attr"`
|
||||
Length int32 `xml:"length,attr"`
|
||||
MD5 string `xml:"md5,attr"`
|
||||
OriginSourceMD5 string `xml:"originsourcemd5,attr"`
|
||||
}
|
||||
|
||||
// 表情包消息
|
||||
type Msg47 struct {
|
||||
Emoji Emoji `xml:"emoji"`
|
||||
// Add other elements in the <msg> tag that you want to parse
|
||||
}
|
||||
|
||||
type Emoji struct {
|
||||
FromUsername string `xml:"fromusername,attr"`
|
||||
ToUsername string `xml:"tousername,attr"`
|
||||
Type string `xml:"type,attr"`
|
||||
IDBuffer string `xml:"idbuffer,attr"`
|
||||
MD5 string `xml:"md5,attr"`
|
||||
Len int32 `xml:"len,attr"`
|
||||
ProductID string `xml:"productid,attr"`
|
||||
AndroidMD5 string `xml:"androidmd5,attr"`
|
||||
AndroidLen int32 `xml:"androidlen,attr"`
|
||||
S60v3MD5 string `xml:"s60v3md5,attr"`
|
||||
S60v3Len int32 `xml:"s60v3len,attr"`
|
||||
S60v5MD5 string `xml:"s60v5md5,attr"`
|
||||
S60v5Len int32 `xml:"s60v5len,attr"`
|
||||
CdnURL string `xml:"cdnurl,attr"`
|
||||
DesignerID string `xml:"designerid,attr"`
|
||||
ThumbURL string `xml:"thumburl,attr"`
|
||||
EncryptURL string `xml:"encrypturl,attr"`
|
||||
AesKey string `xml:"aeskey,attr"`
|
||||
ExternURL string `xml:"externurl,attr"`
|
||||
ExternMD5 string `xml:"externmd5,attr"`
|
||||
Width string `xml:"width,attr"`
|
||||
Height string `xml:"height,attr"`
|
||||
TpURL string `xml:"tpurl,attr"`
|
||||
TpAuthKey string `xml:"tpauthkey,attr"`
|
||||
AttachedText string `xml:"attachedtext,attr"`
|
||||
AttachedTextColor string `xml:"attachedtextcolor,attr"`
|
||||
LensID string `xml:"lensid,attr"`
|
||||
EmojiAttr string `xml:"emojiattr,attr"`
|
||||
LinkID string `xml:"linkid,attr"`
|
||||
Desc string `xml:"desc,attr"`
|
||||
}
|
||||
Reference in New Issue
Block a user