Date: Mon, 7 Mar 2022 18:15:53 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 9ef94208e6f1 - main - devel/libinjection: Add libinjection 3.10.0 Message-ID: <202203071815.227IFrS8058340@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=9ef94208e6f1c80400c94136215c26bd65ea868a commit 9ef94208e6f1c80400c94136215c26bd65ea868a Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-07 17:46:37 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-07 18:10:50 +0000 devel/libinjection: Add libinjection 3.10.0 libinjection is a SQL / SQLI tokenizer parser analyzer. WWW: https://github.com/libinjection/libinjection --- devel/Makefile | 1 + devel/libinjection/Makefile | 25 ++++++++++ devel/libinjection/distinfo | 3 ++ devel/libinjection/files/patch-2to3 | 99 +++++++++++++++++++++++++++++++++++++ devel/libinjection/pkg-descr | 3 ++ devel/libinjection/pkg-plist | 7 +++ 6 files changed, 138 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 9425dafd70f5..4b54012d2645 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1277,6 +1277,7 @@ SUBDIR += libibuddy SUBDIR += libical SUBDIR += libindicator + SUBDIR += libinjection SUBDIR += libinotify SUBDIR += libiqxmlrpc SUBDIR += libisofs diff --git a/devel/libinjection/Makefile b/devel/libinjection/Makefile new file mode 100644 index 000000000000..0015afd5d416 --- /dev/null +++ b/devel/libinjection/Makefile @@ -0,0 +1,25 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> + +PORTNAME= libinjection +PORTVERSION= 3.10.0 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= SQL / SQLI tokenizer parser analyzer + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= python:build shebangfix + +USE_GITHUB= yes + +SHEBANG_GLOB= *.py + +do-install: + ${INSTALL_DATA} ${WRKSRC}/src/libinjection*.h ${STAGEDIR}${PREFIX}/include/ + ${INSTALL_DATA} ${WRKSRC}/src/libinjection.a ${STAGEDIR}${PREFIX}/lib/libinjection.a + ${INSTALL_LIB} ${WRKSRC}/src/libinjection.so ${STAGEDIR}${PREFIX}/lib/libinjection.so + +.include <bsd.port.mk> diff --git a/devel/libinjection/distinfo b/devel/libinjection/distinfo new file mode 100644 index 000000000000..d0fd664dae30 --- /dev/null +++ b/devel/libinjection/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1646057842 +SHA256 (libinjection-libinjection-v3.10.0_GH0.tar.gz) = 9dd7ae68a21a3c50f705c383b1b714c77fd4093b0a561a5400f0cb0ad79b1ae7 +SIZE (libinjection-libinjection-v3.10.0_GH0.tar.gz) = 1658759 diff --git a/devel/libinjection/files/patch-2to3 b/devel/libinjection/files/patch-2to3 new file mode 100644 index 000000000000..857d0d4de3c2 --- /dev/null +++ b/devel/libinjection/files/patch-2to3 @@ -0,0 +1,99 @@ +--- src/make_parens.py.orig 2022-03-04 21:37:55 UTC ++++ src/make_parens.py +@@ -412,7 +412,7 @@ def main(): + mutator.permute(line.strip()) + + for fingerprint in mutator.aslist(): +- print fingerprint ++ print(fingerprint) + + + if __name__ == '__main__': +--- src/sqlparse_map.py.orig 2022-03-04 21:37:55 UTC ++++ src/sqlparse_map.py +@@ -1564,6 +1564,6 @@ if __name__ == '__main__': + if len(CHARMAP) != 256: + sys.stderr.write("Assert failed: charmap is %d characters\n" % len(CHARMAP)) + sys.exit(1) +- print dump() ++ print(dump()) + + # pylint: disable=C0301,C0302 +--- src/sqlparse2c.py.orig 2022-03-04 21:38:43 UTC ++++ src/sqlparse2c.py +@@ -14,7 +14,7 @@ import sys + def toc(obj): + """ main routine """ + +- print """ ++ print(""" + #ifndef LIBINJECTION_SQLI_DATA_H + #define LIBINJECTION_SQLI_DATA_H + +@@ -48,7 +48,7 @@ static size_t parse_xstring(sfilter * sf); + static size_t parse_bstring(sfilter * sf); + static size_t parse_estring(sfilter * sf); + static size_t parse_bword(sfilter * sf); +-""" ++""") + + # + # Mapping of character to function +@@ -85,26 +85,26 @@ static size_t parse_bword(sfilter * sf); + 'CHAR_ESTRING' : 'parse_estring', + 'CHAR_BWORD' : 'parse_bword' + } +- print +- print "typedef size_t (*pt2Function)(sfilter *sf);" +- print "static const pt2Function char_parse_map[] = {" ++ print() ++ print("typedef size_t (*pt2Function)(sfilter *sf);") ++ print("static const pt2Function char_parse_map[] = {") + pos = 0 + for character in obj['charmap']: +- print " &%s, /* %d */" % (fnmap[character], pos) ++ print(" &%s, /* %d */" % (fnmap[character], pos)) + pos += 1 +- print "};" +- print ++ print("};") ++ print() + + # keywords + # load them + keywords = obj['keywords'] + +- for fingerprint in list(obj[u'fingerprints']): ++ for fingerprint in list(obj['fingerprints']): + fingerprint = '0' + fingerprint.upper() + keywords[fingerprint] = 'F' + + needhelp = [] +- for key in keywords.iterkeys(): ++ for key in keywords.keys(): + if key != key.upper(): + needhelp.append(key) + +@@ -113,17 +113,17 @@ static size_t parse_bword(sfilter * sf); + del keywords[key] + keywords[key.upper()] = tmpv + +- print "static const keyword_t sql_keywords[] = {" ++ print("static const keyword_t sql_keywords[] = {") + for k in sorted(keywords.keys()): + if len(k) > 31: + sys.stderr.write("ERROR: keyword greater than 32 chars\n") + sys.exit(1) + +- print " {\"%s\", '%s'}," % (k, keywords[k]) +- print "};" +- print "static const size_t sql_keywords_sz = %d;" % (len(keywords), ) ++ print(" {\"%s\", '%s'}," % (k, keywords[k])) ++ print("};") ++ print("static const size_t sql_keywords_sz = %d;" % (len(keywords), )) + +- print "#endif" ++ print("#endif") + return 0 + + if __name__ == '__main__': diff --git a/devel/libinjection/pkg-descr b/devel/libinjection/pkg-descr new file mode 100644 index 000000000000..34902fde8e75 --- /dev/null +++ b/devel/libinjection/pkg-descr @@ -0,0 +1,3 @@ +libinjection is a SQL / SQLI tokenizer parser analyzer. + +WWW: https://github.com/libinjection/libinjection diff --git a/devel/libinjection/pkg-plist b/devel/libinjection/pkg-plist new file mode 100644 index 000000000000..e3b386918e17 --- /dev/null +++ b/devel/libinjection/pkg-plist @@ -0,0 +1,7 @@ +include/libinjection.h +include/libinjection_html5.h +include/libinjection_sqli.h +include/libinjection_sqli_data.h +include/libinjection_xss.h +lib/libinjection.a +lib/libinjection.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203071815.227IFrS8058340>