sensepost / gowitness

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

install issue #130

Closed ghost closed 2 years ago

ghost commented 2 years ago

can you fix the go get install command ( go get -u github.com/sensepost/gowitness@latest ).& please add @latest

g1t01 commented 2 years ago

I echo this, I am having installing problems with the deprecated go get. Trying to install woth @latest doesn't work and building from source gives a different error.

leonjza commented 2 years ago

can you fix the go get install command ( go get -u github.com/sensepost/gowitness@latest ).& please add @latest

Without details I don't know what is broken to fix.

To test, I used a fresh Kali install, running go ver 1.17.7. I could install gowitness without error using both go get and go install methods (both using fresh kali instances). Tested while commit 01005bbfc76839054ca0684029adc97606ec3845 was the last.

using go get

Go env:

~ ยป go version                              
go version go1.17.7 linux/amd64

Go get:

~ ยป go get -u github.com/sensepost/gowitness
go: downloading github.com/sensepost/gowitness v0.0.0-20220228074355-01005bbfc768
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/remeh/sizedwaitgroup v1.0.0
go: downloading github.com/rs/zerolog v1.26.1
go: downloading github.com/spf13/cobra v1.3.0
go: downloading github.com/tomsteele/go-nmap v0.0.0-20191202052157-3507e0b03523
go: downloading gorm.io/gorm v1.23.1
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading github.com/chromedp/cdproto v0.0.0-20220217222649-d8c14a5c6edf
go: downloading gorm.io/gorm v1.23.2
go: downloading github.com/chromedp/chromedp v0.7.8
go: downloading github.com/projectdiscovery/wappalyzergo v0.0.30
go: downloading golang.org/x/net v0.0.0-20220225172249-27dd8689420f
go: downloading github.com/corona10/goimagehash v1.0.3
go: downloading github.com/chromedp/cdproto v0.0.0-20220228194516-ead8cf59b1fa
go: downloading gorm.io/driver/sqlite v1.3.1
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/gobwas/ws v1.1.0
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/mattn/go-sqlite3 v1.14.12
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/jinzhu/inflection v1.0.0
go: downloading github.com/jinzhu/now v1.1.4
go: downloading github.com/chromedp/sysutil v1.0.0
go: downloading github.com/gobwas/httphead v0.1.0
go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/josharian/intern v1.0.0
go: downloading golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9
go get: installing executables with 'go get' in module mode is deprecated.
        Use 'go install pkg@version' instead.
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

And running it:

~ ยป go env | grep -i path
GOPATH="/home/leonjza/go"

~ ยป ~/go/bin/gowitness version
gowitness: 2.3.6

git hash: dev
go version: dev

using go install

Go env:

~ ยป go version                              
go version go1.17.7 linux/amd64

Go get:


~ ยป go install github.com/sensepost/gowitness@latest
go: downloading github.com/sensepost/gowitness v0.0.0-20220228074355-01005bbfc768
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/remeh/sizedwaitgroup v1.0.0
go: downloading github.com/rs/zerolog v1.26.1
go: downloading github.com/spf13/cobra v1.3.0
go: downloading github.com/tomsteele/go-nmap v0.0.0-20191202052157-3507e0b03523
go: downloading gorm.io/gorm v1.23.1
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading github.com/chromedp/cdproto v0.0.0-20220217222649-d8c14a5c6edf
go: downloading github.com/chromedp/chromedp v0.7.8
go: downloading github.com/projectdiscovery/wappalyzergo v0.0.30
go: downloading golang.org/x/net v0.0.0-20220225172249-27dd8689420f
go: downloading github.com/corona10/goimagehash v1.0.3
go: downloading gorm.io/driver/sqlite v1.3.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/gobwas/ws v1.1.0
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/mattn/go-sqlite3 v1.14.12
go: downloading github.com/jinzhu/inflection v1.0.0
go: downloading github.com/jinzhu/now v1.1.4
go: downloading github.com/chromedp/sysutil v1.0.0
go: downloading github.com/gobwas/httphead v0.1.0
go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646

And running it:

~ ยป go env | grep -i path
GOPATH="/home/leonjza/go"

~ ยป ~/go/bin/gowitness version
gowitness: 2.3.6

git hash: dev
go version: dev

building from source gives a different error.

What error? It builds fine for me. You can also try using the Dockerfile to build if you are having problems.

โฏ git log | head -n 1
commit 01005bbfc76839054ca0684029adc97606ec3845

โฏ go build -o gowitness-test

โฏ ./gowitness-test version
gowitness: 2.3.6

git hash: dev
go version: dev
leonjza commented 2 years ago

And just to double check, I built from source on the same commit using a fresh kali install.

/Documents/gowitness(master) ยป go build -o gowitness-test                    
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/remeh/sizedwaitgroup v1.0.0
go: downloading github.com/rs/zerolog v1.26.1
go: downloading github.com/spf13/cobra v1.3.0
go: downloading github.com/tomsteele/go-nmap v0.0.0-20191202052157-3507e0b03523
go: downloading gorm.io/gorm v1.23.1
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading github.com/chromedp/cdproto v0.0.0-20220217222649-d8c14a5c6edf
go: downloading github.com/chromedp/chromedp v0.7.8
go: downloading github.com/projectdiscovery/wappalyzergo v0.0.30
go: downloading golang.org/x/net v0.0.0-20220225172249-27dd8689420f
go: downloading github.com/corona10/goimagehash v1.0.3
go: downloading gorm.io/driver/sqlite v1.3.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/gobwas/ws v1.1.0
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/mattn/go-sqlite3 v1.14.12
go: downloading github.com/jinzhu/inflection v1.0.0
go: downloading github.com/jinzhu/now v1.1.4
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/chromedp/sysutil v1.0.0
go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/gobwas/httphead v0.1.0
go: downloading github.com/josharian/intern v1.0.0

~/Documents/gowitness(master*) ยป ./gowitness-test version
gowitness: 2.3.6

git hash: dev
go version: dev