sensepost / gowitness

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

Failed to query url #42

Closed hunter0x8 closed 4 years ago

hunter0x8 commented 4 years ago

Describe the bug Trying to screen shot single url

To Reproduce Steps to reproduce the behavior: 1.Type this in terminel and get the following error gowitness single --url=https://www.facebook.com/ Error gowitness single --url=https://www.facebook.com/ ERRO[2020-04-01 15:32:28] Failed to query url error="[context deadline exceeded (Client.Timeout or context cancellation while reading body)]" url="https://www.facebook.com/" INFO[2020-04-01 15:32:28] Complete run-time=3.1479092s Screenshots If applicable, add screenshots to help explain your problem. image

Version Information: Ubuntu WSL (Windows)

leonjza commented 4 years ago

Seems ok for me on macOS. I'll need help debugging WSL, it is not a platform I use. Maybe try a Linux VM instead? image

hunter0x8 commented 4 years ago

@leonjza thank you for your humble response. I will try it on vm

d4rk-d4nph3 commented 4 years ago

@leonjza I am getting the same error as @Ahsan-x on my Kali 2020.1. It works on some site but fails in others.

nicolas-gagnon commented 4 years ago

I have a list of domain and sub domain I'm wondering if it's possible to query the list with no HTTPS:///

sanjaypopcorn commented 4 years ago

Screenshot from 2020-04-20 20-16-08 I have the same issue are the sites blocking the request? Only some show this problem

leonjza commented 4 years ago

Any details? Without it I cannot debug anything.

sanjaypopcorn commented 4 years ago

Any details? Without it a cannot debug anything.

Sorry here you go Screenshot from 2020-04-20 20-16-08

ghost commented 4 years ago

Hi, I am facing an issue with gowitness. I am using WSL2 Kali gowitness-error

The command which I am running is image

leonjza commented 4 years ago

gowitness uses Chrome itself, not the chromedriver component.

I am facing an issue with gowitness. I am using WSL2 Kali

Unfortunately, I have never tested on WSL2 (and probably won't soon). PR's welcome to improve suport!

ghost commented 4 years ago

If I remove --timeout=100, I get below error. image

ghost commented 4 years ago

gowitness uses Chrome itself, not the chromedriver component.

I am facing an issue with gowitness. I am using WSL2 Kali

Unfortunately, I have never tested on WSL2 (and probably won't soon). PR's welcome to improve suport!

Thanks for replying. I will try to use chrome and see if it works out

leonjza commented 4 years ago

I just landed https://github.com/sensepost/gowitness/commit/2699bf210e14b66f8fac43c4f1f9bebd1c1c8eea which will report the Chrome binary used for the screenshot. Running gowitness with the --log-level debug flag, you should see the full arguments used which you could in turn run manually. This should help rule out if this is Chrome having a problem, or gowitness.

Eg:

» gowitness --disable-db --log-level debug single -u https://facebook.com/

[...]

DEBU[2020-08-13 16:30:57] Google Chrome arguments                       arguments="[--headless --disable-gpu --hide-scrollbars --disable-crash-reporter --user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36 --window-size=1440,900 --screenshot=https-facebook.com.png --virtual-time-budget=2000 --allow-insecure-localhost http://localhost:58265/]" binary="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
INFO[2020-08-13 16:30:57] Taking screenshot                             destination=https-facebook.com.png url="https://www.facebook.com/"

[...]

INFO[2020-08-13 16:30:59] Complete                                      run-time=5.480074946s

Taking the details from the Google Chrome arguments log entry, you can reconstruct the command gowitness ran as:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --disable-gpu --hide-scrollbars --disable-crash-reporter --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36" --window-size=1440,900 --screenshot=https-facebook.com.png --virtual-time-budget=2000

This should hopefully help in figuring out whats going on in the future.