Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
9140fb89
Commit
9140fb89
authored
Dec 30, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert `.run` calls to member accesses
parent
74b5b29d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
107 deletions
+102
-107
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt
...ai/qqandroid/network/protocol/packet/login/LoginPacket.kt
+102
-107
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt
View file @
9140fb89
...
...
@@ -29,115 +29,110 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse, Log
writeShort
(
9
)
// subCommand
writeShort
(
LoginType
.
PASSWORD
.
value
.
toShort
())
client
.
run
{
client
.
device
.
run
{
val
appId
=
16L
val
subAppId
=
2L
t18
(
appId
,
appClientVersion
,
account
.
id
)
t1
(
account
.
id
,
ipAddress
)
t106
(
appId
,
subAppId
/* maybe 1*/
,
appClientVersion
,
account
.
id
,
ipAddress
,
1
,
account
.
passwordMd5
,
0
,
account
.
id
.
toByteArray
(),
tgtgtKey
,
true
,
guid
,
LoginType
.
PASSWORD
)
/* // from GetStWithPasswd
int mMiscBitmap = this.mMiscBitmap;
if (t.uinDeviceToken) {
mMiscBitmap = (this.mMiscBitmap | 0x2000000);
}
// defaults true
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
*/
t116
(
miscBitMap
,
subSigMap
,
longArrayOf
(
1600000226L
))
t100
(
appId
,
subAppId
,
appClientVersion
,
mainSigMap
or
0
xC0
)
t107
(
0
)
t108
(
byteArrayOf
())
// ignored: t104()
t142
(
apkId
)
// if login with non-number uin
// t112()
t144
(
androidId
=
androidId
,
androidDevInfo
=
generateDeviceInfoData
(),
osType
=
osType
,
osVersion
=
version
.
release
,
ipv6NetType
=
ipv6NetType
,
simInfo
=
simInfo
,
unknown
=
byteArrayOf
(),
apn
=
apn
,
isGuidFromFileNull
=
false
,
isGuidAvailable
=
true
,
isGuidChanged
=
false
,
guidFlag
=
guidFlag
(
GuidSource
.
FROM_STORAGE
,
MacOrAndroidIdChangeFlag
.
NoChange
),
buildModel
=
model
,
guid
=
guid
,
buildBrand
=
brand
,
tgtgtKey
=
tgtgtKey
)
t145
(
guid
)
t147
(
appId
,
apkVersionName
,
apkSignatureMd5
)
if
(
miscBitMap
and
0
x80
!=
0
)
{
t166
(
1
)
}
// ignored t16a because array5 is null
t154
(
ssoSequenceId
)
t141
(
simInfo
,
ipv6NetType
,
apn
)
t8
(
2052
)
// ignored t511 because domain is null
// ignored t172 because rollbackSig is null
// ignored t185 because loginType is not SMS
// ignored t400 because of first login
t187
(
macAddress
)
t188
(
androidId
)
if
(
imsiMd5
.
isNotEmpty
())
{
t194
(
imsiMd5
)
}
t191
()
t201
(
N
=
byteArrayOf
())
val
bssid
=
wifiBSSID
val
ssid
=
wifiSSID
if
(
bssid
!=
null
&&
ssid
!=
null
)
{
t202
(
bssid
,
ssid
)
}
t177
()
t516
()
t521
()
t525
(
buildPacket
{
t536
(
buildPacket
{
//com.tencent.loginsecsdk.ProtocolDet#packExtraData
writeByte
(
1
)
// const
writeByte
(
0
)
// data count
}.
readBytes
())
})
// ignored t318 because not logging in by QR
}
val
appId
=
16L
val
subAppId
=
2L
t18
(
appId
,
client
.
appClientVersion
,
client
.
account
.
id
)
t1
(
client
.
account
.
id
,
client
.
device
.
ipAddress
)
t106
(
appId
,
subAppId
/* maybe 1*/
,
client
.
appClientVersion
,
client
.
account
.
id
,
client
.
device
.
ipAddress
,
1
,
client
.
account
.
passwordMd5
,
0
,
client
.
account
.
id
.
toByteArray
(),
client
.
tgtgtKey
,
true
,
client
.
device
.
guid
,
LoginType
.
PASSWORD
)
/* // from GetStWithPasswd
int mMiscBitmap = this.mMiscBitmap;
if (t.uinDeviceToken) {
mMiscBitmap = (this.mMiscBitmap | 0x2000000);
}
}
// defaults true
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
*/
t116
(
client
.
miscBitMap
,
client
.
subSigMap
,
longArrayOf
(
1600000226L
))
t100
(
appId
,
subAppId
,
client
.
appClientVersion
,
client
.
mainSigMap
or
0
xC0
)
t107
(
0
)
t108
(
byteArrayOf
())
// ignored: t104()
t142
(
client
.
apkId
)
// if login with non-number uin
// t112()
t144
(
androidId
=
client
.
device
.
androidId
,
androidDevInfo
=
client
.
device
.
generateDeviceInfoData
(),
osType
=
client
.
device
.
osType
,
osVersion
=
client
.
device
.
version
.
release
,
ipv6NetType
=
client
.
ipv6NetType
,
simInfo
=
client
.
device
.
simInfo
,
unknown
=
byteArrayOf
(),
apn
=
client
.
device
.
apn
,
isGuidFromFileNull
=
false
,
isGuidAvailable
=
true
,
isGuidChanged
=
false
,
guidFlag
=
guidFlag
(
GuidSource
.
FROM_STORAGE
,
MacOrAndroidIdChangeFlag
.
NoChange
),
buildModel
=
client
.
device
.
model
,
guid
=
client
.
device
.
guid
,
buildBrand
=
client
.
device
.
brand
,
tgtgtKey
=
client
.
tgtgtKey
)
t145
(
client
.
device
.
guid
)
t147
(
appId
,
client
.
apkVersionName
,
client
.
apkSignatureMd5
)
if
(
client
.
miscBitMap
and
0
x80
!=
0
)
{
t166
(
1
)
}
// ignored t16a because array5 is null
t154
(
client
.
ssoSequenceId
)
t141
(
client
.
device
.
simInfo
,
client
.
ipv6NetType
,
client
.
device
.
apn
)
t8
(
2052
)
// ignored t511 because domain is null
// ignored t172 because rollbackSig is null
// ignored t185 because loginType is not SMS
// ignored t400 because of first login
t187
(
client
.
device
.
macAddress
)
t188
(
client
.
device
.
androidId
)
if
(
client
.
device
.
imsiMd5
.
isNotEmpty
())
{
t194
(
client
.
device
.
imsiMd5
)
}
t191
()
t201
(
N
=
byteArrayOf
())
val
bssid
=
client
.
device
.
wifiBSSID
val
ssid
=
client
.
device
.
wifiSSID
if
(
bssid
!=
null
&&
ssid
!=
null
)
{
t202
(
bssid
,
ssid
)
}
t177
()
t516
()
t521
()
t525
(
buildPacket
{
t536
(
buildPacket
{
//com.tencent.loginsecsdk.ProtocolDet#packExtraData
writeByte
(
1
)
// const
writeByte
(
0
)
// data count
}.
readBytes
())
})
// ignored t318 because not logging in by QR
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment