home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / languard / languardnss7.exe / sasser.vbs35 < prev    next >
Encoding:
Text File  |  2004-05-03  |  1.5 KB  |  34 lines

  1. Function Main
  2. Dim strRequest
  3. Dim strResponse As String
  4. Dim SocketObject As Object
  5. Dim result As Boolean
  6. Dim strPattern1 As String
  7. Dim strPattern2 As String
  8.             strPattern1 = "220 OK" + Chr(10)
  9.             strPattern2 = "226 OK" + Chr(10)
  10.             result = false
  11.             ip = getparameter("ComputerIP")
  12.             port = "5554"
  13.             strRequest = "GFITEST"
  14.             Socket.SetTimeout 5000,5000
  15.             Set SocketObject = Socket.OpenTCP (ip,port)
  16.             If Not SocketObject is Nothing Then 
  17.                         strResponse = SocketObject.recv(Len(strPattern1)+1,2)
  18.                         If Len(strResponse) > 0 Then
  19.                                     If InStr(1,strResponse,strPattern1) > 0 Then
  20.                                                 SocketObject.Send(strRequest)
  21.                                                 strResponse = SocketObject.recv(Len(strPattern2)+1,2)
  22.                                                 If Len(strResponse) > 0 Then
  23.                                                             If InStr(1,strResponse,strPattern2) > 0 Then
  24.                                                                         result = true
  25.                                                             End If
  26.                                                 End If                            
  27.                                     End If
  28.                         End If
  29.                         SocketObject.Close
  30.             End If
  31.             Main = result
  32. End Function
  33.  
  34.