summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 03:30:55 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 03:30:55 +0000
commit7b3e52ed13ecfbd4b4030247434dd486e606a523 (patch)
tree5bfb7b0299dc7f381b9bded24bc12952403abf2b
parentc58643aec5651ba562d6551f94f39de3c996bfc9 (diff)
automatic import of python-pysafebrowsing
-rw-r--r--.gitignore1
-rw-r--r--python-pysafebrowsing.spec218
-rw-r--r--sources1
3 files changed, 220 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..7082342 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pysafebrowsing-0.1.2.tar.gz
diff --git a/python-pysafebrowsing.spec b/python-pysafebrowsing.spec
new file mode 100644
index 0000000..7dbe7a9
--- /dev/null
+++ b/python-pysafebrowsing.spec
@@ -0,0 +1,218 @@
+%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
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..90a91a0
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3386c9ce8a26b57a9c5ecd4c662725ea pysafebrowsing-0.1.2.tar.gz