chvancooten / BugBountyScanner

A Bash script and Docker image for Bug Bounty reconnaissance. Intended for headless use.
MIT License
872 stars 120 forks source link

Setting up Telegram environment variables using Docker #39

Closed HegZous closed 3 years ago

HegZous commented 3 years ago

hello there, thanks for your amazing tool, but really i facing an issue while i trying to assign the tool to the telegram bot, i believe that it might be my problem because it's my first time with docker use.

but every time i trying to read in a file of environment variables, i got the error as below.

docker: open chvancooten/bugbountyscanner:latest: no such file or directory.

also while i trying to show docker daemon socket, it shows no result.


$ sudo docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

and there's no reference to how i do assign the tool to telegram.

So, if you can provide some help, please.

chvancooten commented 3 years ago

Hi! Thanks for raising this issue.

To have the script communicate with your Telegram bot (assuming you already have a Telegram bot set up for this, if not see here), you will need to set the telegram_api_key and telegram_chat_id environment variables. You can do this either by specifying the environment through Docker, or writing the variables to the .env file in the script's root.

Using the .env file is probably easiest: you can take the example file, rename it to .env, and input your correct variable values.

Using Docker, you can use the environment option in Docker-Compose (see the main readme for an example), or when launching Docker interactively with docker run you can use the --env (or -e) flag to specify environments as follows:

docker run -it --env telegram_api_key=changeme --env telegram_chat_id=changeme chvancooten/bugbountyscanner /bin/bash

In the latter case don't forget to mount a persistent volume so your results will not be lost when you remove the container :)