Closed outzhu closed 1 year ago
I would think go install github.com/oj/gobuster@latest
would be the best approach. I don't see an error in the bottom code block for Vagrant.
I suppose errors isn't the right word, but it does show up as red text. Maybe Warnings is the better word?
I suppose errors isn't the right word, but it does show up as red text. Maybe Warnings is the better word?
Ah... Well warnings are fine for now, as long as the build completes :)
Do you know where gobuster would be?
I tried gobuster help
to check if it was working but I got -bash: gobuster: command not found
I don't think it got installed.
Yeah, gobuster is not installed. the command go install github.com/OJ/gobuster/v3@latest
should work but nope.
Output from the vagrant box.
go: downloading github.com/OJ/gobuster v1.4.2
go: downloading github.com/OJ/gobuster/v3 v3.1.0
go: downloading github.com/OJ/gobuster v2.0.1+incompatible
go: downloading github.com/spf13/cobra v1.0.0
go: downloading golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
go: downloading github.com/google/uuid v1.1.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed
Ah ok it's an issue with go
the path for needs to be defined. Probably.
I wonder where it installs the binary to? You're probably on to something with the path.
It works but still trying to figure out how to make env variables work in packer.
I added environment_vars = ["GOPATH=$HOME/go"]
but not "PATH=/${PATH}:${GOPATH}/bin/"
to https://github.com/infinite-omicron/pentesting-vm/pull/23 since Packer complaints about $GOPATH/$PATH as unknown variables. I haven't figured out how to call the in-builds variables yet.
Making a note that Packer doesn't store the variable in the Vagrant build so we have to also export GOPATH and that we have to add the GOPATH to PATH variable.
I wonder if we installed go
properly or something cause it seems to be weird that go
needs to be configured like this.
I wonder if we installed go properly or something cause it seems to be weird that go needs to be configured like this.
No, this is normal. Each user on Linux, can specify their own GOPATH
... But our use case is a little different.
An environment variable in Packer, would only persist during the build itself... We'll need to set this to persist in the images that get created. Perhaps the best place to put this would be in the dependencies.sh
file.
go get github.com/OJ/gobuster
works for Vagrant but throwsand also does not work for Docker.
go install github.com/OJ/gobuster@latest
"works" for Dockerbut gives Vagrant more errors.
What version of gobuster should it use?