Pysafebrowsing
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 ;)
Release files for pysafebrowsing 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pysafebrowsing-0.1.4.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysafebrowsing-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / pysafebrowsing-0.1.4.tar.gz
| Download URL | pysafebrowsing-0.1.4.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d78c03c68a4e3147a320316d0d74292e86b38347ede95a08398555e0fde55629
|
|
BLAKE2b-256 checksum How to use checksums |
be19859635dc53f509ab10f2ae00b6eb003b07d0d396d914d4735923b5135b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / pysafebrowsing-0.1.4-py3-none-any.whl
| Download URL | pysafebrowsing-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
481672ba696ad7c916cbfc62ddca5250064104f7b65e3d5fb8d92b10736b6482
|
|
BLAKE2b-256 checksum How to use checksums |
bcd676f5464f789a52b7590df9eeaeb780fccd90f31b205fc3e67521eb386e61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|