Distributed runs with Celery
... or how you can 10x your scanning speed and massively parallelize your workflows.
By default, secator runs all tasks synchronously. This guide shows how to enable distributed runs using Celery workers, which unlocks Concurrent tasks.
Prerequisite
To use distributed runs, make sure the worker addon is installed:
secator install addons workerStep 1: Configure a broker and result backend [optional]
You can set up a task queue using Celery with the broker and a results backend of your choice, and run Celery workers to execute tasks from the broker queue.
The following is an example using redis, but you can use any supported Celery broker and backend.
Install redis addon:
secator install addons redisInstall redis:
sudo apt install redisStart redis and enable at boot:
sudo systemctl enable redis
sudo systemctl start redisConfigure secator to use Redis:
secator config set celery.broker_url redis://<REDIS_IP>:6379/0
secator config set celery.result_backend redis://<REDIS_IP>:6379/0Make sure you replace <REDIS_IP> in the variables above with the IP of your Redis server.
Step 2: Start a Celery worker
secator workerStep 3: Run a task, workflow or scan
secator w host_recon wikipedia.orgfrom secator.workflows import host_recon
target = 'testphp.vulnweb.com'
for result in host_recon(target, sync=False):
print(result)Last updated
Was this helpful?