byt3bl33d3r / WitnessMe

Web Inventory tool, takes screenshots of webpages using Pyppeteer (headless Chrome/Chromium) and provides some extra bells & whistles to make life easier.
GNU General Public License v3.0
727 stars 109 forks source link

Doesn't recognize file with urls #16

Closed bluecanarybe closed 4 years ago

bluecanarybe commented 4 years ago

Hi, I'm trying to feed it a plain file with urls but it appears it's trying to resolve the filename instead of the actual urls in the file.

 ⚡ root@kali ~/tools/witnessme docker run --rm -ti 0c2b4fbab0b3 /tmp/domains
[witnessme.utils] DEBUG - Patching pyppeteer...
[witnessme.scan] DEBUG - Waiting for queue to populate...
[witnessme.parsers] DEBUG - Detected IP Address/Range/CIDR, hostname or URL as a target
[witnessme.scan] INFO - Starting headless browser
[witnessme.scan] INFO - Using 8 worker thread(s)
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:8080
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:8443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:80
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:8080
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:80
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:8443
[witnessme.scan] INFO - Killing headless browser
byt3bl33d3r commented 4 years ago

You sure the path is valid? Works for me

bluecanarybe commented 4 years ago

Yes, the path is valid. I've did a cat now just before running the docker command:

 ⚡ root@kali ~/tools/WitnessMe cat /tmp/domains
https://google.com
https://github.com
https://shodan.io

 ⚡ root@kali ~/tools/WitnessMe docker run --rm -ti 529d0a459283 /tmp/domains
[witnessme.utils] DEBUG - Patching pyppeteer...
[witnessme.scan] DEBUG - Waiting for queue to populate...
[witnessme.parsers] DEBUG - Detected IP Address/Range/CIDR, hostname or URL as a target
[witnessme.scan] INFO - Starting headless browser
[witnessme.scan] INFO - Using 8 worker thread(s)
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:80
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:8080
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:8443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:80
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at https:///tmp/domains:8080
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:443
[witnessme.scan] ERROR - Error taking screenshot: net::ERR_NAME_NOT_RESOLVED at http:///tmp/domains:8443
[witnessme.scan] INFO - Killing headless browser
byt3bl33d3r commented 4 years ago

@bluecanarybe Didn't notice this before. You're running the Docker container in the wrong way. You have to mount the file containing the URLs in the container otherwise it won't be able to access it. Try this:

docker run -v /tmp/domains:/domains --rm -ti $IMAGE_ID /domains

That'll mount the /tmp/domains file inside the container at /domains and then you'll be able to point witnessme at it.