home *** CD-ROM | disk | FTP | other *** search
- 'Ftp Anonymous Upload
-
- Function main
-
- Dim strRequest As String
- Dim strResponse As String
- Dim SocketObject 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 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("stor gfiuploadtest.txt" + cr)
- strResponse = SocketObject.recv(1024)
- If Len(strResponse) > 0 Then
- If InStr(1, strResponse,"150") > 0 Then
- SocketObject.send("dele gfiuploadtest.txt" + cr)
- Result = true
- 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 "Anonymous Ftp Allows Upload at "+CStr(IP)+" on port: "+CStr(Port) + cr
- ' Else
- ' echo "Anonymous Ftp Does Not Allow Upload at "+CStr(IP)+" on port: "+CStr(Port) + cr
- ' End If
- main = result
-
- End Function