home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / languard / languardnss7.exe / anon_ftp_upload.vbs5 < prev    next >
Encoding:
Text File  |  2003-10-09  |  1.6 KB  |  52 lines

  1. 'Ftp Anonymous Upload
  2.  
  3. Function main
  4.  
  5. Dim strRequest As String
  6. Dim  strResponse As String
  7. Dim SocketObject As Object
  8. Dim result As Boolean
  9.  
  10.     result = false
  11.     ip = getparameter("ComputerIP")
  12.     port = "21"
  13.     cr = Chr(13) +  Chr(10)
  14.     rem _ip
  15.     Socket.SetTimeout 5000,5000
  16.     Set SocketObject = Socket.OpenTCP (ip,port)
  17.     If Not SocketObject is Nothing Then 
  18.          strResponse = SocketObject.recv(1024)
  19.          If Len(strResponse) > 0 Then
  20.               If InStr(1, strResponse,"220") > 0 Then
  21.                      SocketObject.send("user anonymous" + cr)
  22.                           strResponse = SocketObject.recv(1024)
  23.                      If Len(strResponse) > 0 Then
  24.                            If InStr(1, strResponse,"331") > 0 Then
  25.                                   SocketObject.send("pass lnss@gfi.com" + cr)
  26.                                   strResponse = SocketObject.recv(1024)
  27.                                   If Len(strResponse) > 0 Then
  28.                                          If InStr(1, strResponse,"230") > 0 Then 
  29.                                             SocketObject.send("stor gfiuploadtest.txt" + cr)
  30.                                             strResponse = SocketObject.recv(1024)
  31.                                             If Len(strResponse) > 0 Then
  32.                                                    If InStr(1, strResponse,"150") > 0 Then
  33.                                                           SocketObject.send("dele gfiuploadtest.txt" + cr)
  34.                                                           Result = true
  35.                                               End If
  36.                                             End If
  37.                                          End If
  38.                                   End If
  39.                            End If
  40.                      End If
  41.               End If
  42.          End If
  43.      SocketObject.Close
  44.     End If
  45. '    If result = True Then
  46. '        echo "Anonymous Ftp Allows Upload at "+CStr(IP)+" on port: "+CStr(Port) + cr
  47. '    Else
  48. '        echo "Anonymous Ftp Does Not Allow Upload at "+CStr(IP)+" on port: "+CStr(Port) + cr
  49. '    End If
  50.     main = result
  51.  
  52. End Function