From dfdd3d01fb361a3dc9269f209a166a781e314f34 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Wed, 8 Jul 2026 21:21:08 +1200 Subject: Start basic selfbot boilerplate --- README.md | 19 ++++++++++--------- example.env | 3 +++ src/main.py | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 example.env create mode 100644 src/main.py diff --git a/README.md b/README.md index 026d4ac..eb48c6a 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,16 @@ **Botnet** is a Slack selfbot and social-experiment that lets you deploy messages across a network of opt-in user accounts. Join the botnet, submit your message, and watch it echo across the Slack. Opt-in only, leave anytime. -- Users who want to join the botnet connect their Slack OAuth to the Botnet application. -- The Botnet application can send messages on behalf of others users with the OAuth scope. -- Every botnet "node" (user) gets 2 messages to "deploy" (send) per day. -- When a message is deployed, it gets sent to #botnet-deploy-voting for voting, 3 members (number is subject to change, could scale based on amount of people in the botnet) of the botnet need to approve and/or deny the message to be deployed before it happens. -- Voting for approval is time-based, after 1 hour if not enough votes messages will be auto-rejected. -- If the message is approved, the message will first be reviewed by an AI model to ensure it is safe. -- After review, if the message is deemed safe, it will be sent on behalf of every single node in the botnet to their most recent thread where botnet is approved to work. -- Botnet is opt-in for channels, CMs (channel managers) have to approve botnet to run in their channel, otherwise botnet will not send messages in that channel. -- Anyone can revoke their OAuth and leave the botnet at any time with the press of a single button. +- Users who want to join the botnet connect their Slack OAuth to the Botnet application +- The Botnet application can send messages on behalf of others users with the OAuth scope +- Every botnet "node" (user) gets 2 messages to "deploy" (send) per day +- When a message is deployed, it gets sent to an AI to ensure it is safe, and if deemed safe, it is sent to #botnet-deploy-voting for voting. 3 members/nodes (number is subject to change/scale) of the botnet need to approve and/or deny the message to be deployed before it happens +- Voting for approval is time-based, after 1 hour if not enough votes messages will be auto-rejected +- After voting, if the message is approved, it will be sent on behalf of every single node in the botnet to their most recent thread where botnet is approved to work +- Botnet is opt-in for channels, CMs (channel managers) have to approve botnet to run in their channel, otherwise botnet will not send messages in that channel +- Anyone can revoke their OAuth and leave the botnet at any time with the press of a single button - **If a bad message somehow, someway gets out, DM me and I will use the API to delete the nefarious messages on behalf of all affected users. Botnet is a social experiment and not meant to be nefarious, hence the guardrails, even though the chaos and idea can be closely associated with nefarious purposes. I am happy to take down this project by FD's request.** +--- + > Note: this project was made for [Hack Club Doppel](https://doppel.hackclub.com), and is tailored for Hack Club Slack. This bot is not guaranteed to work outside of Hack Club Slack. diff --git a/example.env b/example.env new file mode 100644 index 0000000..248c27c --- /dev/null +++ b/example.env @@ -0,0 +1,3 @@ +SLACK_SELFBOT_OAUTH_XOXP=xoxp-xxx-your-token-here +SLACK_APP_TOKEN=xapp-xxx-your-token-here +SELFBOT_USER_ID=UXXXXXXXXXX diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..f16c198 --- /dev/null +++ b/src/main.py @@ -0,0 +1,39 @@ +import os +from slack_bolt import App +from slack_bolt.adapter.socket_mode import SocketModeHandler +from dotenv import load_dotenv + +load_dotenv() + +app = App(token=os.environ.get("SLACK_SELFBOT_OAUTH_XOXP")) + +@app.message("") +def handle_messages(message, say): + if message.get("channel_type") != "im": + return + + if message.get("user") == 'U0BFUFPFDGE': + return + + text = message.get("text", "").lower().strip() + + if not text.startswith("botnet"): + return + + parts = text.split(" ") + if len(parts) == 1: + say("Usage:\n`botnet help`") + return + + command = parts[1] + args = parts[2:] + + say(f"Command: {command}, Args: {args}") + +@app.event("message") +def shut_up_slack_bolt(): + pass + +if __name__ == "__main__": + handler = SocketModeHandler(app, app_token=os.environ.get("SLACK_APP_TOKEN")) + handler.start() -- cgit v1.2.3