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
267a4ea5
Commit
267a4ea5
authored
Nov 27, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move main to be easier to access
parent
d63e3678
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
mirai-debug/src/main/kotlin/PacketDebuger.kt
mirai-debug/src/main/kotlin/PacketDebuger.kt
+18
-18
No files found.
mirai-debug/src/main/kotlin/PacketDebuger.kt
View file @
267a4ea5
...
@@ -30,24 +30,6 @@ import kotlin.concurrent.thread
...
@@ -30,24 +30,6 @@ import kotlin.concurrent.thread
import
kotlin.coroutines.CoroutineContext
import
kotlin.coroutines.CoroutineContext
import
kotlin.io.use
import
kotlin.io.use
fun
main
()
{
/*
check(System.getProperty("os.arch") == "x86") { "Jpcap can only work with x86 JDK" }
JpcapCaptor.getDeviceList().forEach {
println(it)
}
JpcapCaptor.openDevice(JpcapCaptor.getDeviceList()[0], 65535, true, 1000).loopPacket(Int.MAX_VALUE) {
println(it)
}*/
val
localIp
=
Pcaps
.
findAllDevs
()[
0
].
addresses
[
0
].
address
.
hostAddress
println
(
"localIp = $localIp"
)
Pcaps
.
findAllDevs
().
forEach
{
listenDevice
(
localIp
,
it
)
}
println
(
"Ready perfectly"
)
}
/**
/**
* 避免 print 重叠. 单线程处理足够调试
* 避免 print 重叠. 单线程处理足够调试
*/
*/
...
@@ -95,6 +77,24 @@ private fun listenDevice(localIp: String, device: PcapNetworkInterface) {
...
@@ -95,6 +77,24 @@ private fun listenDevice(localIp: String, device: PcapNetworkInterface) {
}
}
}
}
fun
main
()
{
/*
check(System.getProperty("os.arch") == "x86") { "Jpcap can only work with x86 JDK" }
JpcapCaptor.getDeviceList().forEach {
println(it)
}
JpcapCaptor.openDevice(JpcapCaptor.getDeviceList()[0], 65535, true, 1000).loopPacket(Int.MAX_VALUE) {
println(it)
}*/
val
localIp
=
Pcaps
.
findAllDevs
()[
0
].
addresses
[
0
].
address
.
hostAddress
println
(
"localIp = $localIp"
)
Pcaps
.
findAllDevs
().
forEach
{
listenDevice
(
localIp
,
it
)
}
println
(
"Ready perfectly"
)
}
/**
/**
* 抓包分析器.
* 抓包分析器.
* 设置好 [sessionKey], 和 [qq] 后运行即可开始抓包和自动解密
* 设置好 [sessionKey], 和 [qq] 后运行即可开始抓包和自动解密
...
...
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