home *** CD-ROM | disk | FTP | other *** search
- 'Anonymous Ftp Guest Account
-
- Function Main
-
- Dim strRequest As String
- Dim strResponse As String
- Dim SocketObject As Object
- Dim regexp As Object
- Dim result As Boolean
-
-
- result = false
- ip = getparameter("ComputerIP")
- port = "21"
- cr = Chr(13) + Chr(10)
- rem _ip
- Socket.SetTimeout 5000,5000
- Set regexp = CreateObject("Vbscript.regexp")
- Set SocketObject = Socket.OpenTCP (ip,port)
- If Not SocketObject is Nothing Then
- strResponse = SocketObject.recv(1024)
- If Len(strResponse) > 0 Then
- If InStr(1, strResponse,"220") > 0 Then
- SocketObject.send("user anonymous" + cr)
- strResponse = SocketObject.recv(1024)
- If Len(strResponse) > 0 Then
- If InStr(1, strResponse,"331") > 0 Then
- SocketObject.send("pass lnss@gfi.com" + cr)
- strResponse = SocketObject.recv(1024)
- If Len(strResponse) > 0 Then
- If InStr(1, strResponse,"230") > 0 Then
- SocketObject.send("xpwd" + cr)
- strResponse = SocketObject.recv(1024)
- If Len(strResponse) > 0 Then
- If InStr(1, strResponse,"257") > 0 Then
- regexp.pattern = "[A-Za-z]:(\\[A-Za-z0-9_.-])*"
- If regexp.test(strResponse) Then
- result = 1
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- SocketObject.Close
- End If
- ' If result = True Then
- ' echo "Ftp at "+CStr(IP)+" on port: "+CStr(Port)+" Exposes Full Paths" + cr
- ' Else
- ' echo "Ftp at "+CStr(IP)+" on port: "+CStr(Port) +" Does not expose Full Paths"+ cr
- ' End If
- main = result
-
- End Function