
SPAM AND SECURITY
Are your HTTP passwords secure
PAUL DUMBLETON 04.03.2002
Rating: --- (out of 5)




|
Have you ever needed to check to make sure that your users were not using default passwords for their HTTP Password. This script agent will check all person documents in your address book for password that you enter and reset them to nothing.
Code
' ******* (Options) ********
Option Public
Option Declare
' ******* Initialize *******
Sub Initialize
'Reset HTTP Passwords:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim tdoc As NotesDocument
Dim nextdoc As NotesDocument
Dim pw As String, epw As String, epwv As Variant
Dim count As Long
Set db = session.CurrentDatabase
Set view = db.GetView("People")
Call view.Refresh
pw = Inputbox("Password to reset", "Reset HTTP Password", "")
If pw = "" Then
Exit Sub
End If
If Messagebox("This will reset all HTTP Passwords using '" + pw + "', OK to proceed?", 49, "Confirm Reset") <> 1 Then
Exit Sub
End If
Set tdoc = db.CreateDocument
tdoc.PW = Lcase(pw)
epwv = Evaluate("@Password(PW)", tdoc)
epw = epwv(0)
Open "c:pwresetlog.txt" For Append As 1
Print #1,
Print #1, "HTTP Password reset - " + Format(Now())
Print #1, "Reseting all users with password '" + pw + "'"
Print #1,
count = 0
Set doc = view.GetFirstDocument
While Not doc Is Nothing
Set nextdoc = view.GetNextDocument(doc)
If doc.HTTPPassword(0) = epw Then
count = count + 1
Print Format(count) + ": " + doc.FullName(0)
Print #1, doc.FullName(0)
doc.HTTPPassword = ""
Call doc.Save(True, True)
End If
Set doc = nextdoc
Wend
Close
Messagebox("Log information appended to c:pwresetlog.txt")
End Sub
 |

|
|
 |
|
 |