%global _empty_manifest_terminate_build 0 Name: python-pysafebrowsing Version: 0.1.2 Release: 1 Summary: Google Safe Browsing API python wrapper License: MIT URL: https://github.com/Te-k/pysafebrowsing Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6c/ac/3bfa122104bcb6c8137d3640ecfd904eb0ba416b0f0dc395dfcd6efd3b00/pysafebrowsing-0.1.2.tar.gz BuildArch: noarch Requires: python3-requests Requires: python3-configparser %description # 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 ;) %package -n python3-pysafebrowsing Summary: Google Safe Browsing API python wrapper Provides: python-pysafebrowsing BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pysafebrowsing # 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 ;) %package help Summary: Development documents and examples for pysafebrowsing Provides: python3-pysafebrowsing-doc %description help # 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 ;) %prep %autosetup -n pysafebrowsing-0.1.2 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pysafebrowsing -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 0.1.2-1 - Package Spec generated