A matrix bot to monitor and respond to investment scam spamming across the matrix platform, for example in rooms with a permanently offline admin.

Overview

Spam Police

A matrix bot to monitor and respond to investment scam spamming across the matrix platform, for example in rooms with a permanently offline admin.

How to add the bot to a room

You can use the instance of the bot I host, @anti-spam:matrix.org or you can selfhost below. Do note that the bot does not currently support encrypted rooms.

  • You can invite the bot account to a room, the bot is set up to auto accept invites if it is online.

  • You can run +invite [room alias or id] in a room that the bot is in and if it is able to join the room it will.

How to selfhost:

This assumes you have an up to date node and npm installed. On debian based systems (including ubuntu, pop!os, and linux mint) you can run sudo apt install node npm and on arch based systems (including manjaro) you can run sudo pacman -S node npm

  1. Download the latest stable branch of the bot to a folder on your computer (hopefuly obvious). I recomend you do this by going to the master▾ button on the top left of this github page, select the highest version number labeled stable, click the green code▾ button on the top right, and download the zip and extract it. If you use the https or ssh url to clone, it will clone the master which is more of a developer beta than a stable release, which you can use if you wish to live on the edge but its not the recomended way.

  2. Create a folder named db in the same folder as index.js

  3. In the db folder you just created, make a file called login.txt

  4. In login.txt put the login information in the following format:

homeserver
login token
channel to log discovered telegram scams

For example, an account on matrix.org would be

https://matrix.org
[redacted]
!xWGMKuBpJrtGDSfmaF:matrix.org

Do note that some homeservers require you to use https://matrix. before the homeserver domain.

  1. In the same folder as index.js make an empty textfile called bot.json. This appears to be how the matrix bot sdk saves the sync token and stuff, however it seems to work just fine if I delete this so maybe the code could be changed around to not require it?

  2. Run npm install to install the node dependencies to run the bot

  3. The bot can now be launched using node index.js or node . depending on which you prefer

Comments
  • Improve introduction text

    Improve introduction text

    The text (#16 ) should explain that if joining was unwanted, the operator should be contacted (within the support room?) and/or that it can be kicked.

    But effective abuse control through kicking requires that it also mentions kicking in the control room, and that would be additional complexity.

    opened by bkil 3
  • New bot command to identify the bot

    New bot command to identify the bot

    • At present, it only introduces itself in the initial post
    • Provide an option for the bot to identify itself when queried (ideally by a moderator later on, but at present just by anyone).
    • As a simple implementation, it could always reply when @mentioned.
    enhancement help wanted good first issue ¡¡¡¡AaaAaAAAAAA!!! next step 
    opened by bkil 2
  • Only accept commands in the commands room

    Only accept commands in the commands room

    • At present, anyone could get your bot banned by manually invite it or commanding it towards a high number of rooms (or just a few with a trigger-happy moderator)
    • As an easy workaround, only accept bot commands within its designated command room
    • You may leave the room public while it is not abused, but as a benefit, you would see where it is commanded to and by whom (and ban those who abuse this right and/or make the room invite-only later on)
    opened by bkil 2
  • Option to disable mod mentions

    Option to disable mod mentions

    We sometimes invite it to rooms that are abandoned. These are very good inputs to the scam detector, but it makes no sense to mention "mods" if there is nobody there. The current workaround is if a mod mutes the whole room completely, which is not ideal.

    It might be a good idea to have options to set this via #11

    duplicate 
    opened by bkil 1
  • Bot commands

    Bot commands

    The bot could be controlled by slash commands in a designated room and/or by whoever invited it and/or from whichever room it was sent from there.

    !police modmention false or !police modmention #room:example.com false

    duplicate wontfix 
    opened by bkil 1
  • handle when a room has no main alias

    handle when a room has no main alias

    The bot writes "in null" if the room has no primary alias published (but may have aliases otherwise) Could we perhaps print (all of) its aliases in such cases?
    enhancement help wanted 
    opened by jjj333-p 1
  • Switch to YAML configuration + authorized_users key

    Switch to YAML configuration + authorized_users key

    Warning This pull request will break existing instances (if updated)

    To fix your instance, you will have to go though the self-hosting instructions again.

    The configuration file is now in YAML format. In addition, this PR also adds the authorizedUsers variable, which is a list / array of users that can use admin commands.

    opened by archeite 0
  • Changed and Added fields to package.json (+ package-lock.json)

    Changed and Added fields to package.json (+ package-lock.json)

    • Ran npm init to create fields in package.json
    • Added start script that starts the bot (because why not)
    • Change named field in package-lock.json to match with repository name (spam-police)
    opened by archeite 0
  • Improvements to README.md

    Improvements to README.md

    Summary of changes:

    • Added, renamed, and resized headings
    • Hyperlinked Matrix rooms/spaces
    • Utilized the "new" note/warning labels
    • Added UNIX commands so self-hosters can easily copy and paste
    • Reworded and formatted text
    • Added git as an optional requirement along with NodeJS and NPM
    opened by archeite 0
  • Aggregate the rooms of occurrence per abuser

    Aggregate the rooms of occurrence per abuser

    At present, the bot outputs a separate entry for each abuser.

    In our ban reason, I mention all major rooms where the abuse happened. If I just blindly copy & paste these warnings, I will keep rewriting the rule for the user, thus losing the past list of abuse for him.

    Hence it would be useful if the bot either replied to its previous warning for the same user, or if it edited the past warning to add new rooms there.

    enhancement later 
    opened by bkil 2
  • Add an option to be able to test the bot locally without posting into the scams room

    Add an option to be able to test the bot locally without posting into the scams room

    Some people invite it to experiment with it - you could need this as well.

    Posts related to experimentation should not be cross-posted to the scam rooms as some may interpret it as abuse and place a global ban on the moderator playing with it.

    enhancement later 
    opened by bkil 1
  • Consider how we could protect against homograph attacks

    Consider how we could protect against homograph attacks

    • https://en.wikipedia.org/wiki/IDN_homograph_attack#Defending_against_the_attack
    • https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols#Latin_letters
    • https://en.wikipedia.org/wiki/Letterlike_Symbols#Glyph_variants
    • https://en.wikipedia.org/wiki/Enclosed_Alphanumeric_Supplement

    It could be worthwhile to also implement some simple edit-distance based fuzzy typo allowance & fuzzy keyword matching might be set as well. And also, if a message contains too (many) characters not participating in valid words of the sentence, that would be a red flag.

    Each room is limited to a single language in 99% of the cases, thus posting foreign spam is already a red flag. This is important in the dozens of local language rooms where the indiscriminate English spammer sometimes joins as well. But also, dictionaries exist (see your package manager, or Wiktionary, Wikipedia, etc). Or you could just go through the chat log to collect words and sentences used by non-troll members in the past (=ham) to help discriminate it from unusual content (spam).

    enhancement help wanted later 
    opened by bkil 1
Owner
jjj333_p
I'm just a tech nerd doing the best I can do. Contact me (in order of preference): Matrix (in link) - Email ⬇️ - Twitter ⬇️
jjj333_p
This widget allows to conduct polls in Matrix rooms.

Matrix Poll This widget allows to conduct polls in Matrix rooms. But unlike MSC3381, it is designed for more complex scenarios, like polls with multip

Nordeck IT + Consulting GmbH 14 Dec 19, 2022
Warvil is an AI bot that seeks to respond to your queries about programming.

Warvil Bot Warvil is an AI bot that seeks to respond to your queries about programming. View Project » View Demo · Report Bug · Request Feature Built

Edward Fernandez 11 Jan 4, 2023
Evolve is an online investment portfolio management system where users can keep track of all the assets that they have invested in and how well their assets are performing.

Evolve is an online investment portfolio management system where users can keep track of all the assets that they have invested in and how well their assets are performing.

Indrajit 6 Oct 16, 2022
A prototype on how web3 technology can enable us to build an open, immutable, reproducible, and permanently accessible scientific record.

Web3 Research A prototype on how web3 technology can enable us to build an open, immutable, reproducible, and permanently accessible scientific record

manveer 0 Nov 27, 2022
Use Matrix as a backend for local-first applications with the Matrix-CRDT Yjs provider.

Matrix CRDT Matrix-CRDT enables you to use Matrix as a backend for distributed, real-time collaborative web applications that sync automatically. The

Yousef 604 Jan 7, 2023
matrix <=> discord moderation with the power of matrix-appservice-discord

graim matrix <=> discord moderation with the power of matrix-appservice-discord Social graim's website is viewable at gra.im. You can join the graim M

null 19 Dec 24, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Please do not use this tracker to scam anyone! This is free and will be forever free. This tracking will never ask for seed phrases nor private keys. Keep safe!

CryptoBlades Tracker Related modules express - web application framework for node pug - template engine stylus - pre-processor CSS mongoose - nodejs o

null 355 Oct 13, 2022
a chatt app build using node , express and socket IO , it has many rooms

RealTime-chatt-app you can view the app here : https://bit.ly/3zce4ON a chatt app build using node , express and socket IO . used to public chatt room

null 11 Aug 31, 2022
OSINT - Data Visualization - Blockchain - Awareness - Scam

poorSKeme OSINT - Data Visualization - Blockchain - Awareness - Scam Install Go to this site and click on the downdload button Or go to release sectio

Kenn Brothers Org 15 Dec 9, 2022
This is a web app built to reserve hotel rooms all around the globe.

Microvago This is a web app built to reserve hotel rooms all around the globe. Live Demo ?? To see this project's live demo, please click here. ⚠️ Not

Omar Muhammad 5 Oct 3, 2022
It's a scam app, you can hide evil code in it, it will evade 100% of anti-viruses. There is an electron interface for a better social-ing

Zcrypt Fake Miner Our Website https://dark-utilities.me ! How to build PS C:\Users\Admin> git clone https://github.com/Inplex-sys/zcrypt-fake-miner.gi

Inplex-sys 5 Oct 13, 2022
NFT listing monitor bot of the marketplace. (Opensea, X2Y2, LooksRare)

NFT Listing Monitor Bot NFT listing monitor bot of the marketplace. Market Coverage Opensea Looksrare X2Y2 Prerequisites Opensea API Key - apply here

null 21 Jan 2, 2023
cpace - nodemon for C/C++ files. Monitor for any changes in your [.c] and [.cpp] application and automatically restart it - perfect for development

cpace cpace is a tool that helps develop [.c] and [.cpp] based applications by automatically restarting them when file changes are detected. The packa

null 17 Dec 3, 2022
A simple app that helps a user monitor daily activities by adding, storing and deleting activities.Built with HTML,CSS and JavaScript

To-do-list A simple list app that allows a user to add and remove tasks. Built With HTML CSS JS Webpack Live Demo Click To-do-list to see the page. Ge

Catherine K 7 Apr 8, 2022
Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime.

Uptime Monitoring API Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about thei

Mohamed Magdi 2 Jun 14, 2022
A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch screens with a resolution of 1024x600 connected to a Raspberry Pi.

EDStatusPanel A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch scr

marcus-s 24 Oct 4, 2022