Sign inSign up

gugu/sbserver

By gugu

•Updated almost 8 years ago

Fork OBJECTCOMP/google-sbserver-docker with dockerhub builder instead of unknown binary blob

Image
0

1.3K

gugu/sbserver repository overview

⁠google-sbserver-docker

Build docker container for sbserver⁠, proxy for Google Safe Browsing APIs v4.

⁠Building and dependencies

UPX⁠, UNIX make, and Docker (CE) are required to build.

sudo docker build . -t gugu/sbserver

⁠Running

Please get an API-Key from Google Developer Console⁠.

sbserver runs on port :8080 by default. To make sbserver accessible from the outside world, this example simply maps host port 8080 to container port 8080:

sudo docker run --name sbserver -e APIKEY=<our API-key> -p 8080:8080 sbserver

Output should be similar to the following

safebrowsing: 2018/03/04 09:51:35 database.go:111: no database file specified
safebrowsing: 2018/03/04 09:51:40 database.go:243: Server requested next update in 30m18.537s
Starting server at 0.0.0.0:8080
safebrowsing: 2018/03/04 09:51:42 database.go:389: database is now healthy
safebrowsing: 2018/03/04 09:51:42 safebrowser.go:551: Next update in 30m18.537s

⁠Test call

As sbserver is running, we can now call the API with a random entry taken from Malwaredomains.com⁠:

curl -X POST -H "Content-Type: application/json" --data '{ "threatInfo": { "threatEntries": [ {"url": "bankofamerica-com-system-login-in-informtion-sitkey-upgrade.org"} ] } }' http://127.0.0.1:8080/v4/threatMatches:find

->

{
	"matches": [ 
		{ 
			"threatType":"SOCIAL_ENGINEERING",
			"platformType":"ANY_PLATFORM",
			"threatEntryType":"URL",
			"threat": 
				{
					"url":"bankofamerica-com-system-login-in-informtion-sitkey-upgrade.org"
				}
		}
	]
}

⁠Docker Hub

Please find the resulting image on hub.docker.com⁠

⁠References

Tag summary

Content type

Image

Digest

Size

133.4 MB

Last updated

almost 8 years ago

docker pull gugu/sbserver