Indigo Rose Software
Indigo Rose Software
Log in to the Customer Portal Customer Login
Software Development Discussion Forums Forums
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259

    Secure FTP Action Plugin

    I am currently working on a plugin for secure FTP. You can use this plugin to connect to secure FTP servers with SSL.

    For now, it has limited functionality, as this is work in progress. But you can already do the following:
    • Connect to servers using FTP with TLS/SSL, explicit mode
    • Connect to servers using FTP with TLS/SSL, implicit mode
    • Upload text or binary files
    • Download text or binary files
    • Disconnect from the server gracefully
    Please note: This is for secure FTP servers (FTPS), not normal FTP servers communicating through a secure SSH tunnel!

    Currently I have no directory navigation, listing, file renaming or removal - just upload and download, as written above. But these missing functions will be implemented in the near future.

    The plugin is available as part of my Utilities package. Documentation is included, but also available here.

    This plugin was tested against the free ZFTP Server and proved to work correctly with explicit and implicit TLS/SSL connections. Common, unsecure FTP connections are not supported - for those, please use the FTP plugin provided with AMS 7.0.

    The plugin, in its current state, is free. I won't guarantee that latter versions with more functions will stay free as well. But if the current state of the action plugin is already enough to help you out in a commercial project, you may use it without problems.

    Ulrich
    Last edited by Ulrich; 07-24-2009 at 11:22 AM. Reason: Changed download link

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,609
    Ulrich-
    Thanks for your work -- if you like; I can create an account on my server for you to test against.

    i will be giving your plugin a go; as I am currently shelling out to do some ftp'ing in SUF8 for a clienit... not as clean as i would like...

    -josh


    (Click here to contact me)
    Providing Independent Professional Consulting Services for IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
    Do you wave? Find me at josh.assing @ googlewave.com

  3. #3
    Join Date
    Nov 2007
    Location
    SF Bay Area
    Posts
    56
    Thanks for your post. This is badly needed and I'm sure many will appreciate your efforts here.

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,701
    Excellent! thanks for sharing.
    Dermot

    AMS Add-ons - xDialog.com

  5. #5
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    I updated the FTP2 plugin to version 1.0.0.1. Changes since the release yesterday:
    • Functions renamed for better compatibility with the original AutoPlay "FTP" plugin:
      FTP2.ConnectExplicit();
      FTP2.ConnectImplicit();
      FTP2.Disconnect();
      FTP2.Upload();
      FTP2.Download();
    • Some connection parameters are now boolean (as they should have been);
    • New function FTP2.ChangeDir();
    • New function FTP2.Delete();
    • New function FTP2.Rename();

    It would nice to know if somebody was able to perform FTPS connections and file transfers with this plugin.
    Here is a simple script which uses the available functions so far:
    Code:
    res = FTP2.ConnectImplicit("192.168.0.14", "admin", "password", 990, true, false);
    if (res ~= 0) then
        error = Application.GetLastError();
        Dialog.Message("FTP2", "Could not establish FTPS connection. ("..error..")");
    else
        -- attempt secure file upload
        filename = "file-" .. System.GetDate(DATE_FMT_ISO) .. System.GetTime(TIME_FMT_HOUR)..System.GetTime(TIME_FMT_MIN)..System.GetTime(TIME_FMT_SEC) .. ".test";
        res = FTP2.Upload("D:\\TEMP\\sja.log", filename);
        if (res ~= 0) then
            error = Application.GetLastError();
            Dialog.Message("FTP2", "Could not upload file. ("..error..")");
        else
            -- rename the remote file
            res = FTP2.Rename(filename, "new-" .. filename);
            if (res ~= 0) then
                error = Application.GetLastError();
                Dialog.Message("FTP2", "Could not rename file. ("..error..")");
            else
                -- attempt download of the renamed file
                res = FTP2.Download("new-" .. filename, "D:\\TEMP\\down-" .. filename);
                if (res ~= 0) then
                    error = Application.GetLastError();
                    Dialog.Message("FTP2", "Could not download file. ("..error..")");
                else
                    -- delete the remote file
                    res = FTP2.Delete("new-" .. filename);
                    if (res ~= 0) then
                        error = Application.GetLastError();
                        Dialog.Message("FTP2", "Could not delete file. ("..error..")");
                    else
                        Dialog.Message("FTP2", "Done.");
                    end
                end
            end
        end
        FTP2.Disconnect();
    end
    Ulrich

  6. #6
    Join Date
    Nov 2007
    Location
    SF Bay Area
    Posts
    56
    Well, AMS can't find the plugin, which I installed in the plugins directory. Using AMS7 (64 bit Vista, if that matters).

    L Canter

  7. #7
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    You should create a new folder for the plugin under ..\AutoPlay Media Studio 7.0\Plugins\Actions, and unzip the files there. Like C:\Program Files\AutoPlay Media Studio 7.0\Plugins\Actions\FTP2\.., for example. Did you do that? There should already exist folders for CDAudio, Clipboard, FTP and SQLite.

    I just tested on a fresh install of AMS7 over Windows Vista (32 bits) and the plugin was found as expected.

    Ulrich
    Last edited by Ulrich; 09-01-2008 at 07:18 PM.

  8. #8
    Join Date
    Oct 2007
    Location
    London, UK
    Posts
    1,283
    Cool, I thought I could use this but my server is not FTPS.

  9. #9
    Join Date
    Nov 2007
    Location
    SF Bay Area
    Posts
    56
    OK, I had just put it in the project folder , not the application, so it does now see the plugin. However, I do get the following error message:
    Attempt to call field 'Open_FTP_SSL_Implicit' (a nil value)

  10. #10
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    Canter, you are using the current version of the plugin with a function name used in the former release. Today Open_FTP_SSL_Implicit was renamed to ConnectImplicit, as I wrote earlier. Please check the help file and the example I provided here.

    Ulrich

  11. #11
    Join Date
    Nov 2007
    Location
    SF Bay Area
    Posts
    56
    Thanks - you were right about that, but now I get 12002 errors, can't connect - I"ve tried accessing 3 different FTP servers, all the same result.

  12. #12
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    Are you absolutely sure that those were secure FTP servers? This plugin will not work with standard FTP servers without encrypted data exchange.

    Here is a FTPS server, I'll leave it open for a couple of hours.

    IP address: 74.86.188.83
    Username: plugin
    Password: ams70rocks
    Protocol: Implicit SSL/TLS on port 990

    Ulrich

  13. #13
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,701
    Works perfectly for me using your test FTP server.
    Dermot

    AMS Add-ons - xDialog.com

  14. #14
    Join Date
    Nov 2007
    Location
    SF Bay Area
    Posts
    56
    That didn't work either - maybe I have something set wrong? Here is the debug trace output:

    *** LOCATION: Page1 -> On Preload
    [2]: Debug.ShowWindow(true);
    [4]: result = FTP2.ConnectImplicit("74.86.188.83", "plugin", 'ams70rocks', 990, true, false);
    TRACE: LastError = 0 ("Success.")
    [5]: if (res ~= 0) then
    [6]: error = Application.GetLastError();
    [7]: Dialog.Message("FTP2", "Could not establish FTPS connection. ("..error..")");
    TRACE: LastError = 0 ("Success.")
    [40]: end

  15. #15
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    Code:
    [2]: Debug.ShowWindow(true);
    [4]: result = FTP2.ConnectImplicit("74.86.188.83", "plugin", 'ams70rocks', 990, true, false);
    TRACE: LastError = 0 ("Success.")
    [5]: if (res ~= 0) then
    [6]: error = Application.GetLastError();
    [7]: Dialog.Message("FTP2", "Could not establish FTPS connection. ("..error..")");
    TRACE: LastError = 0 ("Success.")
    [40]: end
    I see that you did connect to the server successfully. Your script is wrong: You set the answer of ConnectImplicit into result, and in the next line you compare variable res (which should be nil), instead of result, against 0.

    The line with TRACE: LastError = 0 ("Success.") should alert you that the connection was made successfully.

    Ulrich

Similar Threads

  1. Secure FTP
    By TJ_Tigger in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 08-19-2008, 04:46 PM
  2. API - Action Plugin Installer -- Beta II [HOT!!!]
    By TimeSurfer in forum AutoPlay Media Studio 7.5
    Replies: 7
    Last Post: 06-13-2008, 02:55 AM
  3. Spotlight: FTP File Transfer Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 03-10-2004, 09:34 PM
  4. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM
  5. SUF6.0.0.2 -- installer hangs.
    By jassing in forum Setup Factory 6.0
    Replies: 4
    Last Post: 12-19-2001, 11:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Indigo Rose Software