pysafebrowsing


Namepysafebrowsing JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/Te-k/pysafebrowsing
SummaryGoogle Safe Browsing API python wrapper
upload_time2024-06-11 08:41:03
maintainerNone
docs_urlNone
authorTek
requires_pythonNone
licenseMIT
keywords security
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pysafebrowsing

[![PyPI](https://img.shields.io/pypi/v/pysafebrowsing)](https://pypi.org/project/pysafebrowsing/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pysafebrowsing)](https://pypistats.org/packages/pysafebrowsing) [![PyPI - License](https://img.shields.io/pypi/l/pysafebrowsing)](LICENSE) [![GitHub issues](https://img.shields.io/github/issues/te-k/pysafebrowsing)](https://github.com/Te-k/pysafebrowsing/issues)

Limited python3 library for [Google Safe Browsing API v4](https://developers.google.com/safe-browsing/v4/). For now, only the online lookup is developed. Check [here](https://developers.google.com/safe-browsing/v4/get-started) to get an API key.

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

## Library

```python
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 ;)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Te-k/pysafebrowsing",
    "name": "pysafebrowsing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "security",
    "author": "Tek",
    "author_email": "tek@randhome.io",
    "download_url": "https://files.pythonhosted.org/packages/c5/a0/02f93cf554b76c215bba5adf29c3c1ad48c0856aaa4757d5c720f51e2936/pysafebrowsing-0.1.3.tar.gz",
    "platform": null,
    "description": "# Pysafebrowsing\n\n[![PyPI](https://img.shields.io/pypi/v/pysafebrowsing)](https://pypi.org/project/pysafebrowsing/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pysafebrowsing)](https://pypistats.org/packages/pysafebrowsing) [![PyPI - License](https://img.shields.io/pypi/l/pysafebrowsing)](LICENSE) [![GitHub issues](https://img.shields.io/github/issues/te-k/pysafebrowsing)](https://github.com/Te-k/pysafebrowsing/issues)\n\nLimited python3 library for [Google Safe Browsing API v4](https://developers.google.com/safe-browsing/v4/). For now, only the online lookup is developed. Check [here](https://developers.google.com/safe-browsing/v4/get-started) to get an API key.\n\nTo install, you can just install it from [pypi](https://pypi.org/project/pysafebrowsing) with `pip install pysafebrowsing`, or download the code with `git clone https://github.com/Te-k/pysafebrowsing.git` and then `pip install .`\n\n## Library\n\n```python\nfrom pysafebrowsing import SafeBrowsing\ns = SafeBrowsing(KEY)\nr = s.lookup_urls(['http://malware.testing.google.test/testing/malware/'])\nprint(r)\n> {'http://malware.testing.google.test/testing/malware/': {'platforms': ['ANY_PLATFORM'], 'threats': ['MALWARE', 'SOCIAL_ENGINEERING'], 'malicious': True, 'cache': '300s'}}\n```\n\n## CLI\n\n```\n$ safebrowsing config --key dfdsfdsfds\nIn /home/user/.config/safebrowsing:\n[SafeBrowsing]\nkey = dfdsfdsfds\n\n$ safebrowsing url http://malware.testing.google.test/testing/malware/\nMalicious: Yes\nPlatforms: ANY_PLATFORM\nThreats: SOCIAL_ENGINEERING, MALWARE\n\n$ safebrowsing url https://github.com/\nMalicious: No\n\n$ safebrowsing file testlist.txt\nhttp://malware.testing.google.test/testing/malware/     Malicious\nhttp://twitter.com/     Ok\nhttps://github.com/     Ok\nhttp://www.google.com/  Ok\nhttp://www.yahoo.com/   Ok\nhttp://ianfette.org     Malicious\n```\n\n## License\n\nThis code is published under MIT license: do whatever you want with it, but don't blame me if it fails ;)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Google Safe Browsing API python wrapper",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/Te-k/pysafebrowsing"
    },
    "split_keywords": [
        "security"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "acc71d106ecef2893c2a9d26568018dea397206497d039d198beb270fa1a370c",
                "md5": "2ec55d0eb3916c9e53d9d0011763d3ef",
                "sha256": "156d3eb259194e2fa155d6c3c60b2bbba7b8f3235b26f964d91353b40e87b5c5"
            },
            "downloads": -1,
            "filename": "pysafebrowsing-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ec55d0eb3916c9e53d9d0011763d3ef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6401,
            "upload_time": "2024-06-11T08:41:01",
            "upload_time_iso_8601": "2024-06-11T08:41:01.895746Z",
            "url": "https://files.pythonhosted.org/packages/ac/c7/1d106ecef2893c2a9d26568018dea397206497d039d198beb270fa1a370c/pysafebrowsing-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5a002f93cf554b76c215bba5adf29c3c1ad48c0856aaa4757d5c720f51e2936",
                "md5": "5903b29fcdd80f99cd1c87ce1eaa55cb",
                "sha256": "9e8e0b1bc98d12ad3dd00e1c65dcc0a0ef6f38fe5afb361884d52a2d705d2032"
            },
            "downloads": -1,
            "filename": "pysafebrowsing-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5903b29fcdd80f99cd1c87ce1eaa55cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5362,
            "upload_time": "2024-06-11T08:41:03",
            "upload_time_iso_8601": "2024-06-11T08:41:03.475214Z",
            "url": "https://files.pythonhosted.org/packages/c5/a0/02f93cf554b76c215bba5adf29c3c1ad48c0856aaa4757d5c720f51e2936/pysafebrowsing-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-11 08:41:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Te-k",
    "github_project": "pysafebrowsing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pysafebrowsing"
}
        
Tek
Elapsed time: 0.24589s