mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Windows compilation was failing due to the utilization of size_t which is part of the strings.h. strings.h was not part of windows and so the compilation was failing. This update fix that. Issue #65 on libinjection: https://github.com/client9/libinjection/issues/65
66 lines
1.6 KiB
C
66 lines
1.6 KiB
C
/**
|
|
* Copyright 2012, 2013 Nick Galbreath
|
|
* nickg@client9.com
|
|
* BSD License -- see COPYING.txt for details
|
|
*
|
|
* https://libinjection.client9.com/
|
|
*
|
|
*/
|
|
|
|
#ifndef _LIBINJECTION_H
|
|
#define _LIBINJECTION_H
|
|
|
|
#ifdef __cplusplus
|
|
# define LIBINJECTION_BEGIN_DECLS extern "C" {
|
|
# define LIBINJECTION_END_DECLS }
|
|
#else
|
|
# define LIBINJECTION_BEGIN_DECLS
|
|
# define LIBINJECTION_END_DECLS
|
|
#endif
|
|
|
|
LIBINJECTION_BEGIN_DECLS
|
|
|
|
/*
|
|
* Pull in size_t
|
|
*/
|
|
#include <string.h>
|
|
|
|
/*
|
|
* Version info.
|
|
*
|
|
* This is moved into a function to allow SWIG and other auto-generated
|
|
* binding to not be modified during minor release changes. We change
|
|
* change the version number in the c source file, and not regenerated
|
|
* the binding
|
|
*
|
|
* See python's normalized version
|
|
* http://www.python.org/dev/peps/pep-0386/#normalizedversion
|
|
*/
|
|
const char* libinjection_version(void);
|
|
|
|
/**
|
|
* Simple API for SQLi detection - returns a SQLi fingerprint or NULL
|
|
* is benign input
|
|
*
|
|
* \param[in] s input string, may contain nulls, does not need to be null-terminated
|
|
* \param[in] slen input string length
|
|
* \param[out] fingerprint buffer of 8+ characters. c-string,
|
|
* \return 1 if SQLi, 0 if benign. fingerprint will be set or set to empty string.
|
|
*/
|
|
int libinjection_sqli(const char* s, size_t slen, char fingerprint[]);
|
|
|
|
/** ALPHA version of xss detector.
|
|
*
|
|
* NOT DONE.
|
|
*
|
|
* \param[in] s input string, may contain nulls, does not need to be null-terminated
|
|
* \param[in] slen input string length
|
|
* \return 1 if XSS found, 0 if benign
|
|
*
|
|
*/
|
|
int libinjection_xss(const char* s, size_t slen);
|
|
|
|
LIBINJECTION_END_DECLS
|
|
|
|
#endif /* _LIBINJECTION_H */
|