Scripting lesson: using scripting and session info

Syncplify.me Server! version: 4.0.13+

This articles shows how to use scripting, event-handling and session information from within Syncplify.me Server! For the sake of this example we will only log such information in the log file, but in real-life production scenarios you can use these info as you wish (for example you may want to send them via email to someone, or even make decisions based upon them).

Let’s start by preparing the script that – as we said – will log some info in your Syncplify.me Server!’s log file:

We save the above script with the following name/description: “Log several client and connection info”.

Then we add an event-handler to trigger the execution of the script. Since the script contain references to file-transfer-related variables (VirtualObjectName and ObjectName) it seems obvious to trigger its execution upon occurrence of a file-transfer-related event. For the sake of this example we have chosen the AfterFileUpload event, which occurs every time a file is successfully uploaded by a client onto the server. Continue reading

Syncplify.me Server! scripting: Session.Terminate and Blacklist

In a previous article we’ve been talking about the new properties and methods introduced by Syncplify.me Server! v3 to improve the session object. One of such methods is Session.Terminate that basically instructs the FTP(S) or SFTP server to forcefully terminate the session as soon as the script execution ends.

In such post we have mentioned the addition of another useful function, often used in conjunction with Session.Terminate: the Blacklist function (which name is pretty self-explanatory). In this article we will explain how to use it.

First of all, let’s see the functions definition:

There are 3 parameters:

  1. IPorNetwork: the first parameter clearly should be the specific IP address (e.g.: 192.168.172.25) or the network/subnet (e.g.: 192.168.172.0/255.255.255.0) that you want to blacklist
  2. AMinutes: this is pretty intuitive too, it is the number of minutes you want the above IP address or network to be blacklisted for (unless you are permanently blacklisting it, see point #3 here below)
  3. AType: this parameter can be either ttTemporary or ttPermanent. If you want to temporarily blacklist the IP/network you will use ttTemporary and the IP/network will stay in the blacklist only for AMinutes minutes. Instead if you use ttPermanent the IP/network will be blacklisted forever (unless manually removed) and the AMinutes parameter will be ignored.

Continue reading

How-to: terminate a client session (or all of them)

As of version 3.0, Syncplify.me Server! allows you to forcefully terminate an unwanted client session, or even terminate all active sessions if needed.

You can do so by running the Configuration Manager, switching to the real-time monitor panel, and right-click with your mouse on the session you wish to terminate. A popup menu will appear and let you choose whether you want to end the selected session, or all the currently active sessions.

terminating

Syncplify.me Server! v3.0: improved session object

Thanks to our precious beta-testers (Izzy, Antonio, and “the gang”) we have been greatly improving our session object, for the joy of all users who take advantage of Syncplify.me Server!’s event-handling subsystem in order to run their own scripts.

In addition to all the properties and methods that were already present in v2.x, the new version will also feature the following ones:

Continue reading