Jump to content

Password help!


master

Recommended Posts

  • 3 weeks later...

Sorry to burst your bubble but javascript does. I just dont know how to make more than 1 password thats all.This is just javascript alone using a promp to make a password.(Inputbox that validates information)

<script LANGUAGE="javascript">var getin = prompt("What is the password?","")if (getin=="peppermint"){alert('You got it! In you go...')location.href='scripttip73correct.html'}else{if (getin=="null"){location.href='nope2.,html'}elseif (getin!="peppermint"){location.href='nope.html'}} </SCRIPT>

Here is another way, Mostly javascript but with a little html.

<script LANGUAGE="JavaScript">function Getstats() {window.status=('Attempting to Login to user area.')var AccId;var iName;AccId = document.iAccInput.iAccID.valueiName = document.iAccInput.iName.valueif (AccId == "" || iName == ""){ alert('\nERROR\nYou must enter ALL Details,\nto View your statistics.\n');window.status=('Missing data or Invalid. Check spelling and Ensure Names are in Correct Case.')} else{var location=("pw" + iName + AccId + ".html");this.location.href = location;window.status=(' Verifying: ' + iName + '-' + AccId + ' Please wait........');}}</SCRIPT></HEAD><BODY BGCOLOR="#00FF00" onLoad="window.status=('You will need a password and username to proceed further...');"><P ALIGN="CENTER"><BR><FONT SIZE="5" FACE="Arial"><U><B>Login</B></U></FONT></P><HR><FORM NAME="iAccInput"><CENTER><TABLE BORDER="3"><TR><TD ALIGN="RIGHT"><FONT SIZE="3" COLOR="#FF0000" FACE="Arial"><B>User Name:</B></FONT><BR><BR><FONTSIZE="3" COLOR="#FF0000" FACE="Arial"><B>Password:</B></FONT></TD><TD><INPUT TYPE="TEXT" NAME="iName" MAXLENGTH="15"><br><INPUT NAME="iAccID" MAXLENGTH="15" HEIGHT="50"></TD><TD><INPUT TYPE="BUTTON" VALUE=" Login " onClick="Getstats()" HEIGHT="40" WIDTH="50"><BR><INPUT TYPE="RESET" VALUE=" Reset " onClick="window.status=('RESET: Please enter your USERNAME and ACCOUNT ID.')" WIDTH="50"></TD></TR></TABLE></CENTER>

Im not clear on how this javascript password think works but here it is.

<script LANGUAGE="javascript">function GoIn(){var Password = new Array("p","j","l","z","o","e","m","b","x","z")function getNumbers(){return document.userInput.u1.valuereturn document.userInput.u2.valuereturn document.userInput.u3.value}var input1 = document.userInput.u1.value var input2 = document.userInput.u2.value var input3 = document.userInput.u3.value var pw1 = Password[input1]var pw2 = Password[input2]var pw3 = Password[input3]var pw = pw1 + pw2 + pw3 if (pw == pw1+pw2+pw3){location.href = pw+ ".html"}}</SCRIPT> Put in Your Three-Number Password to Enter: <center><FORM NAME="userInput"><INPUT TYPE="text" Name ="u1" SIZE="2"><INPUT TYPE="text" Name ="u2" SIZE="2"><INPUT TYPE="text" Name ="u3" SIZE="2"><INPUT TYPE="button" VALUE="Enter" onClick="GoIn()"></FORM></CENTER>

So you want to tell me that it cant be done. Well there is 3 ways.

Link to comment
Share on other sites

irregardless of whether or not javascript can do this, it is pointless. Javascript is a client side scripting language. This means that everything that is programmed can be viewed on the client's PC.The only security a javascript password offers only goes as far as whether or not I click "View Source".But I could be missing something . . .

Link to comment
Share on other sites

No. This is too pointless. There will be always a way to determine whatever password is correct! There are textprograms that have search and replace functions, so they can find it easier.When is comes to passwords, I strongly recommend taking a shot at server side languages :)

Link to comment
Share on other sites

Actually, there is no way you can block the user from viewing the source, and the most security you can get is by putting a <script src=""> and in that, put the escaped code, making it so the user's like, "Huh!?!?!". O_o

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...