Block Alert XSS

Block Alert XSS

Blocked Window Alert - Prompt - Confirm - Open XSS

&& block function Window.Console

To deblock make var DEBUG = true

if i have forget some function you can add here on Comment Thanks

Javascript Code


var DEBUG = false;

    var xss = ["alert", "prompt", "open", "confirm" ];
    if(!window.xss) window.xss = {};
    for(var i=0;i<xss.length;i++){
        window[xss[i]] = function(text){};

    if(!window.console) window.console = {};
    var methods = ["log", "debug", "warn", "error", "info" , "dir", "dirxml", "trace", "profile", "assert", "count", "group", "groupCollapsed", "time"];
    for(var i=0;i<methods.length;i++){
        console[methods[i]] = function(){};




Welcome to my personal blog to share my knowledge
Cyber Security, Ethical Hacking, Web & Network Auditing, Reverse Engineering and Cryptography
Website semi-configured to use with No-Script. No ADS and No use analytics tracking.


Forum : @0x1

© 0x1 | Cyber Security Consulting - Copyright All Rights Reserved