Aquatone - can not install INFORMATION GATHERING - WEB EDITION

Hi there!

I am trying to install aquatone on my Parrot Os. In the module is the following commands:

@htb[/htb]$ sudo apt install golang chromium-driver
@htb[/htb]$ go get github.com/michenriksen/aquatone
@htb[/htb]$ export PATH="$PATH":"$HOME/go/bin"

When I try to execute the command go get github.com/... I get the following error:

$ go get github.com/michenriksen/aquatone
go: go.mod file not found in current directory or any parent directory.

'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,

And then i’ve tried to execute it with:
$ go install github.com/michenriksen/aquatone@latest
But then i’ve got the error:

# github.com/michenriksen/aquatone/parsers 
go/pkg/mod/github.com/michenriksen/aquatone@v1.7.0/parsers/regex.go:22:26: invalid operation: cannot call non-function xurls.Relaxed (variable of type *regexp.Refexp)

I’ve also tried this link: Install Aquatone on Kali Linux | Medium
But also that didn’t work out, because when I execute aquatone the error is:
bash: /usr/bin/aquatone: cannot execute binary file: Exec format error

How can I install aquatone?

Hello, Are you sure you have downloaded the zip file with the correct architecture?
I was getting the same error:

# github.com/michenriksen/aquatone/parsers 
go/pkg/mod/github.com/michenriksen/aquatone@v1.7.0/parsers/regex.go:22:26: invalid operation: cannot call non-function xurls.Relaxed (variable of type *regexp.Refexp)

But “the Install Aquatone on Kali Linux” link you sent worked for me.

If you’re using the latest version of Kali Linux, follow the link you posted, and download the one that has the amd64. Unzip the file and mv aquatone to your /home/user/go/bin directory. If you have go/bin setup in your PATH correctly, you should be able to execute it from anywhere in your terminal.

The error that you got when calling go get http://github.com/michenriksen/aquatone is because you are using a too modern go version.

The error bash: /usr/bin/aquatone: cannot execute binary file: Exec format error is because the binary that you are running is not for your platform. For instance, you are running the 32-bit version on a 64-bit platform, or trying to run the amd version on a arm platform.

Also, the binary meant as arm64 from the repository is, unfortunately, a 32-bit binary, and not a 64 as its name claims to be.

To compile it you need the following:

  • go version 1.12.6
  • install dep ( see the official docs )
  • set the GOPATH environment variable (with the default value did not work for me, whatever the reason)
  • clone the project into GOPATH/src
  • install the project dependencies with dep ensure
  • run build.sh

Notes:

In my case, the dep installer did not move the binary to any folder in my PATH environment variable. You can call it directly by using the full path to the binary (it is outputted after the install), or move it somewhere within your path, or add the folder to your path, or create an alias … plenty of options.

Call git clone https://github.com/michenriksen/aquatone.git under GOPATH/src, then it will create the aquatone folder in the right place

As mentioned before, the binary meant as arm64 from the repository is a 32-bit binary. This can be checked with:

$ file aquatone
aquatone: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=<redacted>, not stripped

If you want to compile for arm64 you have to change GOARCH=arm to GOARCH=arm64 in build.sh:

build_linux_arm64() {
  echo "[*] Building linux/arm64 ..."
  GOOS=linux GOARCH=arm64 go build -o aquatone ..
  # add ============>  ^^
}

After running build.sh with GOARCH=arm64

$ file aquatone
aquatone: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=<redacted>, for GNU/Linux 3.7.0, not stripped