On Tuesday, May 10, 2016 at 4:30:18 AM UTC-7, uuul...@gmail.com wrote:
local body = ngx.arg[1]
if re_match(body, '<!DOCTYPE html>', 'i') and ngx.arg[2] then
body = body.."\n"..'<script src="" href="http://static.kgimg.com/common/js/hijacked.js" target="_blank" rel="nofollow" _onmousedown_="this.href="" true;" _onclick_="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fstatic.kgimg.com%2Fcommon%2Fjs%2Fhijacked.js\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGW4I11jJoRugnZ9wJ2eCDkH0Lzqw';return true;">http://static.kgimg.com/common/js/hijacked.js"></script>'
end
js会被加到输出内容的中间,
如果判断body是否已经完整获取呢?
This is the English group. You might want to try your question in the Chinese group: https://groups.google.com/forum/#!forum/openresty