Skip to content

Installation (New Bot)

Pilot1782 edited this page Apr 21, 2023 · 8 revisions

FOR mongoBot.pyw and scanCore.py

Installation

1: Bot Setup

Go to Discord Dev Portal and create a new discord bot or using another bot and copy the bot token.

Go to MongoDB Setup wiki and follow the instructions.


2: File Setup (Manual)

Download the source code and unzip or clone the repository found here.

Setup

Run pip install -r requirements.txt

Create a new file called privVars.py with the given contents:

# privVars.py
DSICORD_WEBHOOK = "https://discord.com/api/webhooks/"
MONGO_URL = "mongodb+srv://"
TOKEN = "1b1b1b1b1b1b1b1b.1b1b1b1b1b1b1b1b.1b1b1b1b1b"

2: File Setup (Automatic)

Run the file setup.py, with the command python3 setup.py.

Now edit the file priVars.py and set the variables to the desired values.

2.5: Optional Settings

In privVars.py you can add a few additional variables to control how the scanner behaves.

  • pingsPerSec = 2400
    • This is used to determine the max amount of pings the scanner can send out, more pings is faster but has a similar affect as ddosing you home network at higher levels, adjust with caution.
  • maxActive = 5
    • This is the maximum number of independent scanning threads the script uses, increasing this will make your scanner much faster at the expense of your system's performance.
  • useWebHook= False
    • This is a legacy feature that send a message to the webhook each time a server is added to the database, if this is off, you can leave the DISCORD_WEBHOOK variable as the default ie: DSICORD_WEBHOOK= "".
  • autoRestart = False
    • This is for when you have a bot that should continually restart if it crashes, this is disabled by default.
  • masscan_search_path = '...','...'
    • This is the variable that should hold your masscan executable, ie: 'C:\\tmp\\','C:\\tmp\\masscan64.exe'
  • allowJoin = False
    • This is whether or not to allow people to select the join button and test if a server is whitelisted.
    • Note: you will have to have js installed and run npm install

Running the scanner

Requirements

  • Masscan (Preferably this fork however it will work with both)
  • Linux (WSL/Docker/VM)

Use scanCore.py to scan and add to the database.

Running the Discord Bot

Use mongoBot.pyw and have fun in discord.

Continuous running of either the scanner or discord bot

Use and setup this script.