Skip to main content

Google Safe Browsing API python wrapper

Project description

Pysafebrowsing

Limited python3 library for Google Safe Browsing API v4. For now, only the online lookup is developed. Check here to get am API key.

To install, you can just install it from pypi with pip install pysafebrowsing, or download the code with git clone https://github.com/Te-k/pysafebrowsing.git and then pip install .

Library

from pysafebrowsing import SafeBrowsing
s = SafeBrowsing(KEY)
r = s.lookup_urls(['http://malware.testing.google.test/testing/malware/'])
print(r)
> {'http://malware.testing.google.test/testing/malware/': {'platforms': ['ANY_PLATFORM'], 'threats': ['MALWARE', 'SOCIAL_ENGINEERING'], 'malicious': True, 'cache': '300s'}}

CLI

$ safebrowsing config --key dfdsfdsfds
In /home/user/.config/safebrowsing:
[SafeBrowsing]
key = dfdsfdsfds

$ safebrowsing url http://malware.testing.google.test/testing/malware/
Malicious: Yes
Platforms: ANY_PLATFORM
Threats: SOCIAL_ENGINEERING, MALWARE

$ safebrowsing url https://github.com/
Malicious: No

$ safebrowsing file testlist.txt
http://malware.testing.google.test/testing/malware/     Malicious
http://twitter.com/     Ok
https://github.com/     Ok
http://www.google.com/  Ok
http://www.yahoo.com/   Ok
http://ianfette.org     Malicious

License

This code is published under MIT license: do whatever you want with it, but don't blame me if it fails ;)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysafebrowsing-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysafebrowsing-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pysafebrowsing-0.1.1.tar.gz.

File metadata

  • Download URL: pysafebrowsing-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2rc1

File hashes

Hashes for pysafebrowsing-0.1.1.tar.gz
Algorithm Hash digest
SHA256 83be8931695a56d7e8f5d419232feb3c8b459ee240af8b282c013797f01f01eb
MD5 ccffc087786e05444fe85da1e6cb3c15
BLAKE2b-256 1e52434e92a6b74df683a866082bb34fc008ed8e234fc621904434c3ec85b525

See more details on using hashes here.

File details

Details for the file pysafebrowsing-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pysafebrowsing-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2rc1

File hashes

Hashes for pysafebrowsing-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf8f7eb6fa61bf49d6f0437ca763cac47100d6d57c29c29c569e9aa2eb72574
MD5 97f84a0c6595c2705789185effca0176
BLAKE2b-256 17299a7c0d44f6d5d612c16fe5ea095ba3d6f9c6592299a09980b70b49b2cbba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page