Fork OBJECTCOMP/google-sbserver-docker with dockerhub builder instead of unknown binary blob
1.3K
Build docker container for sbserver, proxy for Google Safe Browsing APIs v4.
UPX, UNIX make, and Docker (CE) are required to build.
sudo docker build . -t gugu/sbserver
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
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"
}
}
]
}
Please find the resulting image on hub.docker.com
Content type
Image
Digest
Size
133.4 MB
Last updated
almost 8 years ago
docker pull gugu/sbserver