client9 / client9/libinjection

Python 3 binding

Open
#108 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1k
Forks
282
PR merge metrics
No merged PRs in 30d

Description

Has anybody used libinjection with python 3.5? I didn't find any info about python 3 support. I built libinjection python version with -py3 swig option and got the module:

```
# pip3 show libinjection
---
Metadata-Version: 1.1
Name: libinjection
Version: 3.9.1
Summary: Wrapper around libinjection c-code to detect sqli
Home-page: https://libinjection.client9.com/
Author: Nick Galbreath
Author-email: nickg@client9.com
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages/libinjection-3.9.1-py3.5-linux-x86_64.egg
Requires:
Classifiers:
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Topic :: Database
Topic :: Security
Operating System :: OS Independent
Development Status :: 3 - Alpha
Topic :: Internet :: Log Analysis
Topic :: Internet :: WWW/HTTP
```

I can import the module without errors, but I can't use libinjection functions (from the [docs](https://github.com/client9/libinjection/wiki/doc-sqli-python)):

```
Python 3.5.1+ (default, Mar 30 2016, 22:46:26)
[GCC 5.3.1 20160330] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from libinjection import *
>>> sqli_state()
Traceback (most recent call last):
File "", line 1, in
NameError: name 'sqli_state' is not defined
```

The same code works well on python 2.7

```
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from libinjection import *
>>> sqli_state()

```

It will be really great if somebody can help me with this question. Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.