home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / virus_1a / virus_te.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-18  |  3.8 KB  |  123 lines

  1. VERSION 5.00
  2. Begin VB.Form VIRUS_TEST 
  3.    Caption         =   "Anti-Virus Test Program"
  4.    ClientHeight    =   6300
  5.    ClientLeft      =   4455
  6.    ClientTop       =   2790
  7.    ClientWidth     =   6585
  8.    Icon            =   "VIRUS_TEST.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6300
  11.    ScaleWidth      =   6585
  12.    Begin VB.CommandButton Command2 
  13.       Caption         =   "Repair-Check"
  14.       Height          =   615
  15.       Left            =   1320
  16.       TabIndex        =   5
  17.       Top             =   4320
  18.       Width           =   4095
  19.    End
  20.    Begin VB.TextBox Text1 
  21.       Height          =   375
  22.       Left            =   1320
  23.       TabIndex        =   1
  24.       Text            =   " "
  25.       Top             =   3720
  26.       Width           =   4095
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "Press to create and trigger the Virus Test String"
  30.       Height          =   615
  31.       Left            =   1320
  32.       TabIndex        =   0
  33.       Top             =   2880
  34.       Width           =   4095
  35.    End
  36.    Begin VB.Label Label5 
  37.       Caption         =   "By Max L. Seim   mlseim@mmm.com    Oct. 1999"
  38.       Height          =   255
  39.       Left            =   1680
  40.       TabIndex        =   7
  41.       Top             =   6000
  42.       Width           =   3735
  43.    End
  44.    Begin VB.Label Label4 
  45.       Caption         =   "View your Anti-Virus Fault Log to see exactly how your software responded to the virus it encountered."
  46.       Height          =   375
  47.       Left            =   1440
  48.       TabIndex        =   6
  49.       Top             =   5280
  50.       Width           =   3975
  51.    End
  52.    Begin VB.Label Label3 
  53.       Caption         =   $"VIRUS_TEST.frx":030A
  54.       Height          =   735
  55.       Left            =   360
  56.       TabIndex        =   4
  57.       Top             =   2040
  58.       Width           =   5895
  59.    End
  60.    Begin VB.Label Label2 
  61.       Caption         =   $"VIRUS_TEST.frx":0403
  62.       Height          =   975
  63.       Left            =   360
  64.       TabIndex        =   3
  65.       Top             =   960
  66.       Width           =   5895
  67.    End
  68.    Begin VB.Label Label1 
  69.       Caption         =   $"VIRUS_TEST.frx":051D
  70.       Height          =   735
  71.       Left            =   360
  72.       TabIndex        =   2
  73.       Top             =   120
  74.       Width           =   5775
  75.    End
  76. Attribute VB_Name = "VIRUS_TEST"
  77. Attribute VB_GlobalNameSpace = False
  78. Attribute VB_Creatable = False
  79. Attribute VB_PredeclaredId = True
  80. Attribute VB_Exposed = False
  81. '  Anti-Virus Test Program
  82. '  By:  Max L. Seim    mlseim@mmm.com
  83. '  For more information on the test string,
  84. '  goto:  www.eicar.com/ducklin-html.htm
  85. '  I give credit to above site for use of the test string.  Thank You!
  86. Dim OP As Integer
  87. Dim TSTR As String
  88. Dim VRSTR As String
  89. Private Sub Command1_Click()
  90. ' Create the text file and write the virus string
  91. Open "C:\VIRUSTEST.TXT" For Output As 1
  92. Print #1, VRSTR
  93. Text1 = "Virus Sring has been created"
  94. Close 1
  95. OP = 1
  96. End Sub
  97. Private Sub Command2_Click()
  98. '  Check to see if it was removed successfully ...
  99. If OP = 1 Then
  100. Open "C:\VIRUSTEST.TXT" For Input As 1
  101.    Do While Not EOF(1)
  102.    Input #1, TSTR
  103.    Loop
  104.    Close 1
  105.       If TSTR = "" Then
  106.       Text1 = "Virus detected and removed successfully!"
  107.       Else
  108.       Text1 = "Virus not removed!  Check your Anti-Virus Software!"
  109.       End If
  110.       Kill "C:\VIRUSTEST.TXT"
  111. Text1 = "You must create the Virus String first!"
  112. End If
  113. OP = 0
  114. End Sub
  115. Private Sub Form_Load()
  116. '  This is the virus string ... created by connecting two different
  117. '  strings so that the anti-virus software won't recognize it until
  118. '  the entire complete string is written into the text file.
  119. VRSTR = "X5O!P%@AP[4\PZX54(P^)7CC)7}"
  120. VRSTR = VRSTR + "$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
  121. OP = 0
  122. End Sub
  123.