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
9db9be4f
Commit
9db9be4f
authored
Nov 25, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specify class name output
parent
ef7dd73d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
40 deletions
+5
-40
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/Captcha.kt
....mamoe.mirai/network/protocol/tim/packet/login/Captcha.kt
+1
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/PasswordSubmission.kt
...i/network/protocol/tim/packet/login/PasswordSubmission.kt
+4
-40
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/Captcha.kt
View file @
9db9be4f
...
@@ -109,6 +109,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
...
@@ -109,6 +109,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
lateinit
var
captchaSectionN
:
IoBuffer
lateinit
var
captchaSectionN
:
IoBuffer
lateinit
var
captchaToken
:
IoBuffer
//56bytes
lateinit
var
captchaToken
:
IoBuffer
//56bytes
var
transmissionCompleted
:
Boolean
=
false
//验证码是否已经传输完成
var
transmissionCompleted
:
Boolean
=
false
//验证码是否已经传输完成
override
fun
toString
():
String
=
"CaptchaResponse.Transmission"
}
}
}
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/PasswordSubmission.kt
View file @
9db9be4f
...
@@ -77,56 +77,20 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
...
@@ -77,56 +77,20 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
}
}
sealed
class
LoginResponse
:
Packet
{
sealed
class
LoginResponse
:
Packet
{
data
class
KeyExchange
(
class
KeyExchange
(
val
tlv0006
:
IoBuffer
,
//120bytes
val
tlv0006
:
IoBuffer
,
//120bytes
val
tokenUnknown
:
ByteArray
?,
val
tokenUnknown
:
ByteArray
?,
val
privateKeyUpdate
:
PrivateKey
//16bytes
val
privateKeyUpdate
:
PrivateKey
//16bytes
)
:
LoginResponse
()
{
)
:
LoginResponse
()
{
override
fun
equals
(
other
:
Any
?):
Boolean
{
override
fun
toString
():
String
=
"LoginResponse.KeyExchange"
if
(
this
===
other
)
return
true
if
(
other
!
is
KeyExchange
)
return
false
if
(
tlv0006
!=
other
.
tlv0006
)
return
false
if
(
tokenUnknown
!=
null
)
{
if
(
other
.
tokenUnknown
==
null
)
return
false
if
(!
tokenUnknown
.
contentEquals
(
other
.
tokenUnknown
))
return
false
}
else
if
(
other
.
tokenUnknown
!=
null
)
return
false
if
(
privateKeyUpdate
!=
other
.
privateKeyUpdate
)
return
false
return
true
}
override
fun
hashCode
():
Int
{
var
result
=
tlv0006
.
hashCode
()
result
=
31
*
result
+
(
tokenUnknown
?.
contentHashCode
()
?:
0
)
result
=
31
*
result
+
privateKeyUpdate
.
hashCode
()
return
result
}
}
}
data
class
CaptchaInit
(
class
CaptchaInit
(
val
captchaPart1
:
IoBuffer
,
val
captchaPart1
:
IoBuffer
,
val
token00BA
:
ByteArray
,
val
token00BA
:
ByteArray
,
val
unknownBoolean
:
Boolean
val
unknownBoolean
:
Boolean
)
:
LoginResponse
()
{
)
:
LoginResponse
()
{
override
fun
equals
(
other
:
Any
?):
Boolean
{
override
fun
toString
():
String
=
"LoginResponse.CaptchaInit"
if
(
this
===
other
)
return
true
if
(
other
!
is
CaptchaInit
)
return
false
if
(
captchaPart1
!=
other
.
captchaPart1
)
return
false
if
(!
token00BA
.
contentEquals
(
other
.
token00BA
))
return
false
if
(
unknownBoolean
!=
other
.
unknownBoolean
)
return
false
return
true
}
override
fun
hashCode
():
Int
{
var
result
=
captchaPart1
.
hashCode
()
result
=
31
*
result
+
token00BA
.
contentHashCode
()
result
=
31
*
result
+
unknownBoolean
.
hashCode
()
return
result
}
}
}
data class
Success
(
data class
Success
(
...
...
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