Jump to content



Photo

_FTPxxx UDF


  • Please log in to reply
7 replies to this topic

#1 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 07 April 2005 - 08:16 PM

improved _FTPput
added _FTPdel and _FTPadv

i tested em under a few curcumstances but ofcourse not all

so if you find a bug or a peice of code that can be improved tell me ...

Plain Text         
;=================================================================================================== ; ;                                                                                               ; ; Function Name:    _FTPput()                                                                   ; ;                                                                                               ; ; Description:    Uploads a file to an ftp server.                                          ; ;                                                                                               ; ; Parameter(s):  $s_p_Host      -   IP or URL to the host.                                  ; ;                                       (ex. '24.158.58.154')                                   ; ;                   $s_p_PathFile   -   The path and filename.                                  ; ;                                       (ex. 'C:\windows\notepad.exe')                          ; ;                   $s_p_Acc        -   Account to log into.                                    ; ;                                       (ex. 'Sander')                                          ; ;                   $s_p_Pwd        -   Password for the account.                               ; ;                                       (ex. 'Monkey')                                          ; ;                   $s_p_Cd         -   Path where the file should go to on the server.         ; ;                                       (ex. 'uploads\scripts')                                 ; ;                   $i_p_Check      -   Enable/Disable download checking.                       ; ;                                       (ex. 1)                                                 ; ;                   $s_p_Aftp       -   Additional ftp commands that you want exectued.         ; ;                                       (Executed before the send) (Separate commands by @CRLF) ; ;                                       (ex. 'bell')                                            ; ;                                                                                               ; ; Requirement(s):   None                                                                        ; ;                                                                                               ; ; Notes:            It is possible to send multiple files using wildcards BUT you will          ; ;                   not be able to check if it was successfull by turning $i_p_Check to 1.      ; ;                                                                                               ; ; Return Value(s):  ($i_p_Check = 0) (Default)                                                  ; ;                   Always Returns 0                                                            ; ;                                                                                               ; ;                   ($i_p_Check = 1)                                                            ; ;                   On Success - Returns 1                                                      ; ;                  On Failure - Returns -1                                                      ; ;                                                                                               ; ; Author(s):        (KiXtart) (<a href='http://www.kixhelp.com/udfs/udf/83455.htm' class='bbc_url' title='External link' rel='nofollow external'>http://www.kixhelp.com/udfs/udf/83455.htm</a>)                     ; ;                   Andrew Mack                                                                 ; ;                   Richard H.                                                                  ; ;                                                                                               ; ;                   (AutoIt) (Re-Written from scratch)                                          ; ;                   Wouter Van Kesteren <w0ut3r88@gmail.com>                                    ; ;                                                                                               ; ; Example Usage:    _FTPput('24.132.95.223', 'C:\WINDOWS\NOTEPAD.EXE', 'uploads', 'fakepass')   ; ;=================================================================================================== ;


Plain Text         
;=================================================================================================== ; ;                                                                                               ; ; Function Name:    _FTPdel()                                                                   ; ;                                                                                               ; ; Description:    Deletes a file from an ftp server.                                            ; ;                                                                                               ; ; Parameter(s):  $s_d_Host      -   IP or URL to the host.                                  ; ;                                       (ex. '24.158.58.154')                                   ; ;                   $s_d_PathFile   -   The path and filename.                                  ; ;                                       (ex. 'uploads\autoitscript.exe')                        ; ;                   $s_d_Acc        -   Account to log into.                                    ; ;                                       (ex. 'rootacc')                                         ; ;                   $s_d_Pwd        -   Password for the account.                               ; ;                                       (ex. 'pass')                                            ; ;                   $i_d_Check      -   Enable/Disable download checking.                       ; ;                                       (ex. 1)                                                 ; ;                   $s_d_Aftp       -   Additional ftp commands that you want exectued.         ; ;                                       (Executed before the send) (Separate commands by @CRLF) ; ;                                       (ex. 'bell')                                            ; ;                                                                                               ; ; Requirement(s):   None                                                                        ; ;                                                                                               ; ; Notes:            It is possible to delete multiple files using wildcards BUT you will        ; ;                   not be able to check if it was successfull by turning $i_d_Check to 1.      ; ;                                                                                               ; ; Return Value(s):  ($i_d_Check = 0) (Default)                                                  ; ;                   Always Returns 0                                                            ; ;                                                                                               ; ;                   ($i_d_Check = 1)                                                            ; ;                   On Success - Returns 1                                                      ; ;                   On Failure (B/C the information is incorrect) - Returns -2                  ; ;                  On Failure (Other) - Returns -1                                              ; ;                                                                                               ; ; Author(s):        (KiXtart) (<a href='http://www.kixhelp.com/udfs/udf/83455.htm' class='bbc_url' title='External link' rel='nofollow external'>http://www.kixhelp.com/udfs/udf/83455.htm</a>)                     ; ;                   Andrew Mack                                                                 ; ;                   Richard H.                                                                  ; ;                                                                                               ; ;                   (AutoIt) (Re-Written from scratch)                                          ; ;                   Wouter Van Kesteren <w0ut3r88@gmail.com>                                    ; ;                                                                                               ; ; Example Usage:    _FTPdel('24.132.95.223', 'uploads\autoitscript.exe', 'rootacc', 'pass', 1)  ; ;=================================================================================================== ;


Plain Text         
;=================================================================================================== ; ;                                                                                               ; ; Function Name:    _FTPadv()                                                                   ; ;                                                                                               ; ; Description:    Sends FTP commands to an ftp server.                                      ; ;                                                                                               ; ; Parameter(s):  $s_a_Host      -   IP or URL to the host.                                  ; ;                                       (ex. '24.158.58.154')                                   ; ;                   $s_a_Acc        -   Account to log into.                                    ; ;                                       (ex. 'Sander')                                          ; ;                   $s_a_Pwd        -   Password for the account.                               ; ;                                       (ex. 'Monkey')                                          ; ;                   $s_a_Ftp        -   FTP commands that you want exectued.                    ; ;                                       (Separate commands by @CRLF)                            ; ;                                       (ex. 'rename ' & $filename & $newfilename)              ; ;                                                                                               ; ; Requirement(s):   None                                                                        ; ;                                                                                               ; ; Return Value(s):  None                                                                        ; ;                                                                                               ; ; Author(s):        (KiXtart) (<a href='http://www.kixhelp.com/udfs/udf/83455.htm' class='bbc_url' title='External link' rel='nofollow external'>http://www.kixhelp.com/udfs/udf/83455.htm</a>)                     ; ;                   Andrew Mack                                                                 ; ;                   Richard H.                                                                  ; ;                                                                                               ; ;                   (AutoIt) (Re-Written from scratch)                                          ; ;                   Wouter Van Kesteren <w0ut3r88@gmail.com>                                    ; ;                                                                                               ; ; Example Usage:    _FTPadv('24.132.95.223', 'upload', 'pass', 'rename ' & $filename & $newfilename); ;=================================================================================================== ;

Attached Files


My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll







#2 Insolence

Insolence

    Not distastefully arrogant

  • Active Members
  • PipPipPipPipPipPip
  • 1,304 posts

Posted 07 April 2005 - 10:11 PM

Very well documented, I was searching for something like this a while ago.

Thank you :)
"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

#3 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 07 April 2005 - 11:07 PM

Thank you :D

<{POST_SNAPBACK}>

no thank you :)
My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

#4 Ghastly_MIB

Ghastly_MIB

    Wayfarer

  • Active Members
  • Pip
  • 99 posts

Posted 15 April 2005 - 04:28 PM

Does anyone know how this works? :)

#5 Insolence

Insolence

    Not distastefully arrogant

  • Active Members
  • PipPipPipPipPipPip
  • 1,304 posts

Posted 15 April 2005 - 04:41 PM

What don't you understand?
"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

#6 YpR^

YpR^

    Adventurer

  • Active Members
  • PipPip
  • 100 posts

Posted 15 April 2005 - 09:41 PM

Uhm.. i get this error: Badly formatted "Func" statement.

I copied ur example and edited it :/
Posted Image

#7 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 15 April 2005 - 09:42 PM

thats what you get for messing w/ my code...

post your modified code here and we will have a look at it :)
My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

#8 mads3n

mads3n

    Wayfarer

  • Active Members
  • Pip
  • 55 posts

Posted 09 June 2005 - 03:12 PM

When I use _FTPput on one of my .txt files it changes the content of the file to an error message.. :S
Mads3n.dk




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users