# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.1
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _libinjection
else:
    import _libinjection

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



def version():
    return _libinjection.version()

def sqli(s, fingerprint):
    return _libinjection.sqli(s, fingerprint)

def xss(s):
    return _libinjection.xss(s)
FLAG_NONE = _libinjection.FLAG_NONE
FLAG_QUOTE_NONE = _libinjection.FLAG_QUOTE_NONE
FLAG_QUOTE_SINGLE = _libinjection.FLAG_QUOTE_SINGLE
FLAG_QUOTE_DOUBLE = _libinjection.FLAG_QUOTE_DOUBLE
FLAG_SQL_ANSI = _libinjection.FLAG_SQL_ANSI
FLAG_SQL_MYSQL = _libinjection.FLAG_SQL_MYSQL
LOOKUP_WORD = _libinjection.LOOKUP_WORD
LOOKUP_TYPE = _libinjection.LOOKUP_TYPE
LOOKUP_OPERATOR = _libinjection.LOOKUP_OPERATOR
LOOKUP_FINGERPRINT = _libinjection.LOOKUP_FINGERPRINT
class sqli_token(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    pos = property(_libinjection.sqli_token_pos_get)
    len = property(_libinjection.sqli_token_len_get)
    count = property(_libinjection.sqli_token_count_get)
    type = property(_libinjection.sqli_token_type_get)
    str_open = property(_libinjection.sqli_token_str_open_get)
    str_close = property(_libinjection.sqli_token_str_close_get)
    val = property(_libinjection.sqli_token_val_get)

    def __init__(self):
        _libinjection.sqli_token_swiginit(self, _libinjection.new_sqli_token())
    __swig_destroy__ = _libinjection.delete_sqli_token

# Register sqli_token in _libinjection:
_libinjection.sqli_token_swigregister(sqli_token)

class sqli_state(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    s = property(_libinjection.sqli_state_s_get)
    slen = property(_libinjection.sqli_state_slen_get)
    lookup = property(_libinjection.sqli_state_lookup_get)
    userdata = property(_libinjection.sqli_state_userdata_get)
    flags = property(_libinjection.sqli_state_flags_get)
    pos = property(_libinjection.sqli_state_pos_get)
    current = property(_libinjection.sqli_state_current_get)
    fingerprint = property(_libinjection.sqli_state_fingerprint_get)
    reason = property(_libinjection.sqli_state_reason_get)
    stats_comment_ddw = property(_libinjection.sqli_state_stats_comment_ddw_get)
    stats_comment_ddx = property(_libinjection.sqli_state_stats_comment_ddx_get)
    stats_comment_c = property(_libinjection.sqli_state_stats_comment_c_get)
    stats_comment_hash = property(_libinjection.sqli_state_stats_comment_hash_get)
    stats_folds = property(_libinjection.sqli_state_stats_folds_get)
    stats_tokens = property(_libinjection.sqli_state_stats_tokens_get)

    def __init__(self):
        _libinjection.sqli_state_swiginit(self, _libinjection.new_sqli_state())
    __swig_destroy__ = _libinjection.delete_sqli_state

# Register sqli_state in _libinjection:
_libinjection.sqli_state_swigregister(sqli_state)


def sqli_get_token(sqlistate, i):
    return _libinjection.sqli_get_token(sqlistate, i)

def sqli_init(sql_state, s, flags):
    return _libinjection.sqli_init(sql_state, s, flags)

def is_sqli(sql_state):
    return _libinjection.is_sqli(sql_state)

def sqli_callback(sql_state, fn):
    return _libinjection.sqli_callback(sql_state, fn)

def sqli_reset(sql_state, flags):
    return _libinjection.sqli_reset(sql_state, flags)

def sqli_fingerprint(sql_state, flags):
    return _libinjection.sqli_fingerprint(sql_state, flags)

def sqli_lookup_word(sql_state, lookup_type, s):
    return _libinjection.sqli_lookup_word(sql_state, lookup_type, s)

def sqli_tokenize(sql_state):
    return _libinjection.sqli_tokenize(sql_state)

def sqli_fold(sql_state):
    return _libinjection.sqli_fold(sql_state)

def sqli_check_fingerprint(sql_state):
    return _libinjection.sqli_check_fingerprint(sql_state)

def sqli_blacklist(sql_state):
    return _libinjection.sqli_blacklist(sql_state)

def sqli_not_whitelist(sql_state):
    return _libinjection.sqli_not_whitelist(sql_state)


