vt-cli icon indicating copy to clipboard operation
vt-cli copied to clipboard

help with the installation of this repository

Open eldar4ikyt opened this issue 3 years ago • 10 comments

image

What am I doing wrong? Why the "vt" command doesn't work for me. I did the following actions:

  1. git clone https://github.com/VirusTotal/vt-cli

  2. cd vt-cli

  3. make install

  4. sudo apt-get install bash-completion

  5. When, after all the points I had done, I wrote "vt", then I was written that image

  6. I thought that it was necessary and took installed vt, which was recommended by kali linux itself, but as it turns out later - this is absolutely not what I need

  7. I even tried "export PATH=$PATH:'go env GOPATH'/bin" to fix it somehow, but it didn't help, I don't know what to do, please help even just $GOPATH doesn't work for me, even though I installed:

  8. sudo apt-get golang installation

  9. sudo apt-get gccgo installation-go

eldar4ikyt avatar Feb 06 '22 13:02 eldar4ikyt

I even tried to enter the following commands that you suggested: "vt completion bash > /etc/bash_completion.d/vt "

But it gives me the following error: zsh: permission denied: /etc/bash_completion.d/vt

eldar4ikyt avatar Feb 06 '22 13:02 eldar4ikyt

Hello @eldar4ikyt,

Can you share your go env? Adding your $GOBIN to your path should fix the issue:

root@a7197fdf3d55:/vt-cli# go env GOPATH
/root/go
root@a7197fdf3d55:/vt-cli# go env GOBIN 

root@a7197fdf3d55:/vt-cli# export GOBIN=`go env GOPATH`/bin
root@a7197fdf3d55:/vt-cli# go env GOBIN
/root/go/bin
root@a7197fdf3d55:/vt-cli# ls $GOBIN
vt
root@a7197fdf3d55:/vt-cli# export PATH=$PATH:$GOBIN
root@a7197fdf3d55:/vt-cli# vt
A command-line tool for interacting with VirusTotal.

Usage:
  vt [command]

Available Commands:
  analysis       Get a file or URL analysis
  collection     Get information about collections
  completion     Output shell completion code for the specified shell (bash or zsh)
  domain         Get information about Internet domains
  download       Download files
  file           Get information about files
  group          Get information about VirusTotal groups
  help           Help about any command
  hunting        Manage malware hunting rules and notifications
  init           Initialize or re-initialize vt command-line tool
  ip             Get information about IP addresses
  meta           Returns metadata about VirusTotal
  monitor        Manage your monitor account
  monitorpartner Manage your monitor partner account
  retrohunt      Manage retrohunt jobs
  scan           Scan files or URLs
  search         Search for files in VirusTotal Intelligence
  url            Get information about URLs
  user           Get information about VirusTotal users
  version        Show version number

Flags:
  -k, --apikey string   API key
  -h, --help            help for vt
      --proxy string    HTTP proxy
  -v, --verbose         verbose output

Use "vt [command] --help" for more information about a command.

Please let me know if this worked for you.

Regards, Marta

mgmacias95 avatar Feb 07 '22 09:02 mgmacias95

Hello @eldar4ikyt,

Any updates on this? Can we close this issue?

Regards, Marta

mgmacias95 avatar Feb 18 '22 11:02 mgmacias95

Hi @mgmacias95 I ran into the same issue and followed the steps above. It worked perfectly.

Regards Timi

timiuaaa avatar Mar 07 '22 06:03 timiuaaa

Hi @mgmacias95 again, I am not able to run vt completion bash > /etc/bash_completion.d/vt, it gives permission denied error. Any help will be appreciated. Regards Timi

timiuaaa avatar Mar 07 '22 06:03 timiuaaa

Hello @timiuaaa,

Does your user have writing permissions on the /etc/bash_completion directory? You can check using ls -l.

If your user does not have writing permissions, use chmod +w to grant these permissions on the directory.

Other option (not recommended though) would be running the vt completion bash > /etc/bash_completion.d/vt as sudo.

Let me know if this advice helped :).

Regards, Marta

mgmacias95 avatar Mar 07 '22 07:03 mgmacias95

Thanks @mgmacias95

This didn't work. Probably because go env GOBIN is not permanent. Whenever the terminal is closed, one need to run the commands given above https://github.com/VirusTotal/vt-cli/issues/41#issuecomment-1031230911

Any help will be appreciated.

Regards Timi

timiuaaa avatar Mar 07 '22 08:03 timiuaaa

You can set the variable when running the command, like this:

$ GOBIN=`go env GOPATH`/bin vt completion bash > /etc/bash_completion.d/vt

mgmacias95 avatar Mar 07 '22 08:03 mgmacias95

Still getting the same error :( bash: /etc/bash_completion.d/vt: Permission denied

timiuaaa avatar Mar 07 '22 08:03 timiuaaa

Try running the command as root:

$ GOBIN=`go env GOPATH`/bin sudo vt completion bash > /etc/bash_completion.d/vt

mgmacias95 avatar Mar 07 '22 08:03 mgmacias95