curl request failing in google safebrowser

423 views
Skip to first unread message

sha...@screen-magic.com

unread,
Sep 21, 2016, 5:32:32 AM9/21/16
to Google Safe Browsing API
when i do simple lookup for a particular url i get the following response which is not expected as i thought
curl -i https://sb-ssl.google.com/safebrowsing/api/lookup?client=screenmagic&key=AIzaSyDK6GKTFlsMqme9BP7LyvBe3XgjV5MUcMg&appver=1.5.2&pver=3.1&url="http://ianfette.org/"
[1] 15332
[2] 15333
[3] 15334
[4] 15335
shashi@shashi-laptop:~$ HTTP/1.1 400 Bad Request
Content-Type: application/octet-stream
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info."
X-Content-Type-Options: nosniff
Date: Wed, 21 Sep 2016 09:29:39 GMT
Server: HTTP server (unknown)
Content-Length: 0
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID=87=jiOpi6gg6fJDxO7gSiY5SWVEuzYag6G1hvBcejf_UfgRyn7-ksHkjQ3Ku_HlCW52nnbGs3-a6jywbwPNDPlIu3PYfpDPD1brFwTw5HYO3dfhC62U23u0kxDSucZ_eNHp; expires=Thu, 23-Mar-2017 09:29:39 GMT; path=/; domain=.google.com; HttpOnly
Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32"


[1]   Done                    curl -i https://sb-ssl.google.com/safebrowsing/api/lookup?client=screenmagic
[2]   Done                    key=AIzaSyDK6GKTFlsMqme9BP7LyvBe3XgjV5MUcMg
[3]-  Done                    appver=1.5.2
[4]+  Done                    pver=3.1

Julien Sobrier

unread,
Sep 21, 2016, 5:33:17 PM9/21/16
to google-safe-...@googlegroups.com
You need to put your URL between quotes otherwise your shell splits it as different commands with the & chracter. Taht's why you get 4 results from your shell, [1] tp [4]. Also, don't put quotes around the url value:

curl -i "https://sb-ssl.google.com/safebrowsing/api/lookup?client=screenmagic&key=AIzaSyDK6GKTFlsMqme9BP7LyvBe3XgjV5MUcMg&appver=1.5.2&pver=3.1&url=http://ianfette.org/"

--
You received this message because you are subscribed to the Google Groups "Google Safe Browsing API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-safe-browsing-api+unsub...@googlegroups.com.
To post to this group, send email to google-safe-browsing-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-safe-browsing-api.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages