diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:10:40 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:10:40 +0000 |
commit | 7864d448288474f0b1212e4a8f0630ad0137a43a (patch) | |
tree | 248d055dd8cf40171fcfe4b5709bd2bbf06e6838 | |
parent | 1a427591d892dd0d835fc4f72d2dc6182e4e04b1 (diff) |
automatic import of python-pyhackthebox
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pyhackthebox.spec | 194 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 196 insertions, 0 deletions
@@ -0,0 +1 @@ +/PyHackTheBox-0.5.6.post1.tar.gz diff --git a/python-pyhackthebox.spec b/python-pyhackthebox.spec new file mode 100644 index 0000000..18f2192 --- /dev/null +++ b/python-pyhackthebox.spec @@ -0,0 +1,194 @@ +%global _empty_manifest_terminate_build 0 +Name: python-PyHackTheBox +Version: 0.5.6.post1 +Release: 1 +Summary: A wrapper for the Hack The Box API. +License: MIT License +URL: https://github.com/clubby789/htb-api +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ef/cd/e20d5ec1e001b0362eb909fd26adfcd9c1578739a3758c4ac963623bf1d7/PyHackTheBox-0.5.6.post1.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-dateutil + +%description +# PyHackTheBox +[](https://github.com/clubby789/htb-api/actions/workflows/tests.yml) +[](https://codecov.io/gh/clubby789/htb-api) +[](https://pyhackthebox.readthedocs.io/en/latest/?badge=latest) +[](https://badge.fury.io/py/PyHackTheBox) + +PyHackTheBox is an unofficial Python library to interact with the Hack The Box API. + + +## Install +```bash +$ pip install pyhackthebox +``` + +## Demo +```py +from hackthebox import HTBClient +# Create an API connection +client = HTBClient(email="user@example.com", password="S3cr3tP455w0rd!") +# Print the User associated with the client +print(client.user) +``` + +## Documentation + +The documentation is available [here](https://pyhackthebox.readthedocs.io/en/latest/). + +## Current Features +- Logging into the API (and automatically refreshing access tokens) +- Challenges, Machines, Fortresses and Endgames + * Getting details + * Viewing authors + * Viewing first bloods + * Submitting flags +- Searching Users, Challenges, Machines and Teams +- Spawning and stopping Challenge instances +- Retrieving user activity +- Viewing Hall(s) of Fame (Top 100, VIP, Team and University Leaderboards) + + + + +%package -n python3-PyHackTheBox +Summary: A wrapper for the Hack The Box API. +Provides: python-PyHackTheBox +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-PyHackTheBox +# PyHackTheBox +[](https://github.com/clubby789/htb-api/actions/workflows/tests.yml) +[](https://codecov.io/gh/clubby789/htb-api) +[](https://pyhackthebox.readthedocs.io/en/latest/?badge=latest) +[](https://badge.fury.io/py/PyHackTheBox) + +PyHackTheBox is an unofficial Python library to interact with the Hack The Box API. + + +## Install +```bash +$ pip install pyhackthebox +``` + +## Demo +```py +from hackthebox import HTBClient +# Create an API connection +client = HTBClient(email="user@example.com", password="S3cr3tP455w0rd!") +# Print the User associated with the client +print(client.user) +``` + +## Documentation + +The documentation is available [here](https://pyhackthebox.readthedocs.io/en/latest/). + +## Current Features +- Logging into the API (and automatically refreshing access tokens) +- Challenges, Machines, Fortresses and Endgames + * Getting details + * Viewing authors + * Viewing first bloods + * Submitting flags +- Searching Users, Challenges, Machines and Teams +- Spawning and stopping Challenge instances +- Retrieving user activity +- Viewing Hall(s) of Fame (Top 100, VIP, Team and University Leaderboards) + + + + +%package help +Summary: Development documents and examples for PyHackTheBox +Provides: python3-PyHackTheBox-doc +%description help +# PyHackTheBox +[](https://github.com/clubby789/htb-api/actions/workflows/tests.yml) +[](https://codecov.io/gh/clubby789/htb-api) +[](https://pyhackthebox.readthedocs.io/en/latest/?badge=latest) +[](https://badge.fury.io/py/PyHackTheBox) + +PyHackTheBox is an unofficial Python library to interact with the Hack The Box API. + + +## Install +```bash +$ pip install pyhackthebox +``` + +## Demo +```py +from hackthebox import HTBClient +# Create an API connection +client = HTBClient(email="user@example.com", password="S3cr3tP455w0rd!") +# Print the User associated with the client +print(client.user) +``` + +## Documentation + +The documentation is available [here](https://pyhackthebox.readthedocs.io/en/latest/). + +## Current Features +- Logging into the API (and automatically refreshing access tokens) +- Challenges, Machines, Fortresses and Endgames + * Getting details + * Viewing authors + * Viewing first bloods + * Submitting flags +- Searching Users, Challenges, Machines and Teams +- Spawning and stopping Challenge instances +- Retrieving user activity +- Viewing Hall(s) of Fame (Top 100, VIP, Team and University Leaderboards) + + + + +%prep +%autosetup -n PyHackTheBox-0.5.6.post1 + +%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-PyHackTheBox -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.6.post1-1 +- Package Spec generated @@ -0,0 +1 @@ +232e6816241775c90ce6529dbe690143 PyHackTheBox-0.5.6.post1.tar.gz |