09-05-2008, 02:49 PM
Pages: 1 2
09-05-2008, 04:26 PM
Meh, i dont feel like re-editing my post so ima just double post for simplicity.
Heres the code i manage to pull off...
If you try this out you will notice the next question im bout to ask...
How can i make the password field dsiplay all "***********"... I know its called a password field but i dont see where i can put it at in the code... also, the question from my first post needs answered also.
Heres the code i manage to pull off...
Code:
<SCRIPT>
var getin = prompt("Enter The Appropriate Password.","")
if (getin=="PassWord")
{
alert('Access Granted')
location.href='scripttip73correct.html'
}
else
{
if (getin=="null")
{location.href='nope2.,html'}
else
if (getin!="PassWord")
{location.href='nope.html'}
}
</SCRIPT>If you try this out you will notice the next question im bout to ask...
How can i make the password field dsiplay all "***********"... I know its called a password field but i dont see where i can put it at in the code... also, the question from my first post needs answered also.
09-18-2008, 12:22 PM
Try this and see if it helps. http://tools.dynamicdrive.com/password/
09-18-2008, 12:24 PM
That code will be easy to get past, they just look in the source.
09-18-2008, 12:32 PM
yep you should use php or somthing man... because javascript can be viewed in the source code allowing hackers to so the structure of your login which is not even safe you might as well not even put a password protect code.
php is safer because it is run on the server causing it not to be shown on the source code.
javascript is supposed to be client side type programming same with html well html is a markup lango but it's client sided stuff which can be viewed by the source code by the client which means don't use these for password or any information that needs security because the client has the ability to read these code and if a hacker can see that they can do some damage.
I think the app title in the top of the browser might be in: scripttip73correct.html that file.
I bealive it has to be html look at the html files and find the tag <title> that is where this could be coming from.
php is safer because it is run on the server causing it not to be shown on the source code.
javascript is supposed to be client side type programming same with html well html is a markup lango but it's client sided stuff which can be viewed by the source code by the client which means don't use these for password or any information that needs security because the client has the ability to read these code and if a hacker can see that they can do some damage.
I think the app title in the top of the browser might be in: scripttip73correct.html that file.
I bealive it has to be html look at the html files and find the tag <title> that is where this could be coming from.
09-18-2008, 12:49 PM
since I am feeling generous I will make you a script that will mask the password with *** ect ect.
give me some rep on this lol...
save it as a html file.
I hope it's easy enough that you can edit the code to your liking.
However I don't encourage using javascript for a login type.
also passwordtest is the password that is set so when a person puts the password passwordtest they should be logged in this you can change to whatever you want the password to be.
you can take out <p>ENTER USER NAME :
<input type="text" name="text2"> if you don't want a username to be inputted.
and in the jvalidate take off text2.value this is what javascript checks for that username input so if you don't want a user input then take those ones out and you should just have a password input. Oh also take out usertest that is the user that you create than needs to be inputted.
Now this is not secure one bit meaning all it takes for someone to get around this is to look at the source code find that password that you set and type it in.
I suggest using php rather then javascript since javascript is meant for client sided stuff like making advance effects on the webpages it was not really meant for security or dealing with data that needs security.
hope this helps and a rep won't hurt. lol
edit: I found it might be confusing the code I forgot to tell you that the function validate(text1,text2,text3,text4) has 4 var you might be like omg what is that where did text 3 and 4 come from don't worry . in here the text1 and text2 is the user name text 1 is what the user input and the text2 is what you set as a user name that you accept.
text3 is the user input and text4 is the password you set so if you don't use the username you need to take text1 and text2 out and just leave text3 and 4 that should do it.
hope this helps.
Code:
<form>
<p>ENTER USER NAME :
<input type="text" name="text2">
</p>
<p> ENTER PASSWORD :
<input type="password" name="text1">
<input type="button" value="Login" name="Submit" onclick=javascript:validate(text2.value,"usertest",text1.value,"passwordtest") >
</p>
</form>
<script language = "javascript">
function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('success.htm');
else
{
load('failure.htm');
}
}
function load(url)
{
location.href=url;
}
</script>give me some rep on this lol...
save it as a html file.
I hope it's easy enough that you can edit the code to your liking.
However I don't encourage using javascript for a login type.
also passwordtest is the password that is set so when a person puts the password passwordtest they should be logged in this you can change to whatever you want the password to be.
you can take out <p>ENTER USER NAME :
<input type="text" name="text2"> if you don't want a username to be inputted.
and in the jvalidate take off text2.value this is what javascript checks for that username input so if you don't want a user input then take those ones out and you should just have a password input. Oh also take out usertest that is the user that you create than needs to be inputted.
Now this is not secure one bit meaning all it takes for someone to get around this is to look at the source code find that password that you set and type it in.
I suggest using php rather then javascript since javascript is meant for client sided stuff like making advance effects on the webpages it was not really meant for security or dealing with data that needs security.
hope this helps and a rep won't hurt. lol
edit: I found it might be confusing the code I forgot to tell you that the function validate(text1,text2,text3,text4) has 4 var you might be like omg what is that where did text 3 and 4 come from don't worry . in here the text1 and text2 is the user name text 1 is what the user input and the text2 is what you set as a user name that you accept.
text3 is the user input and text4 is the password you set so if you don't use the username you need to take text1 and text2 out and just leave text3 and 4 that should do it.
hope this helps.
09-18-2008, 01:12 PM
Javascript souldn't be used for websites. Use PHP or something.
09-18-2008, 01:12 PM
When I say that i mean to make the pages.
09-18-2008, 01:27 PM
yes Pyrot3chnics me and many others have posted here to use php which would be more secure like using php files .
since javascript was not built for security it was mainly to give advance effects on the page for clients.
EDIT:no prob Pyrot3chnics.
since javascript was not built for security it was mainly to give advance effects on the page for clients.
EDIT:no prob Pyrot3chnics.
09-18-2008, 01:29 PM
oh, sorry. Didn't mean to spam
Pages: 1 2