// ==UserScript== // @name Instagram Virus Link Killer // @namespace http://tampermonkey.net/ // @version 1.0 // @description 检查并修改Twitter页面中的高危链接 // @author SKW_Official_2 // @match *://*.x.com/* // @match *://*.twitter.com/* // @grant none // @license GPLv3 // @downloadURL none // ==/UserScript== (function() { 'use strict'; function checkAndModifyLinks() { // 获取所有的 a 标签 const links = document.querySelectorAll('a'); links.forEach(link => { const href = link.href; const textContent = link.textContent; // 检查 a 标签的 textContent 是否包含 l.instagram.com if (!textContent.includes(" [高危链接]")) { if (textContent.includes("l.instagram.com")) { console.log("找到了 l.instagram.com 文本"); // 检查 textContent 是否包含 business.instagram.com 或 www.facebook.com/ads if (textContent.includes("business.instagram.com") || textContent.includes("www.facebook.com/ads")) { console.log("找到了 business.instagram.com 或 www.facebook.com/ads 文本"); // 将链接颜色改为红色 link.style.color = "red"; // 添加高危链接的标记 link.textContent += " [高危链接]"; // 修改链接目标为 127.0.0.1 link.href = "http://127.0.0.1"; } } } }); } const observer = new MutationObserver(checkAndModifyLinks); observer.observe(document.body, { childList: true, subtree: true }); checkAndModifyLinks(); })();