Skip to content

iperevozchikov/gglsbl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gglsbl

Python client library for Google Safe Browsing API

Disclaimer

While the code was developed according to official Developers Guide this is not a reference implementation. You also may want to check Acceptable Use Policy for Safe Browsing API

Quick start

Get Google API key

Instructions can be found here. Please note that v3.0 API key is different from v2.2 API.

Install the library
    python setup.py install
To sync local hash prefix cache
    from gglsbl import SafeBrowsingList
    sbl = SafeBrowsingList('API KEY GOES HERE')
    sbl.update_hash_prefix_cache()

On a first run it may take up to several hours to complete the sync

URL lookup
    from gglsbl import SafeBrowsingList
    sbl = SafeBrowsingList('API KEY GOES HERE')
    sbl.lookup_url('http://github.com/')

CLI Tool

bin/gglsbl_client.py can be used for quick testing and as a code example.

To sync local cache with Safe Browsing API omitting Acceptable Use Policy delays

    gglsbl_client.py --api-key 'API KEY GOES HERE' --onetime

To look up URL

    gglsbl_client.py --api-key 'API KEY GOES HERE' --check-url http://github.com/

Fore more options please see

    gglsbl_client.py --help

Running on Python3

There is a python3 port of this library maintained by Stefan.

About

Python client library for Google Safe Browsing API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.7%
  • Protocol Buffer 2.3%