[Javascript] Forward image via http with ajax

Scott Reynen scott at randomchaos.com
Sat Feb 3 14:09:35 CST 2007


On Feb 3, 2007, at 12:52 PM, Terry Riegel wrote:

> 1. IP camera (LAN)
> 2. Web Browser (LAN)
> 3. Router (gateway between LAN and WAN)
> 4. Web Server (WAN)
>
> I need to move the image from the (1) The IP camera to (4) The Web  
> server. I am trying to do this using (3) The web browser as the  
> agent to move it.

I believe what you want to do is impossible.  If it's not, it should  
be, as it would allow a JavaScript to funnel content from a private  
LAN (presumably private to prevent just such funneling) to a remote  
server without user approval.  To avoid this kind of security  
problem, JavaScript can only load content from servers within the  
same domain as the JavaScript itself.  If that domain is the web  
server (4), you won't be able to load data from the IP camera (1).   
If that domain is the IP camera (1), you won't be able to send the  
data to the web server (4).  If you want to steal images from an  
unwilling LAN, I think (hope) you'll at least need a co-conspirator  
within the LAN.

Peace,
Scott




More information about the Javascript mailing list