How do I make MetaDefender Core upload clean files to the FTP file server?

MetaDefender Core provides the ability to specify custom scripts that will run after scanning every clean or infected file.

Using this feature, an administrator working with MetaDefender Core can easily add custom script that will upload all clean files to file server. The following example is based on using FTP to upload files to file server.

Specify Custom Script from Command Line

  1. Create an XML file with the following content.
    Code:

    <post_action>
    <scripts>
    <if type="0">echo OPEN myftpserver.myftp.com &gt; ftp.scr&&echo
    myusername>> ftp.scr&&echo mypassword&gt;
    ftp.scr&&echo cd test_post_action &gt; &gt; ftp.scr&&echo put
    %%%file_path%%% &gt; &gt; ftp.scr&&echo CLOSE &gt; &gt; ftp.scr&&echo
    quit &gt; &gt; ftp.scr&&ftp -s:ftp.scr</if>
    </scripts>
    </post_action>
  2. Enable script by running the following commands from MetaDefender Core installation directory.
    Code:

    omsCmdLineUtil.exe config pa=<full path to the xml created in step 1>

Specify Custom Script in MetaDefender Core Management Console

  1. Open The MetaDefender Core Management Console through the Start menu or go to http://localhost:8008.

  2. Go to Configuration > ScanEx Configuration > Post Processing.

  3. Under Clean Files, enable post action by selecting the checkbox next to Run custom command line script.

  4. Enter the following script in the text box and click Apply.
    Code:

    echo OPEN myftpserver.myftp.com &gt; ftp.scr&&echo myusername>> ftp.scr&&echo mypassword&gt;ftp.scr&&echo cd test_post_action &gt; &gt; ftp.scr&&echo put %%%file_path%%% &gt; &gt; ftp.scr&&echo CLOSE &gt; &gt; ftp.scr&&echo quit &gt; &gt; ftp.scr&&ftp -s:ftp.scr

This article pertains to MetaDefender Core v3
This article was last updated on 2017-12-20
CN