Tip

Emergency antivirus

I developed this code at the time of the Love Bug virus. When code was ready, it took us a few minutes to completely block our mail system from any modifications of this virus (any files with the VBS extension. The current version of the code checks multiple attachments for partial file name matches and prevents users from opening or previewing possibly infected mail. The code is placed in the Queryopen of the Memo form in the mail file template. After each update, we issuing replace design command through the server console to pass it to a mail file. The process is very fast, and you can block any files in the matter of minutes.

Editor's note: Our experts offered this warning on the following tip: "Changing the Memo form for all mail files across a large organization (which this tip requires you to do) is generally a bad idea. Lotus owns the design of the mail files, and usually we recommend against modifying them."


 Dim FileNameString(7) As String FileNameString(0)= ".VBS" FileNameString(1)= ".PIF" FileNameString(2)= "babypic.exe" FileNameString(3)= "NakedWife.exe" FileNameString(4)= "SYSKEY.EXE" FileNameString(5)= ".BAT" FileNameString(7)= ".COM" If source.isnewdoc Then Exit Sub Dim doc As notesdocument Dim item As notesitem Dim subj As Variant Set doc=source.document subj= doc.getitemvalue( "$File" ) If subj(0)="" Then Exit Sub Forall z In doc.items If Ucase(z.name)="$FILE" Then Forall q In FileNameString If Instr(1, Ucase(z.values(0)) , Ucase( q ) ) <> 0 Then continue=False Exit Sub End If End Forall End If End Forall

This was first published in September 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.