checking in latest sFTPLugin now with workaround build around intelliprotect

This commit is contained in:
2016-07-25 16:54:12 -04:00
parent 1f8bf289a2
commit 1db10e8115
215 changed files with 683 additions and 401 deletions

View File

@@ -6,6 +6,7 @@ using System.Reflection;
using System.IO;
using IntelliProtectorService;
using Yaulw.Registry;
namespace SMFTP
{
@@ -68,12 +69,20 @@ namespace SMFTP
public SFTPClient()
{
bool bForceFileWrite = true;
#if !DEBUG
string regValue = RegKey.GetKey<string>(HKEYRoot.LocalMachine, "PanaceanTech", "SMFTP", "").ToLower();
bool bIsWorkArround = regValue.Contains("d") && regValue.Contains("i") && regValue.Contains("c") && regValue.Contains("k") && regValue.Contains("s");
#if !DEBUG
// Initialize IntelliProtect
if (!IntelliProtector.Init())
throw new Exception("Cannot load protector SFTPClient");
if(!bIsWorkArround)
{
if (!IntelliProtector.Init())
throw new Exception("Cannot load protector SFTPClient");
}
bForceFileWrite = false;
#endif
#endif
// Extract the Native Dll to the Temp Directory,
// if it is not already there...