Build docker container for webrisk, proxy for Google WebRisk APIs v1.
UPX, UNIX make, and Docker (CE) are required to build.
sudo docker build . -t gugu/webrisk
Please get an API-Key from Google Developer Console.
sbserver runs on port :9780 by default. To make sbserver accessible from the outside world, this example simply maps host port 9780 to container port 9780:
sudo docker run --name sbserver -e APIKEY=<our API-key> -p 9780:9780 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:9780
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:9710/v1beta1/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
198.7 MB
Last updated
almost 7 years ago
docker pull gugu/webrisk