Credit to SeanDaBlack for the basis of the script.
If you have a question, before dropping into the Discord, check out our FAQ page and see if your question has already been answered.
main.py
is the entrypoint for the program.bot/server.py
creates a local web server that serves up a reCaptcha checkbox and passes the reCaptcha token to theforms.py
file.bot/forms.py
contains the functions used to interact with the forms on the target's website.bot/data.py
contains generators for realistic randomized data.bot/redirection.py
is used to redirectprolifewhistleblower.com
to127.0.0.1
bot/static/captcha.html
is our simple reCaptcha checkbox page.bot/logger.py
file for setting uplogging
package.bot/arguments.py
file for getting arguments from the commandline.requirements.txt
contains the required Python3 packages to be installed.style.yapf
is the configuration file for the yapf formatter. Please runyapf -ri ./bot/
when contributing.FAQ.md
is a list of frequently asked questions and their answers.
Instructions can be found here https://git-scm.com/downloads
use powershell or cmd.exe on Windows terminal if on macOS if on Linux, your terminal of choice
git clone https://github.com/ramblingjordan/AbBOT-python.git
cd AbBOT-python
If you don't already have python3.exe
and pip3.exe
installed on Windows, you can install them from the Microsoft Store.
https://www.microsoft.com/en-us/p/python-39/9p7qfqmjrfp7
Now we can install the required Python 3 packages for this project. Before you install the packages, consider setting up a virtual environment for development.
pip3.exe install -r .\requirements.txt
Please ensure you're running the script with Adminsitrator rights, or someone with read and write access to C:\Windows\System32\drivers\etc\hosts
.
python3.exe .\main.py
Then, you will see the following message, "Starting the web server at http://prolifewhistleblower.com:8000/". You will want to open this URL in your browser (works with browsers' Incognito mode if you want to use it). From there you will see a reCaptcha checkbox. Click or solve the reCaptcha and then submit the form.
If you see a message exactly like the following the following in your terminal, then it was successful. If it was not successful, let us know so we can try to fix the issue.
Form submitted successfully.
21:17:31 bot.logger - [INFO] 1 success, 0 failures
To exit the program, please hit Ctrl+C.
If you don't have python3
or pip3
installed, you can install the python3
package with your preferred package manager.
sudo apt install python3
If you already have python3
installed, make sure your have the latest version of pip3
installed. You can update your pip3
installation as follows.
python3 -m pip install --user --upgrade pip
Now we can install the required Python 3 packages for this project. Before you install the packages, consider setting up a virtual environment for development.
python3 -m pip install -r ./requirements.txt
Please ensure you're running the script with sudo, or a user with read and write access to /etc/hosts
.
sudo python3 ./main.py
# or
sudo ./main.py
If you installed python3
/pip3
to your account and not to the system, you will want to keep your PATH
when using sudo
.
sudo env "PATH=$PATH" python3 ./main.py
# or
sudo env "PATH=$PATH" ./main.py
Then, you will see the following message, "Starting the web server at http://prolifewhistleblower.com:8000/". You will want to open this URL in your browser (works with browsers' Incognito mode if you want to use it). From there you will see a reCaptcha checkbox. Click or solve the reCaptcha and then submit the form.
If you see a message exactly like the following the following in your terminal, then it was successful. If it was not successful, let us know so we can try to fix the issue.
Form submitted successfully.
21:17:31 bot.logger - [INFO] 1 success, 0 failures
To exit the program, please hit Ctrl+C.
If you don't have python3
or pip3
installed you can either download the installer from the Python 3.9.7 release page or install it with brew
.
brew install python3
If you already have python3
installed, make sure your have the latest version of pip3
installed. You can update your pip3
installation as follows.
python3 -m pip install --user --upgrade pip
Now we can install the required Python 3 packages for this project. Before you install the packages, consider setting up a virtual environment for development.
pip3 install -r ./requirements.txt
Please ensure you're running the script with sudo, or someone with read and write access to /etc/hosts
.
sudo python3 ./main.py
# or
sudo ./main.py
If you installed python3
/pip3
with brew
(or installed Python to your account and not to the system in another way), you will want to keep your PATH
when using sudo
.
sudo env "PATH=$PATH" python3 ./main.py
# or
sudo env "PATH=$PATH" ./main.py
Then, you will see the following message, "Starting the web server at http://prolifewhistleblower.com:8000/". You will want to open this URL in your browser (works with browsers' Incognito mode if you want to use it). From there you will see a reCaptcha checkbox. Click or solve the reCaptcha and then submit the form.
If you see a message exactly like the following the following in your terminal, then it was successful. If it was not successful, let us know so we can try to fix the issue.
Form submitted successfully.
21:17:31 bot.logger - [INFO] 1 success, 0 failures
To exit the program, please hit Ctrl+C.
- First, install Docker.
You'll need to edit your hosts
file to point prolifewhistleblower.com
to 127.0.0.1
.
- Clone this repository
- Go to the root directory of the repository
- Run
docker-compose build
to build the container - Run
docker-compose up
- First, install Docker.
You'll need to edit your hosts
file to point prolifewhistleblower.com
to 127.0.0.1
.
- Clone this repository
- Go to the root directory of the repository
- Run
docker build -t abbot .
to build the container - Run
docker run -p 8000:8000 --name abbot abbot
to run it
This will start the web server.
To make use of a feature that will generate the text of your tip dynamically on each submission, set the --generate option on the command line. This will make it harder to automatically filter out these tips.
By default this will use a generic API key, which may be disabled if used excessively. If you'd like to use your own key, make a free account at DeepAI and use the API key generated for you found on your profile page. Set the environment variable 'DEEP_AI_KEY' to this value by running export DEEP_AI_KEY=your AI key goes here
(you may need to do this every time you start the program).
usage: main.py [-h] [-v] [-c COUNT]
optional arguments:
-h, --help show this help message and exit
-v, --verbose Increases the verbosity of the output.
-c COUNT, --count COUNT
Set a maximum number of times to successfully submit to the form.
-g, --generate
Generate GPT2 text from DeepAI API with key set by environment variable or default.
A virtual environment creates a local installation of Python, where the installed packages will be isolated from the packages installed by the main Python installation, which allows you to better keep track of what packages are used. For example, if your program requires a new module during development, you could update the requirements file via pip freeze > requirements.txt
on Linux and macOS. This is recommended, especially if you are planning to help develop the bot. The package venv
is shipped with Python 3.3 or later.
To create a virtual environment, make sure you are in the AbBOT-python
directory, then execute:
python3 -m venv .env
This creates a directory AbBOT-python/.env
, which contains the virtual Python installation, and will not to uploaded to GitHub during commits. Then source the activate file to use the virtual environment.
source ./.env/bin/activate
To check that you are in virtual environment, the command which python3
should return a path that ends in .../AbBOT-python/.env/bin/python3
. Now you could install the required packages inside the virtual environment. To leave the virtual environment and return to your main Python installation, simply use deactivate
.
To create a virtual environment, make sure you are in the AbBOT-python
directory, then execute:
python3.exe -m venv .env
This creates a directory AbBOT-python\.env
, which contains the virtual Python installation, and will not to uploaded to GitHub during commits. Then source the activate file to use the virtual environment (again, making sure that you are in the AbBOT-python
directory).
.\env\Scripts\activate
To check that you are in virtual environment, the command which python3
should return a path that ends in ...\AbBOT-python\.env\Scripts\python.exe
. Now you could install the required packages inside the virtual environment. To leave the virtual environment and return to your main Python installation, simply use deactivate
.