All Projects → aaronetz → signal-bot

aaronetz / signal-bot

Licence: GPL-3.0 License
A simple bot framework for Signal

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to signal-bot

Signal Windows
Unofficial Signal Private Messenger for Windows
Stars: ✭ 83 (-9.78%)
Mutual labels:  messaging, signal
Signal Cli
signal-cli provides an unofficial commandline and dbus interface for signalapp/libsignal-service-java
Stars: ✭ 2,117 (+2201.09%)
Mutual labels:  messaging, signal
signal-msg
Send Signal messages from GNU Emacs using signal-cli
Stars: ✭ 20 (-78.26%)
Mutual labels:  messaging, signal
DTMF-Decoder
A Java program to implement a DMTF Decoder.
Stars: ✭ 28 (-69.57%)
Mutual labels:  signal
qpid-jms
Mirror of Apache Qpid JMS
Stars: ✭ 60 (-34.78%)
Mutual labels:  messaging
Holodeck-B2B
Holodeck B2B is an AS4 system-to-system messaging solution that implements the OASIS specifications for ebMS3 and it's AS4 profile. For more information visit the project website
Stars: ✭ 45 (-51.09%)
Mutual labels:  messaging
stockwell
Stockwell transform for Python
Stars: ✭ 38 (-58.7%)
Mutual labels:  signal
ios-swift-chat-ui-kit
Ready-to-use Chat UI Components for Swift (iOS)
Stars: ✭ 42 (-54.35%)
Mutual labels:  messaging
hekate
Java Library for Distributed Services
Stars: ✭ 17 (-81.52%)
Mutual labels:  messaging
tmo-live-graph
A simpe react app that plots a live view of the T-Mobile Home Internet Nokia 5G Gateway signal stats, helpful for optimizing signal.
Stars: ✭ 15 (-83.7%)
Mutual labels:  signal
presage
A high-level Rust library to help write clients for the Signal Messenger.
Stars: ✭ 27 (-70.65%)
Mutual labels:  signal
aws-sns-samples
Amazon SNS (Simple Notification Service) - Code Samples
Stars: ✭ 24 (-73.91%)
Mutual labels:  messaging
pulsar-tracing
Tracing instrumentation for Apache Pulsar clients.
Stars: ✭ 13 (-85.87%)
Mutual labels:  messaging
geeteventbus
An inprocess eventbus for highly concurrent Python applications
Stars: ✭ 17 (-81.52%)
Mutual labels:  messaging
signal2html
Export a Signal backup to pretty HTML
Stars: ✭ 45 (-51.09%)
Mutual labels:  signal
hassio-addons
Some home assistant addons I manage
Stars: ✭ 16 (-82.61%)
Mutual labels:  signal
kafka-flow-retry-extensions
Kafka Flow Retry Patterns Extensions
Stars: ✭ 32 (-65.22%)
Mutual labels:  messaging
bigbrother-specs
Research and specification for Big Brother protocol
Stars: ✭ 13 (-85.87%)
Mutual labels:  messaging
AspNetCore.Weixin
An ASP.NET Core middleware for Wechat/Weixin message handling and apis. (微信公众平台/接口调用服务)
Stars: ✭ 24 (-73.91%)
Mutual labels:  messaging
messaging-apis
Messaging APIs for multi-platform
Stars: ✭ 1,759 (+1811.96%)
Mutual labels:  messaging

signal-bot

This is a simple bot system for Signal with minimal dependencies. Pure Java and cross platform.

Prerequisites

  • JDK 11+ due to TLS v3 requirement. A newer JDK version should work but it's untested. You can get an installer from AdoptOpenJDK.
  • A phone number you can receive SMS messages or voice calls on. You'll need to dedicate that number to the bot.

Building

gradlew installDist should generate a run script at 'build/install/signal-bot/bin/signal-bot'.

Running

  1. To register the bot on the Signal service, run signal-bot --register-text +12223334444 (change the phone number to any number that you can receive an SMS on.)
    • To get the verification code using a voice call instead, replace register-text with register-voice.
  2. After receiving the verification SMS, run signal-bot --verify 123-456 (change the number to the code you received.)
  3. To start the bot, run signal-bot --listen. You should be able to then message the bot and see your messages in the log.
    • Note: it might take a few minutes for the bot to be properly registered with the Signal server and be able to receive messages.
  4. To stop the bot, interrupt with Ctrl+C or kill -2 to allow it to shut down and disconnect gracefully from the Signal service.
  5. To dry-run test the listener, use signal-bot --test. This will start a simple input loop that sends your messages to the bot and sends the response to stdout. This doesn't use the Signal service.

Adding new message responders

  1. Create a new class that implements SignalBot.Responder. For example, this will echo back every message received:
package com.woodencloset.signalbot.responders;

import com.woodencloset.signalbot.SignalBot;

public class EchoResponder implements SignalBot.Responder {
    @Override
    public String getResponse(String messageText) {
        return messageText;
    }
}
  1. Add the line bot.addResponder(new EchoResponder()); to the Main class (as an example, there is a DiceRollResponder included and added already.)

Limitations

  • For code simplicity, keys are stored in-memory, so it's mostly suitable for a long running session on a server. If you terminate and re-run, all keys (including identity key) will be re-generated which would necessitate other parties to re-approve the bot's identity.
  • Group info is stored in-memory as well. If you join a group and then re-run the bot, the first message in the group will be ignored as the bot updates its internal group info. This could be solved by using a message queue, but that's currently not implemented, for code simplicity.
  • Bot interface only supports receiving and sending simple text responses. No images or other data. Messages are always sent back to the sender, or to the group, if sent from one.
  • Only legacy groups are currently supported. Supports for new groups is WIP.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].