Socket.io profanity filter

for ref: https://glitch.com/edit/#!/glitchchord?path=public%2Fjs%2Fchat.js%3A124%3A3

this socket.io chat i would like to have a swear filter, getting words from a DB or array and censoring the words before saving

before: oh swearword
after: oh *********

1 Like

Okay, so you want profanity filter. Let’s get started.

Filtering can be easy but in reality no
People will separate letters or replace them with modified fonts to bypass detection, and even may send multiple messages in order to form a bad word (this is also includes text art). They can even use other languages and encryption. Which is very annoying and hard to prevent, but I will list some ways that can improve detection.

  1. Remove all non-alphabetic characters
    You want to replace all characters except alphabetical ones, as this will remove special characters, numbers, bypassed fonts, and many more. This will improve detection, there is a way around this but it’s still good to do it.
  2. Make entire string lowercased/uppercase
    Obvious one, but it will prevent people from using lowercased and uppercased characters in order to bypass the detection.
  3. Use regular expressions
    This one is really good one, since we can detect by patterns.
  4. Use artificial intelligence
    A modern and growing technology. You can train AI to detect bad stuff almost like a human. This one would be very good but would take time to train.
  5. Filter it out by list of bad words from array
    Old good method but easy to bypass.

When and where I should filter string?
There is two ways.

  1. Filter string on server before sending to other clients
    Good one, since we can keep database clean out of bad words, however if server gets hacked, hacker can send bad stuff.
  2. Filter string on client before showing it to user
    Really good one, since even if hacker hacks into server, or someone bypasses filtering on their client, other clients will still have non-hacked filtering system and theirs will work just fine.

But turns out, you can’t prevent it at all. It’s constant battle.

1 Like

Also, don’t overfilter, this is coming from someone who pasted google’s entire bad world filter into a mee6 discord bot. Our school server couldn’t tolerate it for more than 5 minutes

2 Likes

2% of my school even knows what Discord is (including our YOUNG male computer science techer). Count yourself lucky.

same here, except the teachers- they just blocked it

My DIstrict techs blocked it.

you can’t even search certain terms before the system thinks you’re trying to get onto p-hub

then it just locks you out

Damn. My school blocked us from the portal. I guess cause people got to p-hub from por

yeah, the school also uses machine learning to ‘learn from its mistakes’

it just literally keeps a record of who did what

a list of things blocked:

  • sites like p-hub
  • extension installation (some guys used a VPN to play krunker.io)
  • the terminal, despite system32 being in the open cause me and a friend copied a quarter of it to our OneDrive

Things that happens at my school.
School admins: blocks websites
Developers: makes an exact clone of the websites but better and gets payed $1 from almost everyone
School admins: I will block that too
Developers: Clones the website 100K+ times gets payed $10 from everyone
I was a developer once, but I almost got caught for something WAY worse, selling some stuff while people payed me and I didn’t ask for it. So I stopped.

my friend blew up a computer by accident, just by spamming the calculator app

it overheated, and bang- gone

funny ending, we had a cover that day who told us to NOT tell the technicians what happened

I am confused, and yet, I still don’t know how that could happen. How much CPU does the calculator app take. Or did you open it with 0/0 being ran?

We have a calculator button on our CPU so I would like to know how I can repo this.

we had a keyboard with an ‘open calculator’ button, he spammed it 3000 times and on the old CPU’s- after 1000 it gets really laggy. Then itt overheated and blew up

R E S P E C T (I need 20 charatcer)

handy trick for getting past the limit:

<areyouhappynowglitch>

so the technician came in, took it away without blinking. Few weeks later new computers were brought in with nvidia graphics cards. (needed, as it was 3d design)

see

Yall have gaming computers now?

I might just download some RD software and download steam.

lol, think so

all that CPU power is being used for 3d design