Passwords in html

liunx

Guest
Hi all,this is my 1st post.what i want to know is how do you create a user definable password in a html document?I know how to make the required fields using the following html code:<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>testing html</TITLE><br />
</HEAD><br />
<BODY><br />
<link="#blue"text="green"vlink="orange"alink="black"><br />
<br />
<H2>My test page</H2><br />
<br />
<tr><br />
<td><br />
<FONT COLOR="black"><table border="0"bgcolor="black"align="center">Password:</FONT><br />
<input type="password" name="pass" value="" size="15" maxlength="20"><br />
</td><br />
</tr><br />
</table><br />
<input type="hidden"name="page"value="page 3 form"><br />
<table><br />
<tr><br />
<td><br />
<input type="submit"value="login"><br />
<input type="reset"value="reset"><br />
<br />
<br />
<br />
</BODY><br />
</HTML><br />
<br />
<br />
what i want to do is define the correct password it should use.I've asked a few people how to code it correctly in html but i haven't had a reply from them yet.I didn't put the code into a table as i just coded it quickly.<!--content-->I do not think it is possible to have passwords in HTML. You may try JavaScript.<!--content-->No, you might say screw client side all together and do it server side. Java script passwords are among the least secure things in the world. Client side scripts like java script are just that, client side. If it is executed by my browser, that means I can see the script. If I can see the script then what stops me from going right around your protection. Or what if I simply disabled java script? You can use htaccess if you have it, but otherwise your options are ASP PHP CGI ASP.NET JSP CF.<!--content-->I agree with PeOfEo. If you put a password in HTML, or JS, nothing is stopping me from simply viewing the source and getting the password, or just simply disabling your security.<br />
<br />
<br />
edit:<br />
BTW, the right click script you have as your signature is easily bypassed. You see, that works on MouseDown, which means as long as I keep the mouse down as I click the OK button, I'll get the context on release, just thought you'd like to know :)<!--content-->JavaScript can be secure (e.g., <!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=24553#post128225">http://forums.webdeveloper.com/showthre ... post128225</a><!-- m -->) but it is still better to use server-side if available (primarily because it will still work without JavaScript support).<!--content-->well encryption isa grat tool, especially if you use encryption and do it server side, but then you start getting into https.<!--content-->The html file i'm creating is for a very basic user who is learning how to use a computer so they don't even know what html,javascript or any other programming languages are used for.The reason I want to know how to code it correctly is to include a serial code on a cd i am working on.The cd-rom will teach a person totally new to computers needs to know about using a computer,what to do if a problem occurs,etc.it's basically a password gate,or even better,a serial code gate.<br />
<br />
<br />
I can't belive it,i'm still @ school and i'm already learning what i've always wanted to learn.first i learned html,and now i'm learning VBScript.<!--content-->BTW PhillMc,i know my sig script is screwed,i found it on bravenet.com and just copied it,that's just a test script that i'm working on at the moment,i didn't add any text because i didn't have the time to fully finish coding it to add text.it was basically just for fun.<!--content-->I see what your saying.....I think.:confused: <br />
You're basically putting together a site, which will be run locally on CD, to those in need of Computer Literacy.<br />
<br />
I'm not understanding why you would want to put a password/serial key on such a CD. Even if you used JS/VBS for some version of encrytion, all of the pages you are attempting to protect exist locally on a CD, so nothing would stop me from getting them. Maybe I didn't get the point. If you are hard coding the password w/o encryption the easiest way is to create a form (ie <form>...<input....>...<input...>..<input...>...</form>)<br />
an on clicking of submit do a direct comarison of what was entered to the hardcoded password (ie if tb1.text.value == "password" then ok() else wrong()).<br />
ok() being what you would do if it match and wrong() likewise.<br />
<br />
But, again, I have to say that this is not a good way protect/secure your work...<br />
<br />
edit: started writing this post before prev.<br />
<br />
I didn't mean any offense by pointing out the flaw in the sig, :):)<!--content-->offence was non taken.<br />
<br />
here's the best i can put it for everyone to understand:<br />
<br />
I want to have a password that is encrypted written on to a cd along with the content i want to protect and a program to verify the correct password is entered.I want to use the same style password verification as is used on professional software so the content is encrypted until the correct password is entered.I am testing to see if i am good enough to create a password gate style thingy.<br />
<br />
The serial code gate is also part of the learning for the user.<br />
<br />
i am trying to gain as much knowledge of html as i possibly can.I am learning html at an early age so that i can grasp it easily.<!--content-->hmmm...<br />
<br />
I can think of quite a few ways to do this. Some of which are easy, and others not so. But, I do know that unless it's either a program, or one html page(unencrypted) with JS/VBS running the encryption then you might as well not bother, any other way the protection would be useless. If all of this content is going on CD, I would write up something in VB6 or VBNET to handle the encryption/decryption; that just makes more since to me, since this is going on CD. Maybe start off with a simple encryption, like something I did when I started with basic (oh, about 13 years ago) was taking the bytecode of each character and inverting it. That kept rookies out atleast...<!--content-->How about you just invest in a copy of vb.net or vb6 and make an exe.. running html and client side code... from a cd and trying to make it secure... bad idea. What if they simply open it with notepad.<!--content-->Actually, an example of how to do such encryption securely with only client-side code is also in the thread fredmv linked to above.<!--content-->I got a reply from another source.The said i need javascript verification or database verification.<br />
<br />
The link that fredmv posted,do i just copy the code into notepad and save it as 'name_of_doc.jsp (or the correct file extension if that was wrong,please post it)?<br />
<br />
or do i need a special program?<br />
<br />
on my computer i have a program called SText.it supports the formats shown in the picture below:<br />
<br />
<!-- m --><a class="postlink" href="http://photos.bravenet.com/725/167/807/90ADF2669DTN.jpg">http://photos.bravenet.com/725/167/807/90ADF2669DTN.jpg</a><!-- m --><br />
<br />
edit:damn!pic won't show.anyway it supports visual basic,html,java,javascript,and some others that probably aren't relevant.<br />
<br />
to see the picture,go to freewebs.com/yowzagames and scroll down to the bottom (don't use the menu link,it doesn't have the same pictures),click on photo album and look at the picture with the title along the lines of 'stext edit'.<!--content-->
 
Back
Top