Basic chat filter preventing bypasses

Related tags

JSON chat-filter
Overview

chat-filter

Basic chat filter preventing bypasses

How it works

Once a user inputs a message, the message in its entirety is checked for any profanity or links - a word only has to be 80% similar or above to a banned word for it to be blocked - this is pretty funky currently, so I have plans to implement a whitelisted words list too.

To check string similarity, a combination of 4 different mathematical strategies are used.

These algorithms are implemented via a string similarity library found here.

Current efficiency

A full clean message of 100 characters takes approximately 120ms to check - this is the absolute longest case scenario.
This filter algorithm has a big-o notation of O(n), a linear increase.

As much as efficiency is important, I've been mainly focusing on accuracy, and making it as hard as possible to bypass. This is accomplished by removing any whitespace (such as spaces, underscores, hyphens, etc.) and checking different combinations of the string, replacing common number->letter bypasses too.

At the current time, this filter can detect a message such as:
"This guy is a F_4-6 90_T"
as the user attempting to say the word "faggot" with 100% confidence.

There is an option to turn checking for string similarity off, which will detect all bypasses, but it will not be able to block slightly misspelled words. However, the benefit to only relying on the regex is that a full message only takes approximately 1ms to check.

Updates to be done

  • Externally storing options, most likely in a mongo database
  • Further optimisations to cut the time taken to execute down as much as possible

Terms

This source code is only public for the purposes of other developers to review, and to showcase my work. If you wish to use any of the source code written by me, you must have my clear permission to do so. Once you have permission, however, you do not need to credit, reference or otherwise source my name in your project (but it would be appreciated if you did ❤️ ).

You might also like...

High performance Java implementation of a Cuckoo filter - Apache Licensed

Cuckoo Filter For Java This library offers a similar interface to Guava's Bloom filters. In most cases it can be used interchangeably and has addition

Dec 30, 2022

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

jmeter-graph-tool-maven-plugin A maven plugin to create graphs using the JMeter Plugins CMDRunner from JMeter result files (*.jtl or *.csv) or using F

Nov 3, 2022

Representational State Transfer + Structured Query Language(RSQL): Demo application using RSQL parser to filter records based on provided condition(s)

Representational State Transfer + Structured Query Language: RSQL Demo application using RSQL parser to filter records based on provided condition(s)

Nov 23, 2022

Java implementation of our paper: Efficient Private Set Intersection Cardinality inthe Reverse Unbalanced Setting Utilizing Hash-Prefix Filter

PSI-CA-Framework This is the Java implementation of our paper: Efficient Private Set Intersection Cardinality inthe Reverse Unbalanced Setting Utilizi

Dec 30, 2022

Simple LaTeX filter for OmegaT

Simple LaTeX filter plugin for OmegaT What is it? This plugin implements a subset of LaTeX syntax as OmegaT file filter. Translated content is expecte

May 24, 2022

Data extraction from smartphones and GPS and Accelerometer data "fusion" with Kalman filter.

 Data extraction from smartphones and GPS and Accelerometer data

This is library for GPS and Accelerometer data "fusion" with Kalman filter. All code is written in Java. It helps to increase position accuracy and GP

Nov 22, 2022

Core part of Jackson that defines Streaming API as well as basic shared abstractions

Overview This project contains core low-level incremental ("streaming") parser and generator abstractions used by Jackson Data Processor. It also incl

Jan 1, 2023

Melnica Server is a custom basic Servlet Container application which depends on Socket Programming.

Melnica Server is a custom basic Servlet Container application which depends on Socket Programming.

Melnica Server Melnica Server is a custom basic Servlet Container application which depends on Socket Programming. The Description of Project Melnica

Jun 26, 2022

This repository has the code for basic operations on tries - insert, search and delete.

This repository is part of the unacademy session series I took on 17th and 18th of April, 2021. I am daily improving it a bit, with the amount of time

Apr 27, 2021

Working sample code for the basic concepts in Minecraft and Forge.

Working sample code for the basic concepts in Minecraft and Forge.

Dec 31, 2022

GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

Jan 14, 2022

Operadora - A Minestom server implementation with basic features and supreme modularity 3

Operadora Operadora is a a Minestom server implementation with basic features, some utilities and full modularity. 3 Installation Download the latest

Dec 30, 2022

Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies

m2cgen m2cgen (Model 2 Code Generator) - is a lightweight library which provides an easy way to transpile trained statistical models into a native cod

Jan 4, 2023

A visual representation of labyrinth solving with common traversal and heuristic algorithms + basic AI patterns

A visual representation of labyrinth solving with common traversal and heuristic algorithms + basic AI patterns

Path-finder A visual representation of labyrinth solving algorithms using common traversal algorithms such as BFS, DFS, A*. Plus there are some basic

Jan 19, 2022

This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

Dec 10, 2022

Magic Bean: A very basic library which will generate POJOs.

Magic Bean: A very basic library which will generate POJOs.

Dec 27, 2022

This is a basic Java project focused on applying object-oriented design in a real world application

Email-Administration-System-in-Java This is a basic Java project focused on applying object-oriented design in a real world application. Email Adminis

Feb 4, 2022
Owner
Brandon
Software Engineer, A-Level CS Student
Brandon
Simple LaTeX filter for OmegaT

Simple LaTeX filter plugin for OmegaT What is it? This plugin implements a subset of LaTeX syntax as OmegaT file filter. Translated content is expecte

Lev Abashkin 4 May 24, 2022
Core part of Jackson that defines Streaming API as well as basic shared abstractions

Overview This project contains core low-level incremental ("streaming") parser and generator abstractions used by Jackson Data Processor. It also incl

FasterXML, LLC 2.1k Jan 1, 2023
BAIN Social is a Fully Decentralized Server/client system that utilizes Concepts pioneered by I2P, ToR, and PGP to create a system which bypasses singular hosts for data while keeping that data secure.

SYNOPSIS ---------------------------------------------------------------------------------------------------- Welcome to B.A.I.N - Barren's A.I. Natio

Barren A.I. Wolfsbane 14 Jan 11, 2022
This project shows how to configure basic auth to secure our rest API and basic transaction on Data JPA

Basic Atuthentication Spring Boot Data JPA, MySQL This project shows how to configure basic auth to secure our rest API and basic transaction on Data

Hafizullah Samim 1 Feb 10, 2022
A basic representation of the 0-player game, "Game-of-Life", a simple example of basic cellular automata

Game-Of-Life-Basic A basic representation of the 0-player game, "Game-of-Life", a simple example of basic cellular automata. A cellular automaton is a

Nikhil Narayanan 5 Oct 27, 2022
Messenger(Chat app) is a real time one to one chat application with Push Notifications made using Firebase...

Messenger If you want a APK then create an issue, i'll send the link.. ChatApp is a real time one to one chat application with Push Notifications made

Tales 14 Apr 30, 2022
Fixes Minecraft client lag from receiving chat messages, at the expense of not being able to block players in chat.

chat-lag-fix Fixes Minecraft client lag from receiving chat messages, at the expense of not being able to block players in chat. Mojang in their infin

adryd 21 Dec 4, 2022
NoChatLag fixes lagspikes caused by chat by removing the sender UUID from the chat packet. Please note that this breaks the vanilla client side block list.

NoChatLagServer Fabric Version | Forge Version Downloads: SpigotMC | GitHub Releases NoChatLagServer fixes WEB-5587 by setting the sender-uuid to that

Noah van der Aa 3 Jan 10, 2022
A mod for Fabric which cleans up your chat by removing duplicate messages, extending the chat history, and more

CompactChat for Fabric CompactChat is a mod which will clean up your minecraft chat. If a message is sent twice, the previous message will be removed,

Conor Byrne 12 Oct 26, 2022