GitHunt
WE

weaweawe01/lua-htmlparser

An HTML parser for lua, Xss interception engine

lua analysis html

English | 简体中文

lua analysis html xss detection

Based on lua-htmlparser

Main purpose

1.Xss semantic analysis
2.Help discover xss attacks

Examples

package.path = "./src/?.lua;" .. package.path

local xss_engine = require("xss_engine")


local text =[[
<img src=x onerror=alert(1)>
]]

if xss_engine.is_xss(text) then
    print("this is info xss")
else
    print("this is info not xss")
end

[root@localhost lua-htmlparser]# luajit test2.lua 
this is info xss

Languages

Lua100.0%
GNU Lesser General Public License v3.0
Created May 9, 2023
Updated June 17, 2025
weaweawe01/lua-htmlparser | GitHunt