Skip to main content

Google Safe Browsing API python wrapper

Project description

Pysafebrowsing

PyPI PyPI - Downloads PyPI - License GitHub issues

Limited python3 library for Google Safe Browsing API v4. For now, only the online lookup is developed. Check here to get an 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.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

pysafebrowsing-0.1.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysafebrowsing-0.1.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pysafebrowsing-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9e8e0b1bc98d12ad3dd00e1c65dcc0a0ef6f38fe5afb361884d52a2d705d2032
MD5 5903b29fcdd80f99cd1c87ce1eaa55cb
BLAKE2b-256 c5a002f93cf554b76c215bba5adf29c3c1ad48c0856aaa4757d5c720f51e2936

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pysafebrowsing-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 156d3eb259194e2fa155d6c3c60b2bbba7b8f3235b26f964d91353b40e87b5c5
MD5 2ec55d0eb3916c9e53d9d0011763d3ef
BLAKE2b-256 acc71d106ecef2893c2a9d26568018dea397206497d039d198beb270fa1a370c

See more details on using hashes here.

Supported by

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