Skip to content

Instantly share code, notes, and snippets.

@net1
net1 / example_host.conf
Created December 9, 2022 10:15 — forked from rm3nchaca/example_host.conf
Simple script for blocking attacker bots with nginx and a lua script
server {
listen 80;
server_name example.com;
root /www/example;
access_by_lua 'denyip()'; #check error counter
error_page 400 404 405 406 = /404.html;
location = /404.html {
set $inc 1; #this is useful for blocking website scanners
set_by_lua $err 'incerror()' $inc;
@net1
net1 / bayes_stopwords.cf
Created September 17, 2023 05:20
Stopwords for Asian languages in Unicode format for use with SpamAssassin
if (version >= 4.000000)
ifplugin Mail::SpamAssassin::Plugin::Bayes
if can(Mail::SpamAssassin::Conf::feature_bayes_stopwords)
bayes_stopword_th (\xe0(?:\xb8(?:\x97\xe0(?:\xb8(?:\xb1\xe0\xb9\x89\xe0\xb8\x87(?:\xe0\xb8\x99\xe0\xb8\xb5\xe0\xb9\x89)\x3f|\xb5\xe0\xb9\x88(?:\xe0\xb8\xaa\xe0\xb8\xb8\xe0\xb8\x94)\x3f|\xb2\xe0\xb8\x87|\xb8\xe0\xb8\x81)|\xb9\x8d\xe0\xb8\xb2(?:\xe0\xb9\x83\xe0\xb8\xab\xe0\xb9\x89)\x3f)|\x95\xe0(?:\xb9(?:\x88\xe0\xb8(?:\xb2\xe0\xb8\x87(?:\xe0\xb9\x86)\x3f|\xad)|\x89\xe0\xb8\xad\xe0\xb8\x87)|\xb8(?:\xb1\xe0\xb9\x89\xe0\xb8\x87(?:\xe0\xb9\x81\xe0\xb8\x95\xe0\xb9\x88)\x3f|\xb2\xe0\xb8\xa1))|\xab\xe0\xb8(?:\xa5\xe0\xb8(?:\xb1\xe0\xb8\x87(?:\xe0\xb8\x88\xe0\xb8\xb2\xe0\xb8\x81)\x3f|\xb2\xe0\xb8\xa2)|\x99\xe0\xb8\xb6\xe0\xb9\x88\xe0\xb8\x87|\xa3\xe0\xb8\xb7\xe0\xb8\xad|\xb2\xe0\xb8\x81)|\x99\xe0(?:\xb8(?:\xb1\xe0(?:\xb9\x89\xe0\xb8\x99|\xb8\x81)|\xad\xe0\xb8\x81\xe0\xb8\x88\xe0\xb8\xb2\xe0\xb8\x81|\xb5\xe0\xb9\x89)|\xb9(?:\x88\xe0\xb8\xb2|\x8d\xe0\xb8\xb2))|\xad\xe0\xb8(?:\xa2\xe0(?:\xb8