reverse brutforce check

This commit is contained in:
jusax23 2023-03-08 17:10:44 +01:00
parent 7da2783b04
commit 083bec3d30
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41

View file

@ -12,7 +12,7 @@ export const activateWS = () => { activeWS = true; };
export const wsOnConnection = (socket: ws.WebSocket, req: http.IncomingMessage) => { export const wsOnConnection = (socket: ws.WebSocket, req: http.IncomingMessage) => {
let ip = req.socket.remoteAddress; let ip = req.socket.remoteAddress;
if (!activeWS || bruteforcecheck(ip ?? "")) { if (!activeWS || !bruteforcecheck(ip ?? "")) {
debug("WebSocket", "Rejected ip for bruteforce suspicion:", ip); debug("WebSocket", "Rejected ip for bruteforce suspicion:", ip);
socket.close(); socket.close();
return; return;