What?

Shotter - Quickly take screenshots of a list of URLs.

Why?

During an internal assessment, I wanted a tool to see what web applications are running in range of IP’s. Couldn’t get EyeWitness to work.

How?

  • Written in python.
  • Makes use of selenium webdriver to open websites and capture screenshots.
  • To speed up the process of taking screenshots, the script makes use of multiprocessing - WHY?.

Why Multiprocessing?

  • Less lines of code compared to Threading to acheive similar outcome
  • Multiprocessing - Process-based parallelism

multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows.

The multiprocessing module also introduces APIs which do not have analogs in the threading module. A prime example of this is the Pool object which offers a convenient means of parallelizing the execution of a function across multiple input values, distributing the input data across processes (data parallelism)

Example: results = pool.map(take_snapshot, sites)

Notes

  • Generate range of IPs - for i in {1..255}; do echo 10.10.10.$i;done
  • Convert range of IPs to URLs if web application running on 80 or 443
$ for i in {1..255}; do echo 10.10.10.$i;done | httpx -silent                                                                                                        
https://10.10.10.126
http://10.10.10.139
https://10.10.10.210
http://10.10.10.45