Help - Search - Members - Calendar
Full Version: Fun (potentially harmful) scriptlets!
Krazy Letter Forums > Creativity > Creative Stuff
myncknm
CODE
java script: var a = document.documentElement.childNodes; var b = 0; while (a[b]) {  for (var d = a[b].childNodes.length - 1; d >= 0; d--) {   var e = a[b].removeChild(a[b].childNodes[d]);   a[b].appendChild(e);  }  } void(0);

Crepes, I do believe I've found a vulnerability in Firefox v1.5.0.8 above. It crashes if you run the above script. If you want to try, paste it into the address bar, remove the space between "java" and "script," and press enter.
It also crashes IE6 and IE7. I might've stumbled onto a major vulnerability here. Well, more of an annoyance than a vulnerability, but...

CODE
java script: var a = document.getElementsByTagName("body")[0].childNodes; var b = 0; while (a[b]) {  for (var d = a[b].childNodes.length - 1; d >= 0; d--) {   var e = a[b].removeChild(a[b].childNodes[d]);   a[b].appendChild(e);  } b++; } void(0);

Haha, the above script is psychedelic.

CODE
java script: function flip(target) {var a = target.childNodes; var b = 0; while (a[b]) {  for (var d = a[b].childNodes.length - 1; d >= 0; d--) {   var e = a[b].removeChild(a[b].childNodes[d]);   if (e.hasChildNodes()) flip(e);   a[b].appendChild(e);  } b++; } } flip (document.getElementsByTagName("body")[0]); void(0);

Crepes, that one's quite psychedelic.

CODE
java script: function flip(target) {var a = target.childNodes; var b = 0; while (a[b]) {  for (var d = a[b].childNodes.length - 1; d >= 0; d--) {   var e = a[b].removeChild(a[b].childNodes[d]);   if (e.hasChildNodes()) flip(e);   if (e.style) {    e.style.position="relative";    e.style.top = (Math.random() * 40 - 20) + "px";    e.style.left = (Math.random() * 40 - 20) + "px";   }   a[b].appendChild(e);  } b++; } } flip (document.getElementsByTagName("body")[0]); void(0);

Oh joy, another one up on the psychedelic meter. Or maybe a two.

CODE
java script: function cut(target) {if (target) return parseFloat(target.substring(0, target.length - 2)); else return 0;} function shift(target) {var a = target.childNodes; var b = 0; while (a[b]) {  for (var d = a[b].childNodes.length - 1; d >= 0; d--) {   var e = a[b].childNodes[d];   if (e.hasChildNodes) shift(e);   if (e.style) {  e.style.position="relative";    e.style.top = cut (e.style.top) + (Math.random() * 6 - 3) + "px";    e.style.left = cut(e.style.left) + (Math.random() * 6 - 3) + "px";   }   } b++; } } setInterval("shift(document.getElementsByTagName('body')[0]);", 500); void(0);

This one's very much quite psychedelic.
Hollow
Heh, the first script locked up both FireFox and the Mozilla suite even though it was only ran on one of the other happy.gif
Guitar_Freak22
So how do you make these work? What exactly do they do?
RaptorJesus
That last one is super screwed up...
Hollow
QUOTE(Guitar_Freak22 @ Nov 11 2006, 08:44 AM) *
So how do you make these work? What exactly do they do?

Myncknm said exactly how to make them work. It's JavaScript, either learn it or run them.
Guitar_Freak22
QUOTE(Fury @ Nov 11 2006, 12:28 PM) *
Myncknm said exactly how to make them work. It's JavaScript, either learn it or run them.


And where did Myncknm say that exactly? I still do not understand what you mean by "run them." How do you run them?
Hollow
QUOTE(myncknm @ Nov 10 2006, 10:46 PM) *
paste [the code] into the address bar, remove the space between "java" and "script," and press enter.
It also crashes IE6 and IE7.

That's how you "run them". It's also exactly where Myncknm said that.
Guitar_Freak22
QUOTE(Fury @ Nov 11 2006, 12:50 PM) *
That's how you "run them". It's also exactly where Myncknm said that.


I tried that, nothing happened.
Hollow
Do you have JavaScript enabled on whatever browser you're using? Are you using FireFox that is later than version 1.5 like Myncknm said?
Guitar_Freak22
Si senior. What happens if you paste it into the JavaScript Console on the tools menu?
Hollow
What tools menu?
myncknm
It's not going to work from Firefox's javascript console. It should work from the address bar though. So, absolutely nothing happens when you try it?
Guitar_Freak22
QUOTE(Fury @ Nov 11 2006, 01:00 PM) *
What tools menu?


The one in the bar at the top of the FF screen, the one that says File, Edit, View, and all that stuff.

QUOTE(myncknm @ Nov 11 2006, 01:48 PM) *
It's not going to work from Firefox's javascript console. It should work from the address bar though. So, absolutely nothing happens when you try it?


The first did something, it made the google search pop up and search for it. The other did nothing though...
Hollow
The first locks the browser. The other ones flip the HTML read order. You can only see it if you are on a webpage.
myncknm
QUOTE(Guitar_Freak22 @ Nov 11 2006, 12:00 PM) *
The first did something, it made the google search pop up and search for it.

That means that you forgot to remove the space in between "java" and "script."

You do have javascript enabled right? The fast reply box appears and disappears when you click on the button?
Guitar_Freak22
QUOTE(myncknm @ Nov 11 2006, 02:23 PM) *
That means that you forgot to remove the space in between "java" and "script."

You do have javascript enabled right? The fast reply box appears and disappears when you click on the button?


But I did delete the space between 'java' and 'script.' I got the first one to work. I have not yet tried any of the others.
myncknm
CODE
java script:  function initialize(target) { var list = new Array(); var a = target.childNodes; var b = 0; while (a[b]) {      if (a[b].hasChildNodes()) list = list.concat(initialize(a[b]));  if (a[b].style) {   a[b].style.position="relative";   list.push(a[b]);  } b++; } return list; } function cut(target) {if (target) return parseInt(target.substring(0, target.length - 2)); else return 0;} function shift(target) { for (var i = target.length - 1; i >= 0; i--) {  target[i].style.top = cut (target[i].style.top) + Math.floor(Math.random() * 7 - 3) + "px";  target[i].style.left = cut(target[i].style.left) + Math.floor(Math.random() * 7 - 3) + "px"; } setTimeout("shift(list);", 20); } var list = initialize(document.getElementsByTagName("body")[0]); alert("There are " + list.length + " elements on the page."); setTimeout("shift(list);", 50); void(0);


This should be a more efficient version of the last one. It's untested though.

-----Edit-----
Okay, now it's tested. It's more efficient because in the beginning it goes through the whole element hierarchy, making a list of each that has a style object, then setting each to have "position: relative." The original did all that repeatedly every time it shifted things.

-----Edit2-----
I also set it to use integers instead of floating-points. Less parsing work to do.
leftylink
This one's a fun one...
CODE
java script: R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);


... wtf? Doesn't work here... Just do a google image search and paste that one in
myncknm
QUOTE(leftylink @ Nov 11 2006, 04:00 PM) *
This one's a fun one...
CODE
java script: R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);


... wtf? Doesn't work here... Just do a google image search and paste that one in

Heh. That is a really good one. Nice use of trigonometry too.
chuck
the 2nd one is my favorite.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.