GithubHelp home page GithubHelp logo

maxetto / antijoinbot Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 7.0 23 KB

AntiJoinBot (Bukkit Firewall) is the perfect way to protect your server from spambots and users who uses a proxy or a vpn.

Java 100.00%

antijoinbot's People

Contributors

maxetto avatar zjudgenie avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

antijoinbot's Issues

Region Block

I'm getting many bots with IPs that aren't blacklisted from Eastern Europe countries so I rather just block the countries

error

logs

[00:38:17] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to AntiJoinBot v5.0
org.bukkit.event.EventException
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.11.2.jar:git-Paper-1090]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1090]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1090]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.11.2.jar:git-Paper-1090]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.PlayerList.onPlayerJoin(PlayerList.java:352) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.PlayerList.a(PlayerList.java:178) [patched_1.11.2.jar:git-Paper-1090]
	at protocolsupport.zplatform.impl.spigot.network.handler.SpigotLoginListenerPlay.joinGame(SpigotLoginListenerPlay.java:121) [ProtocolSupport.jar:?]
	at protocolsupport.protocol.packet.handler.AbstractLoginListenerPlay.tryJoin(AbstractLoginListenerPlay.java:115) [ProtocolSupport.jar:?]
	at protocolsupport.protocol.packet.handler.AbstractLoginListenerPlay.tick(AbstractLoginListenerPlay.java:74) [ProtocolSupport.jar:?]
	at protocolsupport.zplatform.impl.spigot.network.handler.SpigotLoginListenerPlay.F_(SpigotLoginListenerPlay.java:67) [ProtocolSupport.jar:?]
	at net.minecraft.server.v1_11_R1.NetworkManager.a(NetworkManager.java:239) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.ServerConnection.c(ServerConnection.java:150) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:925) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:754) [patched_1.11.2.jar:git-Paper-1090]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:652) [patched_1.11.2.jar:git-Paper-1090]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 32,412,055 milliseconds ago.  The last packet sent successfully to the server was 32,412,056 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
	at sun.reflect.GeneratedConstructorAccessor285.newInstance(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3743) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2506) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.certox.MySQL.setUserName(MySQL.java:171) ~[?:?]
	at com.certox.Core.onPlayerJoinEvent(Core.java:240) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor537.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.11.2.jar:git-Paper-1090]
	... 17 more
Caused by: java.net.SocketException: Broken pipe (Write failed)
	at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_121]
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_121]
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_121]
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[?:1.8.0_121]
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) ~[?:1.8.0_121]
	at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3725) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2506) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739) ~[patched_1.11.2.jar:git-Paper-1090]
	at com.certox.MySQL.setUserName(MySQL.java:171) ~[?:?]
	at com.certox.Core.onPlayerJoinEvent(Core.java:240) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor537.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.11.2.jar:git-Paper-1090]
	... 17 more

timings
https://timings.aikar.co/?id=31dbf7be1bb24afdbfa97c27633db9a3

Few Fixes? Details and Cookies within.

The following fixes should allow user bypass to work correctly.

Line:
283: this.db.userBlacklist.containsKey(e.getPlayer())) TO this.db.userBlacklist.containsKey(e.getPlayer().getName()))

284: this.db.userBlacklist.get(e.getPlayer()) TO this.db.userBlacklist.get(e.getPlayer().getName())

285: ((Boolean)this.db.userBlacklist.get(e.getPlayer())).booleanValue() TO ((Boolean)this.db.userBlacklist.get(e.getPlayer().getName())).booleanValue()

The reload command wasn't working correctly either (not reading new data placed in (example changing a users block status from false to true)

After line 388 you might want to add loadDBOfflinetoRAM(); to load the changes (as well as loadDBtoRAM for non offline mode).
Wouldn't hurt to clear the HashMaps prior to the loads in each of them as well I guess.

I hoped this kinda helped.

Where's the pom?

Is this mavenized? The directory structure suggests it would be but there's no pom...

Update for 1.12.2 needed

[01:09:37 WARN]: [AJB] Plugin AntiJoinBot v5.0 generated an exception while executing task 23
java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;
at org.mcstats.Metrics.postPlugin(Metrics.java:335) ~[?:?]
at org.mcstats.Metrics.access$4(Metrics.java:328) ~[?:?]
at org.mcstats.Metrics$1.run(Metrics.java:223) ~[?:?]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[mc.jar:git-Spigot-93e20b3-31d3159]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [mc.jar:git-Spigot-93e20b3-31d3159]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]

BungeeCord Support

Can you add BungeeCord support to have this run on the BungeeCord server?

Black Box Proxy Block URL changed

Hello, I maintain the "Black Box Proxy Block" service which is used by this plugin. I wanted to inform you that our URL has changed. In /src/main/java/com/certox/Core.java, instead of:

this.activeBlacklist.put("http://www,shroomery,org/ythan/proxycheck,php?ip=", "Y");

you can avoid a redirect if you use:

this.activeBlacklist.put("http://proxy,mind-media,com/block/proxycheck,php?ip=", "Y");

Thank you for your consideration and I hope you continue to find this service useful!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.