sensepost / gowitness

🔍 gowitness - a golang, web screenshot utility using Chrome Headless
GNU General Public License v3.0
2.82k stars 323 forks source link

Specify an interval for regularly downloads #126

Open jokay opened 2 years ago

jokay commented 2 years ago

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

We would like to have an environment variable which allows to specify an interval for regularly image downloads.

With this approach the container would not be stopped after the command.

Describe alternatives you've considered

Currently we are using cron and three seperate commands to achieve this.

Additional context

e.g. INTERVAL (in seconds) of 86400 (24h).

docker-compose.yml

services:
  app:
    image: docker.io/leonjza/gowitness:2.3.6@sha256:7361851c14f0b0f239c15a201677387fd29636183f955dd818972bad4fd4a637
    volumes:
      - ./data:/data
    environment:
      - INTERVAL=86400
    command: gowitness file --disable-db -F -X 1920 -Y 1080 --delay 30 -f urls.txt

urls.txt

https://www.cnn.com
https://www.nbc.com
jokay commented 2 years ago

@leonjza I've done something similar using an entrypoint.sh script, see here.

leonjza commented 2 years ago

Hey, this is a pretty cool idea! I think we have all of the plumbing for this already as well, we just need to add some logic to sleep. I tagged this as an enhancement.