How to Use JavaScript Injections

You must enter the code in the URL address bar of the window., javascript:alert("Hello"); alert("World"); To bring up 2 alert boxes, the one in the front will say "Hello" and once you click OK, the one saying "World" will appear...

13 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: You must enter the code in the URL address bar of the window.

    Try these injections:
    Note
    - If you use firefox, you will have to use another way, like apple-shift-k on a mac javascript:alert("Hello!"); To bring up an alert box saying "Hello!": ,,, You can put any other color in the place of blue to change it to a different color: ,"); To see the real server name of the site you are looking at.

    You should use it if you think that you are viewing a spoofed website, or anytime just to make sure: , Make sure to find a site like Google Images so there are more pictures!(If you press the refresh button, it goes really fast! might only work with MAC): , It funnels the pictures in a snake-like motion: ,
  2. Step 2: javascript:alert("Hello"); alert("World"); To bring up 2 alert boxes

  3. Step 3: the one in the front will say "Hello" and once you click OK

  4. Step 4: the one saying "World" will appear:

  5. Step 5: javascript:alert(document.forms.to.value="something") To change the value of form to something:

  6. Step 6: javascript:void(document.bgColor="blue") To change the background color to blue.

  7. Step 7: javascript:alert("The actual url is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match

  8. Step 8: this may be a spoof.

  9. Step 9: javascript: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.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()'

  10. Step 10: 5); void(0); To make pictures fly around.

  11. Step 11: javascript: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.style; DIS.position='absolute'; DIS.left=Math.cos(R*x1+i*x1+x2)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()'

  12. Step 12: 5); void(0); To spin circle of pictures.

  13. Step 13: javascript:document.body.contentEditable='true';document.designMode='on';void0 To move things around on the webpage:

Detailed Guide

Try these injections:
Note
- If you use firefox, you will have to use another way, like apple-shift-k on a mac javascript:alert("Hello!"); To bring up an alert box saying "Hello!": ,,, You can put any other color in the place of blue to change it to a different color: ,"); To see the real server name of the site you are looking at.

You should use it if you think that you are viewing a spoofed website, or anytime just to make sure: , Make sure to find a site like Google Images so there are more pictures!(If you press the refresh button, it goes really fast! might only work with MAC): , It funnels the pictures in a snake-like motion: ,

About the Author

C

Carolyn Graham

Professional writer focused on creating easy-to-follow pet care tutorials.

85 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: