home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / languard / languardnss7.exe / samba.vbs34 < prev    next >
Encoding:
Text File  |  2004-01-15  |  1.4 KB  |  43 lines

  1. Function Main
  2.  
  3. Dim strRequest As String
  4. Dim Response As Variant
  5. Dim SocketObject As Object
  6. Dim regexp As Object
  7. Dim result As Boolean
  8. Dim setup As Variant
  9. Dim connect As Variant
  10. Dim temp As Variant
  11. Dim tx(4096)
  12.  
  13.     setup = Array(0,0,0,46,255,83,77,66,115,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,32,2,0,1,0,0,0,0)
  14.     connect = Array(0,0,0,60,255,83,77,66,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,100,0,0,0,0,0,0,0,92,92,105,112,99,36,37,110,111,98,111,100,121,0,0,0,0,0,0,0,73,80,67,36)
  15.     result = false
  16.     For a = 1 To 4096 
  17.           tx(a)=12
  18.     Next a 
  19.     temp = Array(0,0,161,0,255,83,77,66,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,100,0,0,0,0,208,7,12,0,208,7,12,0,0,0,0,0,0,0,0,0,0,0,208,7,67,0,12,0,20,8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144)
  20.     For a = 1 To 95
  21.         tx(a) = temp(a)
  22.     Next a
  23.  
  24.     ip = getparameter("ComputerIP")
  25.     port = "139"
  26.     cr = Chr(13) +  Chr(10)
  27.     Socket.SetTimeout 5000,5000
  28.     Set SocketObject = Socket.OpenTCP (ip,port)
  29.     If Not SocketObject is Nothing Then 
  30.         SocketObject.send(setup)
  31.         Response = SocketObject.recv(1024,0)
  32.         socketobject.send(connect)
  33.         Response = SocketObject.recv(1024,0)
  34.         socketobject.send(tx)
  35.         Response = SocketObject.recv(1024,0)
  36.         If (LBound(Response) = 1) And (UBound(Response) =0) Then
  37.             result = true
  38.         End If
  39.         SocketObject.Close
  40.     End If
  41.     main = result
  42.           
  43. End Function