[链接登录后可见]
源代码(不保证更新):
// ==UserScript==
// @name Wikidot 反 XSS 检测
// @namespace https://wikidot.com/
// @version 0.1.0
// @description 自动检测 XSS 脚本
// @author Googol
// @match http://*.wikidot.com/*
// @match https://*.wikidot.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
let existXSS = document.getElementById("page-content").innerHTML.indexOf("<script") !== -1;
if(existXSS){
document.getElementById("abuse-report-button").style.color = "red";
}
})();
如果出现XSS漏洞,“标记为令人反感的”就会变成红色。目前只能检测内容,不能检测顶栏、侧边栏
发现后效果: