From 47f48d1826f4e2c0338423503cdc800886d62d74 Mon Sep 17 00:00:00 2001 From: duogenesis <136373989+duogenesis@users.noreply.github.com> Date: Sat, 4 Jan 2025 08:17:08 +1100 Subject: [PATCH] Moderation 2025-01-04 --- antiabuse/antirude/profile/__init__.py | 11 ++++++++--- antiabuse/normalize/__init__.py | 25 +++++++++++++++---------- antiabuse/normalize/test_init.py | 23 +++++++++++++++++++++++ banned-club.sql | 19 +++++++++++++++++++ service/chat/__init__.py | 2 +- service/chat/rude/__init__.py | 6 ++++++ test/functionality4/xmpp-rate-limit.sh | 2 +- test/unit/unit.sh | 5 +---- 8 files changed, 74 insertions(+), 19 deletions(-) create mode 100644 antiabuse/normalize/test_init.py diff --git a/antiabuse/antirude/profile/__init__.py b/antiabuse/antirude/profile/__init__.py index 0c3046c..0b6eda6 100644 --- a/antiabuse/antirude/profile/__init__.py +++ b/antiabuse/antirude/profile/__init__.py @@ -3,6 +3,7 @@ import re _strings = [ + "1488", "cervix", "chink", "chinks", @@ -12,11 +13,13 @@ "coalburners", "coon", "cunny", - "cunny", "cunny-pilled", "cunnypilled", "cutmaxxer", + "dicked", + "dicking", "edtwt", + "groom me", "heil", "kike", "kill my self", @@ -32,10 +35,10 @@ "kys", "loli", "lolicon", - "nigg", "nigga", - "nigge", + "niggas", "nigger", + "niggerlicious", "niggers", "rape", "rapeable", @@ -55,6 +58,8 @@ "tnd", "troon", "troons", + "unrape", + "unrapeable", "you will never be a woman", "you'll never be a woman", "ywnbaw", diff --git a/antiabuse/normalize/__init__.py b/antiabuse/normalize/__init__.py index d858ffd..25017f0 100644 --- a/antiabuse/normalize/__init__.py +++ b/antiabuse/normalize/__init__.py @@ -8,41 +8,46 @@ "a[s5$]{2}": "ass", "b": "be", "btch": "bitch", - "c+u+m+": "cum", - "c+v+m+": "cum", "c0ck": "cock", "c0cksucker": "cocksucker", "cok": "cock", + "c+[uv]+m+": "cum", + "c+[uv]+m+s+": "cums", "cvmming": "cumming", - "cvms": "cums", "cvmshot": "cumshot", "ejakulate": "ejaculate", - "fck": "fuck", "fcked": "fucked", + "fck": "fuck", "fcking": "fucking", - "fk": "fuck", "fked": "fucked", + "fk": "fuck", "fking": "fucking", "fuckin": "fucking", - "fuk": "fuck", "fuked": "fucked", + "fuk": "fuck", "fuking": "fucking", - "fvck": "fuck", "fvcked": "fucked", + "fvck": "fuck", "fvcking": "fucking", "l0li": "loli", "ngger": "nigger", "nggr": "nigger", + "nigge": "nigger", + "nigg": "nigger", "p0rn": "porn", "p[e3]d[o0]": "pedo", "pissin": "pissing", + "r[a4]p[e3]-?able": "rapeable", + "r[a4]p[e3]": "rape", "r": "are", "sxy": "sexy", - "u": "you", - "ur": "your", + "un-?r[a4]p[e3]-?able": "unrapeable", + "un-?r[a4]p[e3]": "unrape", "urself": "yourself", - "wh0re": "whore", + "ur": "your", + "u": "you", "wh0res": "whores", + "wh0re": "whore", } diff --git a/antiabuse/normalize/test_init.py b/antiabuse/normalize/test_init.py new file mode 100644 index 0000000..5db6b1f --- /dev/null +++ b/antiabuse/normalize/test_init.py @@ -0,0 +1,23 @@ +import unittest +from antiabuse.normalize import normalize_string + +class TestNormalizeString(unittest.TestCase): + + def test_normalize_string(self): + self.assertEqual(normalize_string("fu"), "unrapeable") + + self.assertEqual(normalize_string("ccvvvmmm"), "cum") + + self.assertEqual(normalize_string("r4p3"), "rape") + + self.assertEqual(normalize_string("a55"), "ass") + + self.assertEqual(normalize_string("𝖓𝖎𝖌𝖌𝖊𝖗"), "nigger") + + self.assertEqual(normalize_string("𝖓𝖎𝖌𝖌𝖊"), "nigger") + + self.assertEqual(normalize_string("unr4pe-able"), "unrapeable") + + +if __name__ == '__main__': + unittest.main() diff --git a/banned-club.sql b/banned-club.sql index f168824..b41dad1 100644 --- a/banned-club.sql +++ b/banned-club.sql @@ -433,6 +433,7 @@ VALUES ('breed me'), ('brenton tarrant'), ('brenton tarrant fanclub'), + ('brocon'), ('broke ass mf'), ('broke ass nigga'), ('brown people beater'), @@ -575,11 +576,13 @@ VALUES ('cum maxxer'), ('cummaxxer'), ('cummaxxing'), + ('cummer'), ('cum metal'), ('cummies'), ('cumming'), ('cummm'), ('cummmm'), + ('cummy'), ('cumnation'), ('cum on me'), ('cum shot'), @@ -614,6 +617,8 @@ VALUES ('cuuum'), ('cyno sexer'), ('dat nigga'), + ('dead hooker'), + ('dead hooker enthusiast'), ('death'), ('death to america'), ('death to israel'), @@ -674,10 +679,12 @@ VALUES ('deport women'), ('dick'), ('dick cheese'), + ('dicked'), ('dick enlargement'), ('dickgirl'), ('dick growth club'), ('dickhead'), + ('dicking'), ('dick n balls'), ('dick owner'), ('dickriders'), @@ -1545,6 +1552,7 @@ VALUES ('i love ass'), ('i love boobs'), ('i love creeps'), + ('i love cum'), ('i love dick'), ('i love drinking cum'), ('i love feet'), @@ -1959,6 +1967,7 @@ VALUES ('kinda anorexic'), ('kinda horny'), ('kinda retarded'), + ('king therapist'), ('kkk'), ('kms'), ('knife play'), @@ -2168,18 +2177,22 @@ VALUES ('nigga'), ('nigga beamer'), ('nigga bowser'), + ('niggacado'), ('niggacel'), ('nigga chan'), ('nigga gaming'), + ('niggagaming'), ('niggah'), ('nigga hater'), ('nigga kun'), + ('niggalink'), ('nigga love'), ('niggamaxxing'), ('nigga penis'), ('niggarapist'), ('niggas'), ('niggastyle'), + ('niggatech'), ('nigga vaping'), ('nigger'), ('nigger beater'), @@ -2423,6 +2436,7 @@ VALUES ('raghead'), ('rag heads'), ('ragheads'), + ('rap3 me'), ('rape'), ('rapeable'), ('rapebait'), @@ -2431,8 +2445,10 @@ VALUES ('rape bunny'), ('rapebunny'), ('rapebutnotinanindianway'), + ('rapechad'), ('raped'), ('rapefag'), + ('rapegang'), ('rape in india'), ('rapeinindia'), ('rape in india today'), @@ -2467,6 +2483,7 @@ VALUES ('rapetoy'), ('rape victim'), ('rapevictim'), + ('rapewaffen'), ('rape women'), ('rapewomen'), ('raping'), @@ -2706,6 +2723,7 @@ VALUES ('starvemaxxing'), ('straight sex'), ('straight shota'), + ('struggle snuggle'), ('stupid and retarded'), ('stupid faggot little cocksucker'), ('subbiest bitch ever'), @@ -2858,6 +2876,7 @@ VALUES ('unless you trynna fuck'), ('uoh'), ('uohhh'), + ('uoohh'), ('uoooooooooooooooooooooooooooooooooooooooh'), ('use me'), ('veiny dick'), diff --git a/service/chat/__init__.py b/service/chat/__init__.py index e64b58f..be4ddf9 100644 --- a/service/chat/__init__.py +++ b/service/chat/__init__.py @@ -36,7 +36,7 @@ class IntroRateLimit(Enum): NONE = 0 - UNVERIFIED = 30 + UNVERIFIED = 20 BASICS = 40 PHOTOS = 100 diff --git a/service/chat/rude/__init__.py b/service/chat/rude/__init__.py index 7f1d313..9106e01 100644 --- a/service/chat/rude/__init__.py +++ b/service/chat/rude/__init__.py @@ -36,12 +36,14 @@ "beastial", "beastiality", "bellend", + "benis", "bestiality", "bitch", "blow job", "blow jobs", "blowjob", "blowjobs", + "boobies", "breasts", "bukkake", "butt fuck", @@ -112,6 +114,8 @@ "deep throated", "deepthroat", "dick", + "dicked", + "dicking", "dildo", "dildos", "do it raw", @@ -418,6 +422,8 @@ "tug job", "tug-job", "tugjob", + "unrape", + "unrapeable", "use me", "use you", "vagina", diff --git a/test/functionality4/xmpp-rate-limit.sh b/test/functionality4/xmpp-rate-limit.sh index 5b30683..6e977b5 100755 --- a/test/functionality4/xmpp-rate-limit.sh +++ b/test/functionality4/xmpp-rate-limit.sh @@ -207,7 +207,7 @@ test_rate_limit () { } test_rate_limit \ - 30 \ + 20 \ 1 \ '' diff --git a/test/unit/unit.sh b/test/unit/unit.sh index a8c77f6..78554b2 100755 --- a/test/unit/unit.sh +++ b/test/unit/unit.sh @@ -11,10 +11,7 @@ else fi "${sudos[@]}" docker exec "$("${sudos[@]}" docker ps | grep chat- | cut -d ' ' -f 1)" \ - python3 -m unittest discover -s antiabuse/antirude - -"${sudos[@]}" docker exec "$("${sudos[@]}" docker ps | grep chat- | cut -d ' ' -f 1)" \ - python3 -m unittest discover -s antiabuse/antispam + python3 -m unittest discover -s antiabuse "${sudos[@]}" docker exec "$("${sudos[@]}" docker ps | grep chat- | cut -d ' ' -f 1)" \ python3 -m unittest discover -s service/chat