Posted by Admin in Questions & Answers
Below is the sample code to input in your browser.
The above code is to be typed in browser address bar similar to image below:
After you complete the code, press enter, you’ll see the something similar to below:
To have more clear vision about statement end symbol, refer to following example,
It gives three separate windows with three different messages.
The alert() function is only used to get information from the website. For example to get form value, cookies etc.
Above code example shows the cookies that are set in your browser by your current website.
This can be very useful if you are trying to hack basic websites. Cookies are set most in page login systems that might be helpful to get illegal access to the website’s administrator page.
If the website is not strong enough you can modify the username to administrator’s username and gain full access to the website.
To change the cookie value you can follow the syntax similar to below:
“void” in simple terms applies the function without refreshing the page. Literally, it means that the function won’t return any result.
The above code will change the cookie value and show the changed value.
You can change any cookie value by applying syntax like above.
To change multiple cookies following pattern will help.
You can add multiple statements to do multiple tasks at once.
Changing cookie value allows you to confuse the website about your real details like username, log in status, and other dynamic values that are cookied.
Hope this tutorial was informative.