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
c110c233
Commit
c110c233
authored
Aug 16, 2019
by
Him188moe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
97b90b08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
mirai-core/src/main/java/net/mamoe/mirai/network/ClientHandler.kt
...re/src/main/java/net/mamoe/mirai/network/ClientHandler.kt
+1
-1
mirai-core/src/main/java/net/mamoe/mirai/network/Robot.kt
mirai-core/src/main/java/net/mamoe/mirai/network/Robot.kt
+1
-1
mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/Server0825Packet.kt
...net/mamoe/mirai/network/packet/server/Server0825Packet.kt
+11
-1
No files found.
mirai-core/src/main/java/net/mamoe/mirai/network/ClientHandler.kt
View file @
c110c233
...
@@ -16,7 +16,7 @@ class ClientHandler(val robot: Robot) : SimpleChannelInboundHandler<ByteArray>()
...
@@ -16,7 +16,7 @@ class ClientHandler(val robot: Robot) : SimpleChannelInboundHandler<ByteArray>()
private
lateinit
var
bytes
:
ByteArray
private
lateinit
var
bytes
:
ByteArray
fun
init
(
bytes
:
ByteArray
)
{
fun
init
(
bytes
:
ByteArray
)
{
this
.
length
=
length
this
.
length
=
bytes
.
size
this
.
bytes
=
bytes
this
.
bytes
=
bytes
}
}
...
...
mirai-core/src/main/java/net/mamoe/mirai/network/Robot.kt
View file @
c110c233
...
@@ -23,7 +23,7 @@ class Robot(val number: Long) {
...
@@ -23,7 +23,7 @@ class Robot(val number: Long) {
}
}
}
}
internal
fun
sendPacket
(
packet
:
Packet
)
{
private
fun
sendPacket
(
packet
:
Packet
)
{
TODO
()
TODO
()
}
}
}
}
\ No newline at end of file
mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/Server0825Packet.kt
View file @
c110c233
...
@@ -12,6 +12,11 @@ import java.io.DataInputStream
...
@@ -12,6 +12,11 @@ import java.io.DataInputStream
class
Server0825Packet
(
private
val
type
:
Type
,
inputStream
:
DataInputStream
)
:
ServerPacket
(
inputStream
)
{
class
Server0825Packet
(
private
val
type
:
Type
,
inputStream
:
DataInputStream
)
:
ServerPacket
(
inputStream
)
{
lateinit
var
serverIP
:
String
;
lateinit
var
serverIP
:
String
;
var
loginTime
:
Long
=
0
;
lateinit
var
loginIP
:
String
;
lateinit
var
token
:
ByteArray
;
lateinit
var
tgtgtKey
:
ByteArray
enum
class
Type
{
enum
class
Type
{
TYPE_08_25_31_01
,
TYPE_08_25_31_01
,
TYPE_08_25_31_02
,
TYPE_08_25_31_02
,
...
@@ -19,7 +24,7 @@ class Server0825Packet(private val type: Type, inputStream: DataInputStream) : S
...
@@ -19,7 +24,7 @@ class Server0825Packet(private val type: Type, inputStream: DataInputStream) : S
override
fun
decode
()
{
override
fun
decode
()
{
input
.
skip
(
43
-
11
)
//todo: check
input
.
skip
(
43
-
11
)
//todo: check
val
data
=
DataInputStream
(
TEAEncryption
.
decrypt
(
input
.
readAllBytes
().
let
{
it
.
copyOfRange
(
0
,
it
.
size
-
45
)
},
when
(
type
)
{
val
data
=
DataInputStream
(
TEAEncryption
.
decrypt
(
input
.
readAllBytes
().
let
{
it
.
copyOfRange
(
0
,
it
.
size
-
2
)
},
when
(
type
)
{
//todo: check array range
Type
.
TYPE_08_25_31_01
->
Protocol
.
redirectionKey
.
toByteArray
()
Type
.
TYPE_08_25_31_01
->
Protocol
.
redirectionKey
.
toByteArray
()
Type
.
TYPE_08_25_31_02
->
Protocol
.
_0825key
.
toByteArray
()
Type
.
TYPE_08_25_31_02
->
Protocol
.
_0825key
.
toByteArray
()
}).
inputStream
());
}).
inputStream
());
...
@@ -29,7 +34,12 @@ class Server0825Packet(private val type: Type, inputStream: DataInputStream) : S
...
@@ -29,7 +34,12 @@ class Server0825Packet(private val type: Type, inputStream: DataInputStream) : S
serverIP
=
data
.
readIP
()
serverIP
=
data
.
readIP
()
}
}
0
X00
->
{
0
X00
->
{
data
.
skip
(
16
-
2
)
token
=
data
.
readNBytes
(
167
-
(
16
-
2
))
loginTime
=
data
.
readLong
()
//todo check
loginIP
=
data
.
readIP
()
TODO
(
"从易语言抄协议来"
)
}
}
else
->
{
else
->
{
}
}
...
...
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