Current location: Hot Scripts Forums » Programming Languages » Everything Java » Login Script


Login Script

Reply
  #1 (permalink)  
Old 12-25-03, 03:03 PM
BoneChrif BoneChrif is offline
Newbie Coder
 
Join Date: Dec 2003
Location: GamingEmbassy.vze.com
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Login Script

I have got a nice login script:

<SCRIPT LANGUAGE="JavaScript">


function LogIn(){
loggedin=false;
username="Enter Username";
password="Enter Password";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="username" && password=="password") {
loggedin=true;
window.location="http://Yourserver.com/private_stuff.html";
}

}
if (loggedin==false) {
alert("Invalid login!");
}
}

</SCRIPT>
Reply With Quote
  #2 (permalink)  
Old 12-25-03, 06:41 PM
gwx gwx is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
The problem with these Javascript validation methods are that the user can simply point to View--> Page source or press Ctrl-U to easily view the source and determine the expected password. For that reason, using PHP/MySQL or just about any database-cum-scripting language combo would do ( if you know them ). Else, you can safely settle for Flash. ( from Macromedia.com )
Reply With Quote
  #3 (permalink)  
Old 12-25-03, 09:41 PM
BoneChrif BoneChrif is offline
Newbie Coder
 
Join Date: Dec 2003
Location: GamingEmbassy.vze.com
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
aaaa
But dont forget this combo;

JavaScript Login with No Right click /View Source

view source script:
<script language=JavaScript>

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!docum ent.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")

</script>
Reply With Quote
  #4 (permalink)  
Old 12-28-03, 09:53 AM
gwx gwx is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
It is naive to think users would right click and click view page source. The very easy workaround is to select View -> Page Source from the Netscape Menu or from Internet Explorer, select View -> Source. Internet Explorer and Netscape/Mozilla does NOT let you disable javascript. Opera, however, lets you do so. Why not try making a live JS authetnication page. Lets see how long I would take to get in..
Reply With Quote
  #5 (permalink)  
Old 12-31-03, 12:36 AM
2uantuM 2uantuM is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
You could md5 hash the desired password, and then md5 the password entered and compare the 2. It would definately be more practical to use JSP/PHP/Perl/ASP etc instead of Javascript.
Reply With Quote
  #6 (permalink)  
Old 01-27-04, 04:29 PM
GG Dart's Avatar
GG Dart GG Dart is offline
Newbie Coder
 
Join Date: Jan 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
please us php and mysql, everything else is noware as save, and if you would use mysql and php you'Ve got all that with the session_id and you could log all the aktion of your users and so on
__________________
GG
Taitei Saru
大 帝 猿
Reply With Quote
  #7 (permalink)  
Old 01-27-04, 05:43 PM
stdunbar stdunbar is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Superior, CO, USA
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by 2uantuM
It would definately be more practical to use JSP/PHP/Perl/ASP etc instead of Javascript.

Yes - the lesson is never trust the client. The client (in this case the browser) is out of your control. How many game clients have been hacked to cheat on a multi-player system? Never ever ever trust what you are getting from the front end. Always verify it on the back end.

Plus, Javascript != Java - this thread is in the wrong place.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any integrity of script rankings? webmaster@atmanager.com Hot Scripts Forum Questions, Suggestions and Feedback 17 08-06-04 12:12 AM
login script required lochie Script Requests 2 03-06-04 07:44 PM
Need a login script that works with paypal. dgames Script Requests 3 12-04-03 07:58 AM
a login script Mud Script Requests 2 11-24-03 04:24 AM
help me improve my login script please paulj000 PHP 8 08-15-03 05:37 PM


All times are GMT -5. The time now is 05:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.