sensepost / gowitness

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

macOS 10.12.6 gowitness v1.0.2 incorrectly identifying Google Chrome version? #3

Closed heyitsols closed 6 years ago

heyitsols commented 6 years ago

It looks like gowitness on macOS 10.12.6 (16G1212) thinks my installed version of Google Chrome is 58.0.3029.110, even when using the path option to point it to version 64.0.3282.140

~ % gowitness single https://google.com --chrome-path="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
FATA[2018-02-05 10:44:23] Chrome version is older than v60              chromeversion=58.0.3029.110

~ % /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
Google Chrome 64.0.3282.140

Even stops me from running commands like version

~ % gowitness version
FATA[2018-02-05 10:46:38] Chrome version is older than v60              chromeversion=58.0.3029.110
leonjza commented 6 years ago

Thanks for the report! Could you show me the output of the single run with --log-level=debug added? For example"

$ gowitness --log-level=debug single --url https://google.com
DEBU[2018-02-05 15:04:32] Chrome path not set or invalid. Performing search
DEBU[2018-02-05 15:04:32] Google Chrome path                            chrome-path="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
DEBU[2018-02-05 15:04:32] Chrome version                                version=64.0.3282.140
DEBU[2018-02-05 15:04:32] Screenshot path                               screenshot-path=/Users/user1
DEBU[2018-02-05 15:04:32] Opening buntdb                                database-location=gowitness.db
DEBU[2018-02-05 15:04:32] Processing URL                                url="https://google.com"
INFO[2018-02-05 15:04:33] Response code                                 status="200 OK" url="https://google.com"
INFO[2018-02-05 15:04:33] Final URL after redirects                     final-url="https://www.google.co.za/?gfe_rd=cr&dcr=0&ei=agr" url="https://google.com"
heyitsols commented 6 years ago

Aha, that showed the problem!

~ % gowitness --log-level=debug single --url https://google.com
DEBU[2018-02-05 14:49:01] Chrome path not set or invalid. Performing search
DEBU[2018-02-05 14:49:01] Google Chrome path                            chrome-path="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
DEBU[2018-02-05 14:49:01] Google Chrome path                            chrome-path=/Applications/Chromium.app/Contents/MacOS/Chromium
FATA[2018-02-05 14:49:02] Chrome version is older than v60              chromeversion=58.0.3029.110

~ % /Applications/Chromium.app/Contents/MacOS/Chromium --version
Chromium 58.0.3029.110

However, it might be good to check the versions of all results of the search and use any suitable one.

User error is the reason my in-line override wasn't working, I had it wrapped in " but also was escaping spaces with \

Thanks for getting back to me so quickly!

leonjza commented 6 years ago

No problem! Something I can definitely improve on so will keep this one open so I don't forget about it.

leonjza commented 6 years ago

I tagged an improvement for this in v1.0.5.