0

I reached this GitHub repo. about google safe browsing database.

I have never used go, but I think it is required now. So I installed it using:

sudo apt install golang-go

Then, I followed the instructions in the GitHub page. I executed:

go get github.com/google/safebrowsing

But nothing installed in the path I was executing the command from. However, I proceeded to:

export PATH=$PATH:$GOPATH/bin

Then the manual says, run the following command (which is two lines, I executed the first line, then I press enter, then nothing changes. Then executed the second line separately:

go get github.com/google/safebrowsing/cmd/sbserver
sbserver -apikey $APIKEY

After executing the second line, I got this error:

Command 'sbserver' not found, did you mean:

  command 'sxserver' from deb sx
  command 'sb_server' from deb spambayes
  command 'ssserver' from deb shadowsocks

Try: sudo apt install <deb name>

Can you please point to me what is wrong? How to install google safe browsing database?

qbq
  • 75
  • 2
  • 7

1 Answers1

0

Your PATH is wrong. You will find sbserver in $GOPATH/bin.

Try ${GOPATH}/bin/sbserver -apikey $APIKEY

If that does not work, then follow the Go installation instructions and make sure that your Go environment variables are correct.

GOPATH should look like /home/myname/go or something else that looks normal.

Your PATH should contain ${GOPATH}/bin

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • Thanks. That help. But can you check my edit. What should I do next to query the DB? Am I doing it right so far? – qbq Jun 27 '19 at 08:14
  • I ave a long list of URLs. I want to automate testing each URL and save the original URL and the result in a file. Any hints on how to move forward with this? – qbq Jun 27 '19 at 08:35
  • @qbq - Remove your new edits from the question. Create a new question. – John Hanley Jun 27 '19 at 15:35
  • deleted. The new question in: [link](https://stackoverflow.com/questions/56788050/how-to-check-a-list-of-urls-against-google-safe-browsing-database) – qbq Jun 27 '19 at 15:40