Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Web-App-Sec
[Top] [All Lists]

Re: [WEB SECURITY] Importing large code piece into Javascript context wi

Subject: Re: [WEB SECURITY] Importing large code piece into Javascript context without SCRIPT SRC=...
Date: Fri, 14 Oct 2005 20:05:05 +0200
On 14 Oct 2005 at 10:56, Jeremiah Grossman wrote:

Admittedly, I was a bit confused by what your trying to achieve with  
code. So sticking the question at hand...

"Importing large code piece into Javascript context without SCRIPT  
SRC" ...
I take to do not use the HTML syntax... <script src="http://foo/ 
file.js"></script>

Here's an idea..

1) DOM Programming
var js = document.createElement('script');
js.setAttribute('src', 'http://foo/file.js');
document.body.appendChild(js);

* same effect, but different style.


Not fair ;-)

This will not be allowed (I supposed) by Content-Restrictions that specify no 
external code 
(see the link in my original writeup). I think (hope...) that the 
Content-Restrictions 
would apply to any JS executed, and to dynamically created HTMLs (such as the 
above).

And there's also a Content-Restriction against creating/modifying HTML nodes.

But yes, I suppose I should have clarified this. So thanks!

-Amit

<Prev in Thread] Current Thread [Next in Thread>