Created
May 24, 2012 17:37
-
-
Save rexcze-zz/2782975 to your computer and use it in GitHub Desktop.
bash google safebrowsing checkout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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