diff --git a/PhoenixAPI/WebGetEx.md b/PhoenixAPI/WebGetEx.md index 6ca3df0..9671471 100644 --- a/PhoenixAPI/WebGetEx.md +++ b/PhoenixAPI/WebGetEx.md @@ -9,7 +9,7 @@ Unless you require the extended functionality it is recommended to use the nativ ## Syntax ```pebakery -WebGet,,[,=][,Referer=][,TimeOut=][,UserAgent=][,NOERR] +WebGet,,[,=][,Referer=][,TimeOut=][,UserAgent=][,FTP-User=][,FTP-Password=][,FTP-Type=][,FTP-Passive=][,NOERR] ``` ### Arguments @@ -18,7 +18,7 @@ Optional arguments may be specified in any order. | Argument | Description | | --- | --- | -| URL | URL of the file to download. Supported URI's are `HTTP`, `HTTPS`. | +| URL | URL of the file to download. Valid URI's are `HTTP`, `HTTPS`, `FTP`, `SFTP`. | | DestPath | The full path where the downloaded file will be saved. If the path does not exist it will be created. If the file exists it will be overwritten. | | Hash Verification | **(Optional)** Downloads can be verified by validating the hash value of the downloaded file in the form of `=`. | | | HashType= - Hash type to calculate. Supported hash types: `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`. | @@ -26,6 +26,10 @@ Optional arguments may be specified in any order. | Referer= | **(Optional)** Set an http referrer (Referer). | | TimeOut= | **(Optional)** The time-span (in seconds) to wait for a response before the request times out. **Default:** 10 | | UserAgent= | **(Optional)** Set a custom User-Agent string used to identify PEBakery to the website. | +| FTP-User= | **(Optional)** Set the FTP/SFTP user. Default: `anonymous`. | +| FTP-Password= | **(Optional)** Set the FTP/SFTP password. Default: `PhoenixPE`. | +| FTP-Passive= | **(Optional)** Use passive mode in FTP. Default: `true`. This option is ignored for SFTP transfers. | +| FTP-Type= | **(Optional)** Set the FTP transfer type. Supported values are: `binary` or `ascii`. Default: `binary`. This option is ignored for SFTP transfers. | ### Flags @@ -62,11 +66,17 @@ The WebGet User-Agent is resolved in the following order: ```pebakery // zlib source code will be downloaded to %BaseDir%\zlib.tar.gz. -WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz",%BaseDir%\zlib.tar.gz +WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz","%BaseDir%\zlib.tar.gz" // Downloaded tar.gz file will be validated with its SHA256 digest. -WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz",%BaseDir%\zlib.tar.gz,SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 +WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz","%BaseDir%\zlib.tar.gz",SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 // Download zlib.tar.gz and specify timout and referer -WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz",%BaseDir%\zlib.tar.gz,Referer=https://www.google.com,Timeout=30 +WebGetEx,"https://zlib.net/zlib-1.2.11.tar.gz","%BaseDir%\zlib.tar.gz",Referer=https://www.google.com,Timeout=30 + +// Download from a SFTP server with Username/Password +WebgetEx,"sftp://zlib.net/zlib-1.2.11.tar.gz","%BaseDir%\zlib.tar.gz","FTP-User=TestUser","FTP-Password=Passw0rd" + +// Download from an anonymous FTP server +WebgetEx,"ftp://zlib.net/zlib-1.2.11.tar.gz","%BaseDir%\zlib.tar.gz" ```