1

When I surf into the URL (BE CAREFUL! FISHING SITE): http://www(dot)onlinevisibilityinc(dot)com/ GOOGLE WARNS ME WITH FISHING ALERT.

When I try to use Google Safe Browsing and check this url, the received status code is 200 but the response json is empty (means this url is clean by their documentation).

I've tried 5 more URL (taken from https://phishbank.org/#/) but they all gives me the save result, so I do something wrong.

Can you please help me with that? I've tried searching alot but I haven't found the problem yet. Thanks in advance!

My python demo code:

import json
import requests

GOOGLE_SB_LOOKUP_URL = 'https://safebrowsing.googleapis.com/v4/threatMatches:find'

params = {
    'key': '<MY_API_KEY>',
}
headers = {
    'User-Agent': '<MY_USER_AGENT>',
    'Content-Type': 'application/json'
}
data = {
    'client': {
        'clientId': 'TestClientID',
        'clientVersion': '1.0.0.0'
    },
    'threatInfo': {
        'threatTypes': ['THREAT_TYPE_UNSPECIFIED', 'MALWARE', 'SOCIAL_ENGINEERING', 'UNWANTED_SOFTWARE',
                        'POTENTIALLY_HARMFUL_APPLICATION'],
        'platformTypes': ['ANY_PLATFORM'],
        'threatEntryTypes': ['URL'],
        'threatEntries': [
            {'url': 'http://www.onlinevisibilityinc.com/'},
        ]
    }
}
response = requests.post(GOOGLE_SB_LOOKUP_URL, params=params, headers=headers, data=json.dumps(data))
status_code = response.status_code

if status_code == 200:
    json_response = response.json()
else:
    json_response = {}

print ('Google Status Code: {0}'.format(status_code))
print ('Google Result: {0}'.format(json_response))

Output:

Google Status Code: 200
Google Result: {}
nuric
  • 11,027
  • 3
  • 27
  • 42

1 Answers1

0
'threatEntries': [
            {'url': 'http://www.onlinevisibilityinc.com/'},
        ]

instead of

'threatEntries': [
            {'url': 'http://www.onlinevisibilityinc.com/'}
        ]