Is it possible to hide html from users?

S

Safari48

Hi,

Being a novice, I have made use of the most simple password protection
script that I could find. Only problem is, on IE "View" and "Source", all the
users and passwords are visible to anyone who would be curious enough to
access the website.

Is there a simple manner in which to hide html?

Thanks
 
T

Tom Pepper Willett

How do I stop people from downloading my graphics or code?

http://www.digitalmidget.com/help/noclick/

http://www.jamesshuggins.com/h/web1/how_do_i_stop_downloading.htm

http://www.jimcoaddins.com/protect.htm
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
| Hi,
|
| Being a novice, I have made use of the most simple password protection
| script that I could find. Only problem is, on IE "View" and "Source", all
the
| users and passwords are visible to anyone who would be curious enough to
| access the website.
|
| Is there a simple manner in which to hide html?
|
| Thanks
 
A

Andrew Murray

Not really - no fool proof methods I've seen.

I've seen "encryption" scripts around that scramble what you see if you
click "view source" and it loads into notepad....but the one's I've seen are
done with Javascript which can be worked around by turning javascript off.
These type of scripts might stop a novice but nothing more.

Maybe a server side script could do this i.e. ASP or Perl/CGI - I don't
know.

Otherwise you need a "stronger" password program that *doesn't* reveal user
details in the code if you have sensitive data that requires such a password
program.

I have one that uses javascript - not the most secure (but it won't reveal
usernames etc on View Source). It uses Javascript and it does put the
usernames in the JS code but an external js file is used - and only users
that know the name of that JS file could view it.

Rather than call it "login.js" I've named the file with a bunch of random
characters like: roewEY1021.js Then hopefully, any spam bots and spiders
may not know to look for files like that, when they're more likely to target
something like "Login.js"

I don't really know how those spider things that leave spam entries in
peoples guestbooks work or how they "login" to a members area without user
logon details.

Anyway the logon script I use is from http://www.laughland.biz It is
pretty simple to set up....but you may ask a friend for help if you get
stuck.

Be advised, there are better and secure methods out there.
 
T

Trevor L.

Yes, this would occur. I have come across a sugetsion (which I have put in
test on my website), where you create a folder and a file (which hopefully
are hiiden from the user). The folder name and file name (without extension)
are used as UseID and Password.

This applies only to a single page, although I suppose one could make this
page the parent

This is the code
JS
var request = false
function testForIt()
{
request = true
if (document.images)
document.images["testImage"].src
= document.logon.userid.value + '/'
+ document.logon.password.value + '.gif'
else
loadIt()
return false
}
function loadIt()
{
if (request)
window.location.href
= document.logon.userid.value + '/'
+ document.logon.password.value + '.html'
request = false
}
function failIt()
{
if (request)
alert('Incorrect userid or password - please retype')

request = false
document.logon.password.value = ''
document.logon.userid.value = ''
if (document.images)
document.images["testImage"].src = "images/display/blank.gif"
}

HTML
<form name="logon" action="" onsubmit="return testForIt()">
<table>
<tr>
<td width="10%">UserId:</td><!-- Name of the folder containing the
secured page. -->
<td><input type="text" name="userid" size="12" maxlength="12"></td>
</tr>

<tr>
<td width="10%">Password:</td><!-- Name of the secured page. -->
<td><input type="password" name="password" size="14"
maxlength="12"></td>
</tr>
</table>

<p>
<input type="submit" value="Submit" name="B1">

<!-- Image used for testing. -->
<img border="0" name="testImage" src="images/display/blank.gif"
alt="" width="1" height="1"
onload="loadIt()" onerror="failIt()" >

<input type="reset" value="Reset" name="B2">
<input type="button" value="Go Back"
onclick="history.back()">
</p>
</form>

Try it if you like it :))
 
J

JCO

Only way I can think of is if you use Flash Media. Your code will be
written in Macromedia environment. People can download your swf files but
can't see the code inside of it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top