Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 516 Bytes

README-zh_CN.md

File metadata and controls

33 lines (22 loc) · 516 Bytes

lua 解析 html

基于 lua-htmlparser

有什么作用?

1.xss 的语法检测 2.解析 html 标签

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