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
05735776
Commit
05735776
authored
Sep 11, 2019
by
Him188moe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated
parent
f19ea393
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
248 additions
and
84 deletions
+248
-84
mirai-core/pom.xml
mirai-core/pom.xml
+11
-1
mirai-core/src/main/java/net/mamoe/mirai/message/defaults/MessageChain.kt
...ain/java/net/mamoe/mirai/message/defaults/MessageChain.kt
+2
-2
mirai-core/src/main/java/net/mamoe/mirai/message/defaults/PlainText.kt
...c/main/java/net/mamoe/mirai/message/defaults/PlainText.kt
+3
-5
mirai-core/src/main/java/net/mamoe/mirai/network/RobotNetworkHandler.kt
.../main/java/net/mamoe/mirai/network/RobotNetworkHandler.kt
+1
-1
mirai-core/src/main/java/net/mamoe/mirai/network/packet/Session.kt
...e/src/main/java/net/mamoe/mirai/network/packet/Session.kt
+2
-2
mirai-core/src/main/java/net/mamoe/mirai/network/packet/action/ClientSendFriendMessagePacket.kt
...ai/network/packet/action/ClientSendFriendMessagePacket.kt
+2
-2
mirai-core/src/main/java/net/mamoe/mirai/network/packet/image/ClientGetGroupImageIDPacket.kt
...mirai/network/packet/image/ClientGetGroupImageIDPacket.kt
+64
-9
mirai-core/src/main/java/net/mamoe/mirai/utils/ProtocolBuff.kt
...-core/src/main/java/net/mamoe/mirai/utils/ProtocolBuff.kt
+0
-48
mirai-core/src/main/java/net/mamoe/mirai/utils/Utils.kt
mirai-core/src/main/java/net/mamoe/mirai/utils/Utils.kt
+9
-1
mirai-core/src/main/java/net/mamoe/mirai/utils/Varint.kt
mirai-core/src/main/java/net/mamoe/mirai/utils/Varint.kt
+132
-0
pom.xml
pom.xml
+22
-13
No files found.
mirai-core/pom.xml
View file @
05735776
...
@@ -17,6 +17,11 @@
...
@@ -17,6 +17,11 @@
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<groupId>
com.google.protobuf
</groupId>
<artifactId>
protobuf-java
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.jetbrains.kotlinx
</groupId>
<groupId>
org.jetbrains.kotlinx
</groupId>
<artifactId>
kotlinx-coroutines-core
</artifactId>
<artifactId>
kotlinx-coroutines-core
</artifactId>
...
@@ -56,7 +61,12 @@
...
@@ -56,7 +61,12 @@
<dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<artifactId>
jsoup
</artifactId>
<version>
1.12.1
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.ini4j
</groupId>
<artifactId>
ini4j
</artifactId>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
mirai-core/src/main/java/net/mamoe/mirai/message/defaults/MessageChain.kt
View file @
05735776
...
@@ -2,7 +2,7 @@ package net.mamoe.mirai.message.defaults
...
@@ -2,7 +2,7 @@ package net.mamoe.mirai.message.defaults
import
net.mamoe.mirai.message.Message
import
net.mamoe.mirai.message.Message
import
net.mamoe.mirai.message.MessageId
import
net.mamoe.mirai.message.MessageId
import
net.mamoe.mirai.utils.lazy
Encode
import
net.mamoe.mirai.utils.lazy
Output
import
org.intellij.lang.annotations.MagicConstant
import
org.intellij.lang.annotations.MagicConstant
import
java.util.*
import
java.util.*
import
java.util.stream.Collectors
import
java.util.stream.Collectors
...
@@ -71,7 +71,7 @@ class MessageChain : Message {
...
@@ -71,7 +71,7 @@ class MessageChain : Message {
return
this
return
this
}
}
override
fun
toByteArray
():
ByteArray
=
lazy
Encode
{
override
fun
toByteArray
():
ByteArray
=
lazy
Output
{
stream
().
forEach
{
message
->
stream
().
forEach
{
message
->
it
.
write
(
message
.
toByteArray
())
it
.
write
(
message
.
toByteArray
())
}
}
...
...
mirai-core/src/main/java/net/mamoe/mirai/message/defaults/PlainText.kt
View file @
05735776
...
@@ -2,9 +2,7 @@ package net.mamoe.mirai.message.defaults
...
@@ -2,9 +2,7 @@ package net.mamoe.mirai.message.defaults
import
net.mamoe.mirai.message.Message
import
net.mamoe.mirai.message.Message
import
net.mamoe.mirai.message.MessageId
import
net.mamoe.mirai.message.MessageId
import
net.mamoe.mirai.network.packet.writeVarByteArray
import
net.mamoe.mirai.utils.lazyOutput
import
net.mamoe.mirai.network.packet.writeVarString
import
net.mamoe.mirai.utils.lazyEncode
/**
/**
* @author Him188moe
* @author Him188moe
...
@@ -16,10 +14,10 @@ class PlainText(private val text: String) : Message() {
...
@@ -16,10 +14,10 @@ class PlainText(private val text: String) : Message() {
return
text
return
text
}
}
override
fun
toByteArray
():
ByteArray
=
lazy
Encode
{
section
->
override
fun
toByteArray
():
ByteArray
=
lazy
Output
{
section
->
section
.
writeByte
(
this
.
type
)
section
.
writeByte
(
this
.
type
)
section
.
writeVarByteArray
(
lazy
Encode
{
child
->
section
.
writeVarByteArray
(
lazy
Output
{
child
->
child
.
writeByte
(
0
x01
)
child
.
writeByte
(
0
x01
)
child
.
writeVarString
(
this
.
text
)
child
.
writeVarString
(
this
.
text
)
})
})
...
...
mirai-core/src/main/java/net/mamoe/mirai/network/RobotNetworkHandler.kt
View file @
05735776
...
@@ -301,7 +301,7 @@ class BotNetworkHandler(private val bot: Bot) : Closeable {
...
@@ -301,7 +301,7 @@ class BotNetworkHandler(private val bot: Bot) : Closeable {
private
lateinit
var
loginIP
:
String
private
lateinit
var
loginIP
:
String
private
var
tgtgtKey
:
ByteArray
=
getRandomByteArray
(
16
)
private
var
tgtgtKey
:
ByteArray
=
getRandomByteArray
(
16
)
private
var
tlv0105
:
ByteArray
=
lazy
Encode
{
private
var
tlv0105
:
ByteArray
=
lazy
Output
{
it
.
writeHex
(
"01 05 00 30"
)
it
.
writeHex
(
"01 05 00 30"
)
it
.
writeHex
(
"00 01 01 02 00 14 01 01 00 10"
)
it
.
writeHex
(
"00 01 01 02 00 14 01 01 00 10"
)
it
.
writeRandom
(
16
)
it
.
writeRandom
(
16
)
...
...
mirai-core/src/main/java/net/mamoe/mirai/network/packet/Session.kt
View file @
05735776
...
@@ -4,7 +4,7 @@ import net.mamoe.mirai.network.Protocol
...
@@ -4,7 +4,7 @@ import net.mamoe.mirai.network.Protocol
import
net.mamoe.mirai.utils.ByteArrayDataOutputStream
import
net.mamoe.mirai.utils.ByteArrayDataOutputStream
import
net.mamoe.mirai.utils.TEA
import
net.mamoe.mirai.utils.TEA
import
net.mamoe.mirai.utils.getRandomByteArray
import
net.mamoe.mirai.utils.getRandomByteArray
import
net.mamoe.mirai.utils.lazy
Encode
import
net.mamoe.mirai.utils.lazy
Output
import
java.io.DataInputStream
import
java.io.DataInputStream
import
java.net.InetAddress
import
java.net.InetAddress
...
@@ -85,7 +85,7 @@ class ServerSessionKeyResponsePacket(inputStream: DataInputStream, private val d
...
@@ -85,7 +85,7 @@ class ServerSessionKeyResponsePacket(inputStream: DataInputStream, private val d
527
->
{
527
->
{
input
.
goto
(
63
)
input
.
goto
(
63
)
sessionKey
=
input
.
readNBytes
(
16
)
sessionKey
=
input
.
readNBytes
(
16
)
tlv0105
=
lazy
Encode
{
tlv0105
=
lazy
Output
{
it
.
writeHex
(
"01 05 00 88 00 01 01 02 00 40 02 01 03 3C 01 03 00 00"
)
it
.
writeHex
(
"01 05 00 88 00 01 01 02 00 40 02 01 03 3C 01 03 00 00"
)
input
.
goto
(
dataLength
-
122
)
input
.
goto
(
dataLength
-
122
)
it
.
write
(
input
.
readNBytes
(
56
))
it
.
write
(
input
.
readNBytes
(
56
))
...
...
mirai-core/src/main/java/net/mamoe/mirai/network/packet/action/ClientSendFriendMessagePacket.kt
View file @
05735776
...
@@ -3,7 +3,7 @@ package net.mamoe.mirai.network.packet.action
...
@@ -3,7 +3,7 @@ package net.mamoe.mirai.network.packet.action
import
net.mamoe.mirai.message.defaults.MessageChain
import
net.mamoe.mirai.message.defaults.MessageChain
import
net.mamoe.mirai.network.Protocol
import
net.mamoe.mirai.network.Protocol
import
net.mamoe.mirai.network.packet.*
import
net.mamoe.mirai.network.packet.*
import
net.mamoe.mirai.utils.lazy
Encode
import
net.mamoe.mirai.utils.lazy
Output
import
java.io.DataInputStream
import
java.io.DataInputStream
/**
/**
...
@@ -29,7 +29,7 @@ class ClientSendFriendMessagePacket(
...
@@ -29,7 +29,7 @@ class ClientSendFriendMessagePacket(
it
.
writeHex
(
"37 0F"
)
it
.
writeHex
(
"37 0F"
)
it
.
writeQQ
(
botQQ
)
it
.
writeQQ
(
botQQ
)
it
.
writeQQ
(
targetQQ
)
it
.
writeQQ
(
targetQQ
)
it
.
write
(
md5
(
lazy
Encode
{
md5Key
->
md5Key
.
writeQQ
(
targetQQ
);
md5Key
.
write
(
sessionKey
)
}))
it
.
write
(
md5
(
lazy
Output
{
md5Key
->
md5Key
.
writeQQ
(
targetQQ
);
md5Key
.
write
(
sessionKey
)
}))
it
.
writeHex
(
"00 0B"
)
it
.
writeHex
(
"00 0B"
)
it
.
writeRandom
(
2
)
it
.
writeRandom
(
2
)
it
.
writeTime
()
it
.
writeTime
()
...
...
mirai-core/src/main/java/net/mamoe/mirai/network/packet/image/ClientGetGroupImageIDPacket.kt
View file @
05735776
package
net.mamoe.mirai.network.packet.image
package
net.mamoe.mirai.network.packet.image
import
net.mamoe.mirai.network.packet.*
import
net.mamoe.mirai.network.packet.*
import
net.mamoe.mirai.utils.writeProtoInt
import
net.mamoe.mirai.utils.toByteArray
import
net.mamoe.mirai.utils.writeUVarInt
import
java.awt.image.BufferedImage
import
java.awt.image.BufferedImage
/**
/**
...
@@ -13,23 +14,77 @@ import java.awt.image.BufferedImage
...
@@ -13,23 +14,77 @@ import java.awt.image.BufferedImage
@PacketId
(
"03 88"
)
@PacketId
(
"03 88"
)
@ExperimentalUnsignedTypes
@ExperimentalUnsignedTypes
class
ClientGetGroupImageIDPacket
(
class
ClientGetGroupImageIDPacket
(
val
bot
:
Long
,
private
val
bot
:
Long
,
val
sessionKey
:
ByteArray
,
private
val
sessionKey
:
ByteArray
,
val
group
:
Long
,
private
val
group
:
Long
,
val
image
:
BufferedImage
private
val
image
:
BufferedImage
)
:
ClientPacket
()
{
)
:
ClientPacket
()
{
override
fun
encode
()
{
override
fun
encode
()
{
this
.
writeRandom
(
2
)
this
.
writeRandom
(
2
)
this
.
writeQQ
(
bot
)
this
.
writeQQ
(
bot
)
this
.
writeHex
(
"04 00 00 00 01 01 01 00 00 68 20 00 00 00 00 00 00 00 00"
)
this
.
writeHex
(
"04 00 00 00 01 01 01 00 00 68 20 00 00 00 00 00 00 00 00"
)
val
byteArray
=
image
.
toByteArray
()
this
.
encryptAndWrite
(
sessionKey
)
{
this
.
encryptAndWrite
(
sessionKey
)
{
it
.
writeHex
(
"00 00 00 07 00 00 00 5E 08 01 12 03 98 01 01 10 01 1A"
)
it
.
writeZero
(
3
)
it
.
writeHex
(
"5A"
)
it
.
writeHex
(
"07 00"
)
it
.
writeZero
(
2
)
it
.
writeHex
(
"5E"
)
it
.
writeHex
(
"08"
)
it
.
writeHex
(
"08"
)
it
.
writeProtoInt
(
group
)
it
.
writeHex
(
"01 12 03 98 01 01 10 01"
)
it
.
writeHex
(
"1A"
)
it
.
writeHex
(
"5A"
)
it
.
writeHex
(
"08"
)
it
.
writeHex
(
"08"
)
it
.
writeProtoInt
(
image
.
height
)
it
.
writeUVarInt
(
group
)
it
.
writeHex
(
"10"
)
it
.
writeUVarInt
(
bot
)
it
.
writeHex
(
"18 00"
)
it
.
writeHex
(
"22"
)
it
.
writeHex
(
"10"
)
it
.
write
(
md5
(
byteArray
))
it
.
writeHex
(
"28"
)
it
.
writeUVarInt
(
byteArray
.
size
.
toUInt
())
it
.
writeHex
(
"32"
)
it
.
writeHex
(
"1A"
)
it
.
writeHex
(
"37 00 4D 00 32 00 25 00 4C 00 31 00 56 00 32 00 7B 00 39 00 30 00 29 00 52 00"
)
it
.
writeHex
(
"38 01"
)
it
.
writeHex
(
"48 01"
)
it
.
writeHex
(
"50"
)
it
.
writeUVarInt
(
image
.
width
.
toUInt
())
it
.
writeHex
(
"58"
)
it
.
writeUVarInt
(
image
.
height
.
toUInt
())
it
.
writeHex
(
"60 04"
)
it
.
writeHex
(
"6A 05"
)
it
.
writeHex
(
"32 36 36 35 36 05"
)
it
.
writeHex
(
"70 00"
)
it
.
writeHex
(
"78 03"
)
it
.
writeHex
(
"80 01"
)
it
.
writeHex
(
"00"
)
}
}
}
}
}
fun
main
()
{
println
(
0
xff
)
}
}
\ No newline at end of file
mirai-core/src/main/java/net/mamoe/mirai/utils/ProtocolBuff.kt
deleted
100644 → 0
View file @
f19ea393
package
net.mamoe.mirai.utils
import
java.io.DataOutputStream
/**
* Google ProtocolBuff 的一些算法实现
*
* @author Him188moe
*/
/**
* 128(10000000) -> 0x7F (10000000_10000001)
*
* TODO improve
*/
@ExperimentalUnsignedTypes
fun
DataOutputStream
.
writeProtoFixedInt
(
int
:
Long
)
{
if
(
int
==
0
xFFL
)
{
this
.
writeShort
(
0
x80_01
)
//unsigned//1000000010000001
return
}
this
.
writeByte
((
int
.
rem
(
0
xFF
)
+
0
xFF
).
toInt
())
this
.
writeByte
((
int
/
0
xFF
).
toInt
())
}
/**
* 127(1111111(7)) -> 0x7F (11111111(8))
*
* TODO improve
*/
@ExperimentalUnsignedTypes
fun
DataOutputStream
.
writeProtoInt
(
int
:
Long
)
{
if
(
int
<
0
xFF
)
{
this
.
writeByte
((
int
and
0
xFF
).
toInt
())
//10000000
return
}
this
.
writeProtoFixedInt
(
int
)
}
@ExperimentalUnsignedTypes
fun
main
()
{
println
()
println
(
lazyEncode
{
it
.
writeProtoInt
(
128
)
}.
toUHexString
())
}
\ No newline at end of file
mirai-core/src/main/java/net/mamoe/mirai/utils/Utils.kt
View file @
05735776
package
net.mamoe.mirai.utils
package
net.mamoe.mirai.utils
import
net.mamoe.mirai.network.Protocol
import
net.mamoe.mirai.network.Protocol
import
java.awt.image.BufferedImage
import
java.io.ByteArrayOutputStream
import
java.io.ByteArrayOutputStream
import
java.io.DataOutputStream
import
java.io.DataOutputStream
import
java.io.File
import
java.io.File
import
java.lang.reflect.Field
import
java.lang.reflect.Field
import
java.util.*
import
java.util.*
import
java.util.zip.CRC32
import
java.util.zip.CRC32
import
javax.imageio.ImageIO
/**
/**
* @author Him188moe
* @author Him188moe
...
@@ -70,7 +72,7 @@ open class ByteArrayDataOutputStream : DataOutputStream(ByteArrayOutputStream())
...
@@ -70,7 +72,7 @@ open class ByteArrayDataOutputStream : DataOutputStream(ByteArrayOutputStream())
}
}
@JvmSynthetic
@JvmSynthetic
fun
lazyEncode
(
t
:
(
ByteArrayDataOutputStream
)
->
Unit
):
ByteArray
=
ByteArrayDataOutputStream
().
let
{
t
(
it
);
return
it
.
toByteArray
()
}
fun
lazyEncode
(
t
:
(
ByteArrayDataOutputStream
)
->
Unit
):
ByteArray
=
ByteArrayDataOutputStream
().
also
(
t
).
toByteArray
()
@ExperimentalUnsignedTypes
@ExperimentalUnsignedTypes
fun
getRandomByteArray
(
length
:
Int
):
ByteArray
{
fun
getRandomByteArray
(
length
:
Int
):
ByteArray
{
...
@@ -134,4 +136,10 @@ fun ByteArray.removeZeroTail(): ByteArray {
...
@@ -134,4 +136,10 @@ fun ByteArray.removeZeroTail(): ByteArray {
--
i
--
i
}
}
return
this
.
copyOfRange
(
0
,
i
+
1
)
return
this
.
copyOfRange
(
0
,
i
+
1
)
}
fun
BufferedImage
.
toByteArray
(
formatName
:
String
=
"PNG"
):
ByteArray
{
return
lazyEncode
{
ImageIO
.
write
(
this
,
formatName
,
it
)
}
}
}
\ No newline at end of file
mirai-core/src/main/java/net/mamoe/mirai/utils/Varint.kt
0 → 100644
View file @
05735776
@
file
:
JvmName
(
"Varint"
)
package
net.mamoe.mirai.utils
import
java.io.DataInputStream
import
java.io.DataOutputStream
import
java.io.IOException
import
java.io.InputStream
import
kotlin.experimental.or
/**
* Tool class for VarInt or VarLong operations.
*
* Some code from http://wiki.vg/Protocol.
*
* @author MagicDroidX of Nukkit Project
* @author lmlstarqaq of Nukkit Project
*/
fun
encodeZigZag32
(
signedInt
:
Int
):
Long
{
return
(
signedInt
shl
1
xor
(
signedInt
shr
31
)).
toLong
()
}
@ExperimentalUnsignedTypes
@JvmSynthetic
fun
decodeZigZag32
(
uint
:
UInt
):
Int
{
return
decodeZigZag32
(
uint
.
toLong
())
}
fun
decodeZigZag32
(
uint
:
Long
):
Int
{
return
(
uint
shr
1
).
toInt
()
xor
-(
uint
and
1
).
toInt
()
}
fun
encodeZigZag64
(
signedLong
:
Long
):
Long
{
return
signedLong
shl
1
xor
(
signedLong
shr
63
)
}
fun
decodeZigZag64
(
signedLong
:
Long
):
Long
{
return
signedLong
.
ushr
(
1
)
xor
-(
signedLong
and
1
)
}
@ExperimentalUnsignedTypes
@Throws
(
IOException
::
class
)
fun
DataInputStream
.
readVarInt
():
Int
{
return
decodeZigZag32
(
this
.
readUnsignedVarInt
())
}
@ExperimentalUnsignedTypes
@Throws
(
IOException
::
class
)
fun
DataInputStream
.
readUnsignedVarInt
():
UInt
{
return
read
(
this
,
5
).
toUInt
()
}
@ExperimentalUnsignedTypes
@Throws
(
IOException
::
class
)
fun
DataInputStream
.
readVarLong
():
Long
{
return
decodeZigZag64
(
readUnsignedVarLong
().
toLong
())
}
@ExperimentalUnsignedTypes
@Throws
(
IOException
::
class
)
fun
DataInputStream
.
readUnsignedVarLong
():
ULong
{
return
read
(
this
,
10
).
toULong
()
}
@Throws
(
IOException
::
class
)
fun
DataOutputStream
.
writeVarInt
(
signedInt
:
Int
)
{
this
.
writeUVarInt
(
encodeZigZag32
(
signedInt
))
}
@ExperimentalUnsignedTypes
@Throws
(
IOException
::
class
)
fun
DataOutputStream
.
writeUVarInt
(
uint
:
UInt
)
{
return
writeUVarInt
(
uint
.
toLong
())
}
@Throws
(
IOException
::
class
)
fun
DataOutputStream
.
writeUVarInt
(
uint
:
Long
)
{
this
.
write0
(
uint
)
}
@Throws
(
IOException
::
class
)
fun
DataOutputStream
.
writeVarLong
(
signedLong
:
Long
)
{
this
.
writeUVarLong
(
encodeZigZag64
(
signedLong
))
}
@Throws
(
IOException
::
class
)
fun
DataOutputStream
.
writeUVarLong
(
ulong
:
Long
)
{
this
.
write0
(
ulong
)
}
@Throws
(
IOException
::
class
)
private
fun
DataOutputStream
.
write0
(
long
:
Long
)
{
var
value
=
long
do
{
var
temp
=
(
value
and
127
).
toByte
()
value
=
value
ushr
7
if
(
value
!=
0L
)
{
temp
=
temp
or
128
.
toByte
()
}
this
.
writeByte
(
temp
.
toInt
())
}
while
(
value
!=
0L
)
}
@Throws
(
IOException
::
class
)
private
fun
read
(
stream
:
DataInputStream
,
maxSize
:
Int
):
Long
{
var
value
:
Long
=
0
var
size
=
0
var
b
=
stream
.
readByte
().
toInt
()
while
(
b
and
0
x80
==
0
x80
)
{
value
=
value
or
((
b
and
0
x7F
).
toLong
()
shl
size
++
*
7
)
require
(
size
<
maxSize
)
{
"VarLong too big"
}
b
=
stream
.
readByte
().
toInt
()
}
return
value
or
((
b
and
0
x7F
).
toLong
()
shl
size
*
7
)
}
@Throws
(
IOException
::
class
)
private
fun
read
(
stream
:
InputStream
,
maxSize
:
Int
):
Long
{
var
value
:
Long
=
0
var
size
=
0
var
b
=
stream
.
read
()
while
(
b
and
0
x80
==
0
x80
)
{
value
=
value
or
((
b
and
0
x7F
).
toLong
()
shl
size
++
*
7
)
require
(
size
<
maxSize
)
{
"VarLong too big"
}
b
=
stream
.
read
()
}
return
value
or
((
b
and
0
x7F
).
toLong
()
shl
size
*
7
)
}
\ No newline at end of file
pom.xml
View file @
05735776
...
@@ -17,10 +17,12 @@
...
@@ -17,10 +17,12 @@
</modules>
</modules>
<repositories>
<repositories>
<!--
<repository>
<repository>
<id>mamoe-repo</id>
<id>mamoe-repo</id>
<url>http://mamoe.net:8081/repository/public/</url>
<url>http://mamoe.net:8081/repository/public/</url>
</repository>
</repository>
-->
<repository>
<repository>
<id>
huawei
</id>
<id>
huawei
</id>
<url>
https://mirrors.huaweicloud.com/repository/maven/
</url>
<url>
https://mirrors.huaweicloud.com/repository/maven/
</url>
...
@@ -52,17 +54,24 @@
...
@@ -52,17 +54,24 @@
<version>
1.18.8
</version>
<version>
1.18.8
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.ini4j
</groupId>
<artifactId>
ini4j
</artifactId>
<version>
0.5.2
</version>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<groupId>
com.google.protobuf
</groupId>
<artifactId>
protobuf-java
</artifactId>
<version>
3.5.0
</version>
</dependency>
<dependency>
<groupId>
org.ini4j
</groupId>
<artifactId>
ini4j
</artifactId>
<version>
0.5.2
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
<dependency>
<dependency>
<groupId>
net.java.dev.jna
</groupId>
<groupId>
net.java.dev.jna
</groupId>
...
@@ -90,12 +99,6 @@
...
@@ -90,12 +99,6 @@
<version>
4.1.38.Final
</version>
<version>
4.1.38.Final
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.ini4j
</groupId>
<artifactId>
ini4j
</artifactId>
<version>
0.5.2
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib
</artifactId>
<artifactId>
kotlin-stdlib
</artifactId>
...
@@ -122,6 +125,12 @@
...
@@ -122,6 +125,12 @@
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
1.12.1
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
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