Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Password Protect Your Page, Its a very simple script, do not use it for any thing serious!
ganeshn11
post Apr 9 2006, 04:09 AM
Post #1


Advanced Member
Group Icon

Group: Banned
Posts: 149
Joined: 2-December 05
From: Bangalore, India.
Member No.: 9,923



Guys, if you like it you can use it, but one thing I would like to tell is that its not entierly safe to use such a thing, it depends on your content that you are trying to protect from usual visitors, beginners this is for you. The best part is that you do not need any kind of scripts installed on your server, it is in JavaScript which is embeded in to your HTML page. Just change the username from "asta" to your choice and password from "host" to your preference.
Here is the code...

CODE

<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="asta") {
if (form.pass.value=="host") {              
location="page2.html"
} else {
alert("Invalid Password")
}
} else {  alert("Invalid UserID")
}
}
//-->
</script>

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form
name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input
name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>


Your username and password can be viewed from the source code of your page, just to make it more secure, encrypt.

And now, if you are thinking "How am I going to encrypt a page?", visit this page (http://www.cyberiapc.com/aascripter/samples/Security/sub9.htm), over here you just have to paste your java script code and it will encrypt it for you.

On this page you can even give it an encrypted code and it will decrypt it for you (bring it back to its original state). Thus the above script must not be used for anything serious.

If you plan to go and hide something more serious try, Bravenet.com service which is much, much secure, its just like loging into your email ID (yahoo or hotmail).
Go to the top of the page
 
+Quote Post
Quatrux
post Apr 9 2006, 04:50 AM
Post #2


the Q
Group Icon

Group: [HOSTED]
Posts: 1,051
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059



I don't really see any point of using a javascript password protect biggrin.gif anyone, even unexperienced can brake it and "login" or see the content, the only place I might of think is to integrate it with xml and send a http request, yes to use AJAX. wink.gif
Go to the top of the page
 
+Quote Post
ganeshn11
post Apr 9 2006, 08:53 AM
Post #3


Advanced Member
Group Icon

Group: Banned
Posts: 149
Joined: 2-December 05
From: Bangalore, India.
Member No.: 9,923



QUOTE(Quatrux @ Apr 9 2006, 05:50 AM) *

I don't really see any point of using a javascript password protect biggrin.gif anyone, even unexperienced can brake it and "login" or see the content, the only place I might of think is to integrate it with xml and send a http request, yes to use AJAX. wink.gif


The point is that now-a-days free hosts don't give all kinds of scripting capabilities, I know that AstaHost give unlike others. I already told you that using the encryption method will be better, because it makes it difficult, and one more thing I mentioned was that, it should not be used for anything serious. You could use it to protect some page in your hooby site or something like that, not anything tooooooo private or serious.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Need Drop Down Menu Script(1)
  2. Slideshow Of Pictures(0)
  3. Need Opinion - Language Redirection Script...(0)
  4. Let's Make Rainbow Link(1)
  5. Bid Visitors Bye/thank U With A Popup Onunload In Just One Line!(0)
  6. Sweet Titles(0)
  7. Browser Quaker Script - Shock Your Visitors!(5)
  8. Calling Of Functions Between Mulitple External Javascript Files(2)
  9. Javascript: Browser Detection Script(0)
  10. Create And Import JavaScript Modules For A Large Script(2)
  11. JavaScript Off Redirect Script(2)
  12. Enlarge Image Script(19)
  13. One Click To Copy Script(0)
  14. Love Script(3)


 



- Lo-Fi Version Time is now: 11th October 2008 - 05:11 AM