|e039dd5f00||2 years ago|
|.gitignore||2 years ago|
|LICENSE||2 years ago|
|README.md||2 years ago|
|bruh.py||2 years ago|
|requirements.txt||2 years ago|
An OMEMO-enabled XMPP bot that tails a log file and sends new lines to a given contact in encrypted form.
Heavily based on the slixmpp-omemo example. In fact, for the most part this code is just an extension of it.
Licensed under the GPLv3, see LICENSE.
Clone this repository, ideally set up a virtualenv for it, and install the requirements:
git clone https://git.nwt.fhstp.ac.at/is211810/bruh.git virtualenv bruh cd bruh source bin/activate pip install -r requirements.txt
Additionally, you should have an existing XMPP account for the bot to use. Ideally, the bot account and your recipient should be added to each other's roster and subscribed to each other's presence (although this might not be necessary in all cases).
To verify the correct functionality, run the bot as instructed below and send any message from your recipient account to the bot. Errors about not being in the trusted device list are normal when you do this first, but should disappear upon sending any subsequent messages.
If you are using a virtualenv, make sure to activate it first by typing
source bin/activate in this folder!
python bruh.py [-h] [-q] [-d] [-j JID] [-p PASSWORD] [-f FILE_NAME] [-t WATCH_DEST_JID] [--data-dir DATA_DIR] An OMEMO-enabled XMPP bot that tails a log file and sends new lines to a given contact in encrypted form. It also serves as an echo bot. optional arguments: -h, --help show this help message and exit -q, --quiet set logging to ERROR -d, --debug set logging to DEBUG -j JID, --jid JID JID to use -p PASSWORD, --password PASSWORD password to use -f FILE_NAME, --file FILE_NAME Log file to watch -t WATCH_DEST_JID, --to WATCH_DEST_JID JID of the user to send new lines to --data-dir DATA_DIR data directory
--password parameter is missing, they will be requested interactively.
To tail a log file, provide the
If these two parameters are not provided, the bot reverts to a simple echo bot (equivalent to the upstream version it is based on).
Do not run multiple bots using the same data directory or you will experience issues with OMEMO.
python bruh.py --jid email@example.com --file /var/log/syslog --to firstname.lastname@example.org