1
0
Fork
You've already forked spamblock
0
A quick hack to automatically report posts in a fediverse spam wave as they come in.
  • Go 100%
Sam Whited 3212d8ae84
Remove fediblock list, better lists exist
Signed-off-by: Sam Whited <sam@samwhited.com>
2024年10月09日 10:42:27 -04:00
.gitignore all: quick hacked together tool to report spam 2024年03月01日 12:13:48 -05:00
go.mod Fix module name for Go tooling compatibility 2024年10月09日 08:24:02 -04:00
go.sum Apply report patch using go.mod file 2024年10月09日 08:21:42 -04:00
LICENSE license: add CC0 license 2024年03月01日 12:16:07 -05:00
main.go Update for current spam wave 2024年10月08日 17:49:16 -04:00
README.md Apply report patch using go.mod file 2024年10月09日 08:21:42 -04:00

spamblock

This is a quick script I threw together to help mitigate spam waves on Mastodon. The current iteration of spam waves are somewhat naive and easy to detect, this may not always be the case. This tool does not try to be a generalizable spam system, it is meant to be simple and block lots of posts that meet obvious and common patterns.

Building

This project requires go-mastodon which is, unfortunately, mostly unmaintained. The go.mod file currently relies on a forked version of it that applies the patch from go-mastodon#193. If you want to use a newer upstream version, you'll need to apply this patch yourself.

Use

spamblock can be configured with several environment variables:

SPAMBLOCK_SERVER — The server to connect to, including the scheme, eg.
 https://social.coop
SPAMBLOCK_TAG — A hashtag to search for, eg. "SpammersTag"
SPAMBLOCK_CLIENT_ID — The client ID from the app credentials
SPAMBLOCK_CLIENT_SECRET — The client secret from the app credentials
SPAMBLOCK_ACCESS_TOKEN — The access token from the app credentials

License

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.

Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law.

When using or citing the work, you should not imply endorsement by the author or the affirmer.

See the LICENSE file for the legal code.