eHow launches Android app: Get the best of eHow on the go.

How To

How to Use Javascript Injections

Contributor
By Charles Pearson
eHow Contributing Writer
(1 Ratings)

Javascript injections are tricks that can be used to change a website in a browser as well as check to see if there are any cookies on the website. The cool part about injections is that they are harmless to the website and really only affect what you see in your browser. They can also be used to spoof a website.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • Computer
  • Strong Internet connection

    How to Use Javascript Injections

  1. Step 1
     

    Open a Web page using your Web browser.

  2. Step 2

    Type javascript:alert('How, To'); into your URL address bar.

  3. Step 3
     

    Hit "enter" and watch the dialog box pop up. Click "OK".

  4. Step 4
     

    Type "javascript:alert(document.cookie)" to see if there are any cookies on the website.

  5. Step 5
     

    Check for cookies. Copy down the field.

  6. Step 6

    Copy and paste "javascript:void(document.cookie="Field = myValue")" into the address bar. Hit "enter".

  7. Step 7
     

    Edit the "javascript:void" command. Change "field" to a field found in the cookie alert. Next, change "myValue". Remember, if you continue to change the fields, you can change what is said in the cookie alert.

Tips & Warnings
  • Search the web for other types of javascript injections
  • Javascript injections only work for spoofing websites, not for hacking into one.
  • Do not attempt to illegally deface or "phish" a website using more advanced hacking methods or you will be arrested.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics