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

  1. Function Main
  2.  
  3. 'Anonymous Ftp Guest Account
  4. Dim  strRequest As String
  5. Dim  strResponse As String
  6. Dim SocketObject As Object
  7. Dim result As Boolean
  8.  
  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.                                             result = True
  30.                                          End If
  31.                                   End If
  32.                            End If
  33.                              End If
  34.                   End If
  35.          End If
  36.      SocketObject.Close
  37.     End If
  38. '    If result = True Then
  39. '        echo "Anonymous Ftp Detected at "+CStr(IP)+" on port: "+CStr(Port) + cr
  40. '    Else
  41. '        echo "Anonymous Ftp Not Detected at "+CStr(IP)+" on port: "+CStr(Port) + cr
  42. '    End If
  43.     main = result
  44.  
  45.  
  46. End Function