A Password Program that changes the Password on a Daily Basis



I was commissioned by Zircon Software in Peabody Massachusetts to write a Password program that changed daily. I developed this system, that not only protects someone from seeing what the passwords are by having everything allocation. The resultsdemo.asp page is posted from the login2demo.asp page.

The administrator can look up the password daily on the algordemo.asp page (short for algorithm not Al Gore).  The ASP for this program which is beneath is painfully simple.  And once the daily passwords are arrived at, simply copy the code from your resultsdemo.asp page to your algordemo.asp page.

If your password works, you will be redirected to www.juliagreen.com.  Session variables can be easily used to protect your protected page from being accessed directly by a browser.  The beauty of this program is that hourly passwords can be assigned, weekly, yearly, the list goes on, and instead of each day being administered as in this program, a range of hours or days or weeks can be used.  You can even change your username on a daily basis.

To access the Lookup your Daily Password page, click here



To try out the Login Page, click here.

The code is beneath here:

Login2demo.asp

<html>

<head>

<title>Login Page</title>

</head>

<body bgcolor="#9999FF">

&nbsp;

<p><font color="#FFFFFF" size="5">

To access www.juliagreen.com, you must enter the correct password.<br>

The username is juliag.<br>

If you do not know the password, please call Julia Green at 617-926-3413 or</font>

</p>

<p><font color="#FFFFFF" size="5">email her at <a style="color: #800080; font-weight: bold" href="mailto:juliag@shore.net">juliag@shore.net</a>.</font>

</p>

<p>&nbsp;</p>

<p align="center">&nbsp;&nbsp;

</p>

<form action="resultsdemo.asp" method="post">

<p align="center">

<b><font size="4">

UserName:<br>

</font></b><br><br>

<input type="text" name="UserName" value="juliag"><br>

<b><br><font size="4">

Password:<br>

</font></b>

<br><br>

<input type="text" name="passwd" value="<%=varPasswd%>"><br><br>

<input type="submit" value="Submit Password"><input type="reset" value="Reset">

</form>

</body>

</html>



ResultsDemo.asp

<%

Dim dDay

Dim varPasswd

Dim varName, varPasswd2

varPasswd=Request("passwd")

varName=Request("UserName")



dMonth=Month(Now)

dDay=Day(Now)

dYear=Year(Now)



If dDay=1 then

varPasswd2="zebra"

End If

If dDay=2 then

varPasswd2="fox"

End If

If dDay=3 then

varPasswd2="wolf"

End If



If dDay=4 then

varPasswd2="bird"

End If

If dDay=5 then

varPasswd2="eagle"

End If

If dDay=6 then

varPasswd2="vulture"

End If

If dDay=7 then

varPasswd2="sparrow"

End If

If dDay=8 then

varPasswd2="robin"

End If

If dDay=9 then

varPasswd2="bobfinch"

End If

If dDay=10 then

varPasswd2="dog"

End If



If dDay=11 then

varPasswd2="cat"

End If

If dDay=12 then

varPasswd2="whale"

End If

If dDay=13 then

varPasswd2="fish"

End If

If dDay=14 then

varPasswd2="guppie"

End If

If dDay=15 then

varPasswd2="goldfish"

End If

If dDay=16 then

varPasswd2="puppy"

End If

If dDay=17 then

varPasswd2="kitten"

End If



If dDay=18 then

varPasswd2="shark"

End If

If dDay=19 then

varPasswd2="jellyfish"

End If

If dDay=20 then

varPasswd2="bear"

End If

If dDay=21 then

varPasswd2="bearcub"

End If

If dDay=22 then

varPasswd2="deer"

End If

If dDay=23 then

varPasswd2="doe"

End If

If dDay=24 then

varPasswd2="shellfish"

End If

If dDay=25 then

varPasswd2="clamshell"

End If



If dDay=26 then

varPasswd2="lobster"

End If

If dDay=27 then

varPasswd2="crawlfish"

End If

If dDay=28 then

varPasswd2="bullfinch"

End If

If dDay=29 then

varPasswd2="baldeagle"

End If

If dDay=30 then

varPasswd2="flying"

End If

If dDay=31 then

varPasswd2="pearl"

End If

If varName="juliag" then

If varPasswd=varPasswd2 then

Response.Redirect("http://www.juliagreen.com/")

End If

End If

Response.Redirect("redirectdemo.asp")

%>



Redirectdemo.asp

<html>

<head>

<title>Incorrect Password Page</title>

<body bgcolor="#CC99FF">

&nbsp;

<p>&nbsp;</p>

<p>

<b><font face="Times New Roman" size="5">

You have entered the incorrect password.</font></b>

</p>

<p><b><font face="Times New Roman" size="5">Please call your Julia Computer

Consulting administrator at 617-926-3413 to see if she can provide the right one,</font></b></p>

<p><b><font face="Times New Roman" size="5">or email Julia Computer Consulting for the password

with appropriate identification and phone number at <a href="mailto:juliag@shore.net">juliag@shore.net</a>.</font></b></p>

<p>&nbsp;</p>

</body>

</html>



The LookUp Page-Algordemo.asp

<%

Dim dMonth

Dim dDay

Dim dYear

dMonth=Month(Now)

dDay=Day(Now)

dYear=Year(Now)

If dDay=1 then

varPasswd2="zebra"

End If

If dDay=2 then

varPasswd2="fox"

End If

If dDay=3 then

varPasswd2="wolf"

End If



If dDay=4 then

varPasswd2="bird"

End If

If dDay=5 then

varPasswd2="eagle"

End If

If dDay=6 then

varPasswd2="vulture"

End If

If dDay=7 then

varPasswd2="sparrow"

End If

If dDay=8 then

varPasswd2="robin"

End If

If dDay=9 then

varPasswd2="bobfinch"

End If

If dDay=10 then

varPasswd2="dog"

End If



If dDay=11 then

varPasswd2="cat"

End If

If dDay=12 then

varPasswd2="whale"

End If

If dDay=13 then

varPasswd2="fish"

End If

If dDay=14 then

varPasswd2="guppie"

End If

If dDay=15 then

varPasswd2="goldfish"

End If

If dDay=16 then

varPasswd2="puppy"

End If

If dDay=17 then

varPasswd2="kitten"

End If



If dDay=18 then

varPasswd2="shark"

End If

If dDay=19 then

varPasswd2="jellyfish"

End If

If dDay=20 then

varPasswd2="bear"

End If

If dDay=21 then

varPasswd2="bearcub"

End If

If dDay=22 then

varPasswd2="deer"

End If

If dDay=23 then

varPasswd2="doe"

End If

If dDay=24 then

varPasswd2="shellfish"

End If

If dDay=25 then

varPasswd2="clamshell"

End If



If dDay=26 then

varPasswd2="lobster"

End If

If dDay=27 then

varPasswd2="crawlfish"

End If

If dDay=28 then

varPasswd2="bullfinch"

End If

If dDay=29 then

varPasswd2="baldeagle"

End If

If dDay=30 then

varPasswd2="flying"

End If

If dDay=31 then

varPasswd2="pearl"

End If

Response.Write "<font size=+2>" & Now & "<br>"

Response.Write "<font size=+2>" & "Your password for the day is" & "<br>"

Response.Write "<font size=+2>" & varPasswd2



%>