Commit 4ca18848 authored by Him188's avatar Him188

Update pom.xml

parent f2ddcb7e
package net.mamoe.mirai; package net.mamoe.mirai;
import java.io.PrintStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -33,10 +32,6 @@ public class MiraiAPI { ...@@ -33,10 +32,6 @@ public class MiraiAPI {
MiraiMain.main(args); MiraiMain.main(args);
} }
public static void setLogger(PrintStream stream){
MiraiServer.getInstance().getLogger().setOutPutStream(stream);
}
public static String getMiraiVersion(){ public static String getMiraiVersion(){
return MiraiServer.MIRAI_VERSION; return MiraiServer.MIRAI_VERSION;
} }
......
...@@ -26,19 +26,6 @@ ...@@ -26,19 +26,6 @@
<systemPath>${project.basedir}/lib/jpcap.jar</systemPath> <systemPath>${project.basedir}/lib/jpcap.jar</systemPath>
</dependency> </dependency>
<dependency>
<groupId>org.pcap4j</groupId>
<artifactId>pcap4j-core</artifactId>
<version>1.8.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.pcap4j</groupId>
<artifactId>pcap4j-packetfactory-static</artifactId>
<version>1.8.2</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
...@@ -92,13 +79,6 @@ ...@@ -92,13 +79,6 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -113,19 +93,6 @@ ...@@ -113,19 +93,6 @@
</resources> </resources>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>net.mamoe.mirai.MiraiMain</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
......
...@@ -116,10 +116,6 @@ public final class Bot implements Closeable { ...@@ -116,10 +116,6 @@ public final class Bot implements Closeable {
this.contacts.qqs.clear(); this.contacts.qqs.clear();
} }
public void addFriend(long qq) {
}
/* PRIVATE */ /* PRIVATE */
private static final AtomicInteger _id = new AtomicInteger(0); private static final AtomicInteger _id = new AtomicInteger(0);
......
...@@ -287,6 +287,7 @@ internal class BotNetworkHandlerImpl(private val bot: Bot) : BotNetworkHandler { ...@@ -287,6 +287,7 @@ internal class BotNetworkHandlerImpl(private val bot: Bot) : BotNetworkHandler {
is ServerLoginResponseFailedPacket -> { is ServerLoginResponseFailedPacket -> {
socket.loginFuture?.complete(packet.loginState) socket.loginFuture?.complete(packet.loginState)
bot.close()
return return
} }
......
...@@ -18,7 +18,7 @@ object Protocol { ...@@ -18,7 +18,7 @@ object Protocol {
//add("183.60.56.29") //add("183.60.56.29")
arrayOf( arrayOf(
//"sz3.tencent.com", "sz3.tencent.com",
"sz4.tencent.com", "sz4.tencent.com",
"sz5.tencent.com", "sz5.tencent.com",
"sz6.tencent.com", "sz6.tencent.com",
......
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import net.mamoe.mirai.Bot import net.mamoe.mirai.Bot
import net.mamoe.mirai.network.packet.login.LoginState import net.mamoe.mirai.network.packet.login.LoginState
import net.mamoe.mirai.utils.BotAccount import net.mamoe.mirai.utils.BotAccount
import net.mamoe.mirai.utils.Console import net.mamoe.mirai.utils.Console
import java.util.* import java.util.*
import java.util.concurrent.TimeUnit
/** /**
* 筛选掉无法登录(冻结/设备锁/UNKNOWN)的 qq * 筛选掉无法登录(冻结/设备锁/UNKNOWN)的 qq
...@@ -64,28 +66,36 @@ val qqList = "2535777366----abc123456\n" + ...@@ -64,28 +66,36 @@ val qqList = "2535777366----abc123456\n" +
"2534037598----abc123456\n" "2534037598----abc123456\n"
fun main() { suspend fun main() {
val goodBotList = Collections.synchronizedList(mutableListOf<Bot>()) val goodBotList = Collections.synchronizedList(mutableListOf<Bot>())
qqList.split("\n").forEach { withContext(Dispatchers.Default) {
GlobalScope.launch { qqList.split("\n")
val strings = it.split("----") .filterNot { it.isEmpty() }
val bot = Bot(BotAccount(strings[0].toLong(), strings[1].let { password -> .map { it.split("----") }
if (password.endsWith(".")) { .map { Pair(it[0].toLong(), it[1]) }
return@let password.substring(0, password.length - 1) .forEach { (qq, password) ->
} launch {
return@let password val bot = Bot(
}), Console()) BotAccount(
qq,
if (password.endsWith(".")) password.substring(0, password.length - 1) else password
),
Console()
)
withContext(Dispatchers.IO) {
bot.network.tryLogin().get(3, TimeUnit.MILLISECONDS)
}.let { state ->
if (!(state == LoginState.BLOCKED || state == LoginState.DEVICE_LOCK || state == LoginState.WRONG_PASSWORD)) {
goodBotList.add(bot)
} else {
bot.network.tryLogin().whenComplete { state, _ -> }
if (!(state == LoginState.BLOCKED || state == LoginState.DEVICE_LOCK || state == LoginState.WRONG_PASSWORD)) { }
goodBotList.add(bot) }
} }
}
}
} }
Thread.sleep(9 * 3000)
println(goodBotList.joinToString("\n") { it.account.qqNumber.toString() + " " + it.account.password }) println(goodBotList.joinToString("\n") { it.account.qqNumber.toString() + " " + it.account.password })
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment