Pagina 1 di 1

autoit problema pass login ftp

MessaggioInviato: mar set 22, 2009 1:31 pm
da f1192
Salve vi prego sono disperato [XX(] Ho fatto un programma che si collega a un server ftp per scaricarsi la pass e il nick per poi confrontarle con il nick e la pass inserite dall' utente .
Ora il problema è che : il programma riesce a rilevare l' email pero non riesce a rilevare la pass in quanto mi da sempre errore pur inserendo la pass corretta ...
Vi prego aiutatemi siete la mia ultima speranza >.< [cry]
Codice: Seleziona tutto
   $wii="/"&$user&"/"&$pass&".txt"
      $lala="/lollo.txt"
      $RICERCAFILEPASS = _FtpGetFile($bello,$wii,$lala,2,-1)
      if $RICERCAFILEPASS= 1 Then
         filedelete("lollo.txt")
            msgbox(0,"log in riuscito","SEI ENTRATO ")
            
      EndIf
       if ($RICERCAFILEPASS = 0) Then
         $error=Guictrlcreatelabel("errore critico: la pass  non e corretta  ",20,@DesktopHeight-300)
         Sleep(3000);
         _ftpclose($bello)
         exit; da sostituire alla fine con il rimandamendo alla schermata di login ..
      EndIf
      
      

E oltre a questo vi posto anche la procedura _FtpGetFile
Codice: Seleziona tutto
;===============================================================================
;
; Function Name:    _FTPGetFile() - db Test
; Description:      Gets an file from an FTP server.
; Parameter(s):     $l_FTPSession    - The Long from _FTPConnect()
;                   $s_RemoteFile      - The remote Location for the file.
;                   $s_LocalFile     - The local file.
;                   $l_Flags        - use the dwFlags parameter to specify
;                                   -    1 for transferring the file in ASCII (Type A transfer method) or
;                                   -    2 for transferring the file in Binary (Type I transfer method).
;                   $l_Fail         - Allow local file to be overwritten if it exists
;                                   -   -1 Don't allow overwrite (default)
;                                   -    0 Allow overwrite
;                   $l_Attributes   - Attributes for local file
;                   $l_Context      - lContext is used to identify the application context when using callbacks. Since we’re not using callbacks we’ll pass 0.
; Requirement(s):   DllCall, wininet.dll
; Return Value(s):  On Success - 1
;                   On Failure - 0
; Author(s):        Dick Bronsdijk
;
;===============================================================================



Func _FTPGetFile($l_FTPSession, $s_RemoteFile, $s_LocalFile, $l_Flags = 2, $l_Fail = 0, $l_Attributes = 0x00000080, $l_Context = 0,$Hd=0)

   Local $ai_FTPGetFile = DllCall('wininet.dll', 'int', 'FtpGetFile', 'long', $l_FTPSession, 'str', $s_RemoteFile, 'str', $s_LocalFile, 'long', $l_Fail, 'long', $l_Attributes, 'long', $l_Flags, 'long', $l_Context)
   If @error OR $ai_FTPGetFile[0] = 0 Then
      SetError(-1)
      Return 0
   EndIf

   Return $ai_FTPGetFile[0]

EndFunc;==> _FTPGetFile()


Siccome ho a disposizione un solo account ftp gli user sono tutti li dentro .
Praticamente lui dovrebbe controllare se la cartella dello user esiste se no da errore e dice che lo user non esiste poi se esiste allora accede alla cartella dello user e scarica il file con il nome della pass se riesce a scaricarlo allora il login e effettuato se no da errore .