Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to hide a portion of the following code:

Status
Not open for further replies.

axsom1

Technical User
Feb 27, 2001
67
US
Here is a copy of some code I would like to partially hide.

<script language=&quot;JavaScript&quot;>
<!--
if ((navigator.appName == &quot;Microsoft Internet Explorer&quot;)&&(navigator.platform != &quot;MacPPC&quot;))
{
document.write(&quot;<OBJECT ID=\&quot;VAMCtrl\&quot; WIDTH=330 HEIGHT=270&quot;);
document.write(&quot; CLASSID=CLSID:85AC0EFC-2CA1-4C1C-82AE-5C31184A13EF&quot;);
document.write(&quot; CODEBASE=\&quot; document.write(&quot;<PARAM NAME=\&quot;Url\&quot; VALUE=\&quot; document.write(&quot;<PARAM NAME=\&quot;VSize\&quot; VALUE=\&quot;CMS\&quot;>&quot;);
document.write(&quot;<PARAM NAME=\&quot;RemoteIP\&quot; VALUE=\&quot;-578877760\&quot;>&quot;);
document.write(&quot;<PARAM NAME=\&quot;RemotePort\&quot; VALUE=\&quot;5001\&quot;>&quot;);
document.write(&quot;<PARAM NAME=\&quot;RemoteID\&quot; VALUE=\&quot;4172\&quot;>&quot;);
document.write(&quot;</OBJECT>&quot;);
}
//-->

</script>

How do I hide the HTTP portions of the above code? Is this possible? We are currently using a D-Link web cam and I can't turn off the default web pages it ships with. I would like to keep someone from just browsing to this address and viewing the information. Currently we force users through a login page, but once they are there, they will be able to see where our web cam is actually located.

Any help or suggestions are appreciated!

Thanks,
John
 
Hi axsom1, there's really no way hide any code from the browser, what you need is a secure form, like asp, php, coldfusion with MSAccess, etc...
These scripts will check if the user is logged in if not they will redirected to another page, a page with no useful information...
go to or search on for login codes... Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
Thats what I was afraid of. I currently do force users to login, and this would be the result, but I want to prevent users from just typing in this code or just pluging in the ip and browsing to the web cam.

Thanks for the help though!!

Time to see if D-Link can help...wont hold my breath
 
Hey, yup that's the only way...and the only secure way to do it...
Ask D-Link and see what they suggest... Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
One question, how would I keep the URL value from being displayed in the lower left hand corner of Internet Explorer?

I've changed the script to now be called from a .js file, and if I could get that info suppressed, I will feel as comfortable as I possibly can.

D-Link support is horrible...

Thanks,
John
 
axsom1, even the external JS file isn't secure, someone can just go to View -> Source, find out the JS file name and call that from the address bar (EX: this will open the JS file and thus have access to the address...
For the hiding of web adderss in the status bar here's one link that might help:

Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
Yeah I'm aware of just opening up the js file, but what can you do right?

I wish I could hack into this D-Link camera and remove the stinking web page they have or at least modify it...

I did get the web address hidden last night to, sorry for the simple questions, I'm a total javascript newb.

Thanks for all your help and suggestions!!

John
 
ok... Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
I have some information to you about the D-Link that may help you in regard to bypassing the default page.

tleighton@uneedspeed.net


Don't know how this forum works but you can email me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top