First and foremost an honorary mention of the original Quad9 threat-intel-api https://github.com/Quad9DNS/threat-intel-api
I used their python script as a starting point and built on from there.
The Docker container things I worked on myself.
I'm open to positive feedback/input.
Now onwards to the instructions! Avante!
docker build -t <REPO>/quad9-threat-intel:<version> -f Dockerfile .Create the directory where you want the data to be downloaded to
mkdir /quad9-intel-dataAssuming scripts directory is in /quad9-threat-intel-api
docker create -v /quad9-threat-intel-api/scripts/:/scripts/ \
-v /quad9-intel-data/:/quad9-intel-data/ \
<REPO>/quad9-threat-intel:<version> /scripts/start.shEdit the start.sh script and insert your API token and number of connections needing to be made to Quad9
QUAD9_API_TOKEN=<INSERT API TOKEN>
QUAD9_CONNECTIONS=<NUMBER OF CONNECETIONS>The python script writes the downloaded content into the /quad9-intel-data directory in the filename format of quad9.Year-Month-DayHHour.json
Example file names:
- quad9.2021-01-01H05.json
- quad9.2021-01-01H22.json
- quad9.2021-01-02H15.json
The python script outputs content to files in chunks of 100,000 entries. If the script crashes, or the container stops, the variables in memory are output to disk according to the format above.
docker start <container name>docker stop <container name>- Multiprocessing in addition to multithreading (is this worthwhile given that multiple containers can be spun up to create "multiprocessing"?)
- other?