diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-libinjection-python.spec | 188 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 190 insertions, 0 deletions
@@ -0,0 +1 @@ +/libinjection-python-1.1.6.tar.gz diff --git a/python-libinjection-python.spec b/python-libinjection-python.spec new file mode 100644 index 0000000..7140110 --- /dev/null +++ b/python-libinjection-python.spec @@ -0,0 +1,188 @@ +%global _empty_manifest_terminate_build 0 +Name: python-libinjection-python +Version: 1.1.6 +Release: 1 +Summary: Libinjection Python Wrapper +License: GNU General Public License v3 or later (GPLv3+) +URL: https://github.com/wzhvictor/libinjection-python +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e8/4d/47ff80e671e3e80b31e2192ff3776b67bc7677c5a70754f655e9cc0499b4/libinjection-python-1.1.6.tar.gz + + +%description +# Libinjection-python + + + + +Libinjection-python is a wrapper based on Cython for the [Libinjection library](https://github.com/client9/libinjection). + +> Libinjection Version: v3.10.0(Released on 22 May 2017) + +### Requirements +- Python 2.7 or 3.4+ +- Cython module (install via pip) + +### Installation +``` +pip install libinjection-python +``` + +### Usage +- Check for SQL Injection + ``` + >> import libinjection + >> libinjection.is_sql_injection("http://testphp.vulnweb.com/main.php?SmallClass=' union select * from news where 1=2 and ''='") + {'is_sqli': True, 'fingerprint': 'sUEok', 'token_vector': [{'pos': 0, 'len': 31, 'count': 0, 'type': 115, 'str_open': 0, 'str_close': 39, 'val': b'http://testphp.vulnweb.com/main'}, {'pos': 49, 'len': 5, 'count': 0, 'type': 85, 'str_open': 0, 'str_close': 0, 'val': b'union'}, {'pos': 55, 'len': 6, 'count': 0, 'type': 69, 'str_open': 0, 'str_close': 0, 'val': b'select'}, {'pos': 62, 'len': 1, 'count': 0, 'type': 111, 'str_open': 0, 'str_close': 0, 'val': b'*'}, {'pos': 64, 'len': 4, 'count': 0, 'type': 107, 'str_open': 0, 'str_close': 0, 'val': b'from'}, {'pos': 69, 'len': 4, 'count': 0, 'type': 110, 'str_open': 0, 'str_close': 0, 'val': b'news'}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}]} + ``` + +- Check for Cross Site Scripting + ``` + >> libinjection.is_xss("http://testphp.vulnweb.com/index.php?name=guest<script>alert('attacked')</script>") + {'is_xss': True, 'flag': 0} + ``` + +### License +Copyright (c) 2021 wzhvictor + +Licensed under the GNU General Public License v3. + + + + +%package -n python3-libinjection-python +Summary: Libinjection Python Wrapper +Provides: python-libinjection-python +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-libinjection-python +# Libinjection-python + + + + +Libinjection-python is a wrapper based on Cython for the [Libinjection library](https://github.com/client9/libinjection). + +> Libinjection Version: v3.10.0(Released on 22 May 2017) + +### Requirements +- Python 2.7 or 3.4+ +- Cython module (install via pip) + +### Installation +``` +pip install libinjection-python +``` + +### Usage +- Check for SQL Injection + ``` + >> import libinjection + >> libinjection.is_sql_injection("http://testphp.vulnweb.com/main.php?SmallClass=' union select * from news where 1=2 and ''='") + {'is_sqli': True, 'fingerprint': 'sUEok', 'token_vector': [{'pos': 0, 'len': 31, 'count': 0, 'type': 115, 'str_open': 0, 'str_close': 39, 'val': b'http://testphp.vulnweb.com/main'}, {'pos': 49, 'len': 5, 'count': 0, 'type': 85, 'str_open': 0, 'str_close': 0, 'val': b'union'}, {'pos': 55, 'len': 6, 'count': 0, 'type': 69, 'str_open': 0, 'str_close': 0, 'val': b'select'}, {'pos': 62, 'len': 1, 'count': 0, 'type': 111, 'str_open': 0, 'str_close': 0, 'val': b'*'}, {'pos': 64, 'len': 4, 'count': 0, 'type': 107, 'str_open': 0, 'str_close': 0, 'val': b'from'}, {'pos': 69, 'len': 4, 'count': 0, 'type': 110, 'str_open': 0, 'str_close': 0, 'val': b'news'}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}]} + ``` + +- Check for Cross Site Scripting + ``` + >> libinjection.is_xss("http://testphp.vulnweb.com/index.php?name=guest<script>alert('attacked')</script>") + {'is_xss': True, 'flag': 0} + ``` + +### License +Copyright (c) 2021 wzhvictor + +Licensed under the GNU General Public License v3. + + + + +%package help +Summary: Development documents and examples for libinjection-python +Provides: python3-libinjection-python-doc +%description help +# Libinjection-python + + + + +Libinjection-python is a wrapper based on Cython for the [Libinjection library](https://github.com/client9/libinjection). + +> Libinjection Version: v3.10.0(Released on 22 May 2017) + +### Requirements +- Python 2.7 or 3.4+ +- Cython module (install via pip) + +### Installation +``` +pip install libinjection-python +``` + +### Usage +- Check for SQL Injection + ``` + >> import libinjection + >> libinjection.is_sql_injection("http://testphp.vulnweb.com/main.php?SmallClass=' union select * from news where 1=2 and ''='") + {'is_sqli': True, 'fingerprint': 'sUEok', 'token_vector': [{'pos': 0, 'len': 31, 'count': 0, 'type': 115, 'str_open': 0, 'str_close': 39, 'val': b'http://testphp.vulnweb.com/main'}, {'pos': 49, 'len': 5, 'count': 0, 'type': 85, 'str_open': 0, 'str_close': 0, 'val': b'union'}, {'pos': 55, 'len': 6, 'count': 0, 'type': 69, 'str_open': 0, 'str_close': 0, 'val': b'select'}, {'pos': 62, 'len': 1, 'count': 0, 'type': 111, 'str_open': 0, 'str_close': 0, 'val': b'*'}, {'pos': 64, 'len': 4, 'count': 0, 'type': 107, 'str_open': 0, 'str_close': 0, 'val': b'from'}, {'pos': 69, 'len': 4, 'count': 0, 'type': 110, 'str_open': 0, 'str_close': 0, 'val': b'news'}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}, {'pos': 0, 'len': 0, 'count': 0, 'type': 0, 'str_open': 0, 'str_close': 0, 'val': b''}]} + ``` + +- Check for Cross Site Scripting + ``` + >> libinjection.is_xss("http://testphp.vulnweb.com/index.php?name=guest<script>alert('attacked')</script>") + {'is_xss': True, 'flag': 0} + ``` + +### License +Copyright (c) 2021 wzhvictor + +Licensed under the GNU General Public License v3. + + + + +%prep +%autosetup -n libinjection-python-1.1.6 + +%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-libinjection-python -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.6-1 +- Package Spec generated @@ -0,0 +1 @@ +24fef9817c58da057a1d13ca479f166e libinjection-python-1.1.6.tar.gz |
