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.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysafebrowsing-0.1.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pysafebrowsing-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d78c03c68a4e3147a320316d0d74292e86b38347ede95a08398555e0fde55629
MD5 4e9f8e64b5a74f5e1e908a31b1e266b3
BLAKE2b-256 be19859635dc53f509ab10f2ae00b6eb003b07d0d396d914d4735923b5135b63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysafebrowsing-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pysafebrowsing-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 481672ba696ad7c916cbfc62ddca5250064104f7b65e3d5fb8d92b10736b6482
MD5 531f4cbe882a47cb5a61b0cb0242c188
BLAKE2b-256 bcd676f5464f789a52b7590df9eeaeb780fccd90f31b205fc3e67521eb386e61

See more details on using hashes here.

Supported by

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