Skip to content

Instantly share code, notes, and snippets.

@rexcze-zz
Created May 24, 2012 17:37
Show Gist options
  • Save rexcze-zz/2782975 to your computer and use it in GitHub Desktop.
Save rexcze-zz/2782975 to your computer and use it in GitHub Desktop.
bash google safebrowsing checkout
#!/bin/bash
#response
#200 - phising, malware, both
#204 - OK
#400 - bad request
#401 Not Authorized
#503 Service unavailable
#Content-Length: 7 = malware
#Content-Length: 8 = phishing
URL="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "${1}")"
API="ABQIAAAA9fXr8-YDE73iLr0M8gNnmxQjISqf5Gys0OZveqNsxUNKt4gJWQ&appver"
SFBRURL="https://sb-ssl.google.com/safebrowsing/api/lookup?client=api&apikey=${API}&appver=1.0&pver=3.0&url=${URL}"
curl -IL ${SFBRURL}
@jcamachos
Copy link

Hi great job !! I was doing something like you do but my API is not working, I'm getting forbidden.. Can you help me and give some advice where I can get the right key ?? THK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment