Merge remote-tracking branch 'origin/master'
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Commit
6206a80cc1
@ -33,7 +33,6 @@ import java.util.logging.LogRecord;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class ErrorLogger extends Handler {
|
public class ErrorLogger extends Handler {
|
||||||
private int ddosRate = 0;
|
|
||||||
|
|
||||||
ErrorLogger(){
|
ErrorLogger(){
|
||||||
Logger.getLogger("").addHandler(this);
|
Logger.getLogger("").addHandler(this);
|
||||||
@ -57,12 +56,7 @@ public class ErrorLogger extends Handler {
|
|||||||
if(logRecord.getThrown() != null)
|
if(logRecord.getThrown() != null)
|
||||||
logRecord.getThrown().printStackTrace(new PrintStream(stacktraceOutput));
|
logRecord.getThrown().printStackTrace(new PrintStream(stacktraceOutput));
|
||||||
String stacktrace = stacktraceOutput.toString();
|
String stacktrace = stacktraceOutput.toString();
|
||||||
if(stacktrace.contains("Cannot request protocol")) {
|
if (stacktrace.contains("ErrorLogger")) {
|
||||||
if(++ddosRate % 1000 == 0) {
|
|
||||||
SWException.log("Bungee", "DDOS", ddosRate + "");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
} else if (stacktrace.contains("ErrorLogger")) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,6 +80,7 @@ public class ErrorLogger extends Handler {
|
|||||||
List<String> contains = new ArrayList<>();
|
List<String> contains = new ArrayList<>();
|
||||||
contains.add("Error authenticating ");
|
contains.add("Error authenticating ");
|
||||||
contains.add("read timed out");
|
contains.add("read timed out");
|
||||||
|
contains.add("could not decode packet");
|
||||||
contains.add("Connection reset by peer");
|
contains.add("Connection reset by peer");
|
||||||
contains.add("No client connected for pending server");
|
contains.add("No client connected for pending server");
|
||||||
contains.add("Error occurred processing connection for");
|
contains.add("Error occurred processing connection for");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren