home *** CD-ROM | disk | FTP | other *** search
- Dim cr As String
- cr = Chr(13) + Chr(10)
-
- Function LNSSPath
- Dim RegObject As Object
- Dim Path As String
- Set RegObject = Registry.Connect("127.0.0.1")
- Path = RegObject.Read("SOFTWARE\GFI\LNSS7", "Path")
- LNSSPath = Path
- End Function
-
- Function RegExpTest(Pattern, Text)
- Dim RegExp As Object
- Set RegExp = CreateObject("Vbscript.RegExp")
- RegExp.Pattern = pattern
- RegExp.IgnoreCase = True
- RegExpTest = RegExp.Test(Text)
- End Function
-
- Function getbanner(ip,port,request)
- Dim SockObject As Object
- Set SockObject = Socket.Opentcp(Ip,Port)
- If Not SockObject is Nothing Then
- If Not (IsEmpty(request)) Then
- request = request
- SockObject.send request
- End If
- strResponse = SockObject.recv(1024)
- SockObject.close
- End If
- getbanner = strResponse
-
- End Function
-
- Function GetEnviron(Path)
- Dim Wsh As Object
- Dim objEnv As Object
- Set Wsh = CreateObject("WScript.Shell")
- Set objEnv = Wsh.Environment("Process")
- GetEnviron = objEnv(Path)
- End Function
-
- Function Fileexists(filename)
- Dim FileObject As Object
- Dim result As Boolean
- result = false
- Set FileObject = File.Connect("127.0.0.1")
- If FileObject.open(filename, GENERIC_READ, OPEN_EXISTING) Then
- FileObject.Close
- result = true
- End If
- Fileexists = result
- End Function
-
- Function Remote_Fileexists(ip,filename)
- Dim FileObject As Object
- Dim result As Boolean
- result = false
- Set FileObject = File.Connect(ip)
- If FileObject.open(filename, GENERIC_READ, OPEN_EXISTING) Then
- FileObject.Close
- result = true
- End If
- remote_Fileexists = result
- End Function
-
-