mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 19:36:11 +00:00
104 lines
3.2 KiB
C#
104 lines
3.2 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: OnlineBackup.SchedulerService.SchedulerService
|
|||
|
// Assembly: OnlineBackup.SchedulerService, Version=1.0.0.2239, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: 957E6A86-11F3-41A3-AA04-CA4B20FE5494
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Packed.Win32.Katusha.b-66626718efb1bc294ca4154d634f0bc3bcf8a0aa5f41503d7aa582fb7920e9f4.exe
|
|||
|
|
|||
|
using OnlineBackup.Scheduler;
|
|||
|
using System;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Diagnostics;
|
|||
|
using System.IO;
|
|||
|
using System.ServiceProcess;
|
|||
|
|
|||
|
namespace OnlineBackup.SchedulerService
|
|||
|
{
|
|||
|
public class SchedulerService : ServiceBase
|
|||
|
{
|
|||
|
private IContainer components = (IContainer) null;
|
|||
|
|
|||
|
public SchedulerService()
|
|||
|
{
|
|||
|
Trace.TraceInformation(DateTime.Now.ToString() + " SchedulerService.SchedulerService()");
|
|||
|
try
|
|||
|
{
|
|||
|
this.InitializeComponent();
|
|||
|
this.ServiceName = "OnlineBackupSchedulerService";
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
Trace.TraceError(ex.ToString());
|
|||
|
throw;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnStart(string[] args)
|
|||
|
{
|
|||
|
Trace.TraceInformation(DateTime.Now.ToString() + " SchedulerService.OnStart()");
|
|||
|
ServerControl.Start();
|
|||
|
ScheduledBackup backupInfo;
|
|||
|
try
|
|||
|
{
|
|||
|
backupInfo = ScheduleClient.RetrieveSchedule().BackupInfo;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
if (backupInfo == null)
|
|||
|
return;
|
|||
|
string str = "";
|
|||
|
if (backupInfo.FullPath != null)
|
|||
|
str = Path.GetFileNameWithoutExtension(backupInfo.FullPath);
|
|||
|
if (!str.EndsWith("SyncNShare") && !str.Equals(""))
|
|||
|
{
|
|||
|
ScheduledBackup scheduledBackup = backupInfo;
|
|||
|
switch ((int) scheduledBackup.BackupInterval)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
scheduledBackup.BackupInterval = (ScheduledBackup.Interval) 128;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
scheduledBackup.BackupInterval = (ScheduledBackup.Interval) 512;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
scheduledBackup.BackupInterval = (ScheduledBackup.Interval) 512;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
scheduledBackup.BackupInterval = (ScheduledBackup.Interval) 1024;
|
|||
|
break;
|
|||
|
case 4:
|
|||
|
scheduledBackup.BackupInterval = (ScheduledBackup.Interval) 2048;
|
|||
|
break;
|
|||
|
}
|
|||
|
if (SchedulerController.Instance() == null)
|
|||
|
return;
|
|||
|
SchedulerController.Instance().EnableBackup(scheduledBackup.StartTime, scheduledBackup.BackupInterval, (int) sbyte.MaxValue);
|
|||
|
}
|
|||
|
else if (backupInfo.BackupInterval == 256 && backupInfo.DaysOfWeek == 0 && SchedulerController.Instance() != null)
|
|||
|
SchedulerController.Instance().EnableBackup(backupInfo.StartTime, (ScheduledBackup.Interval) 512, (int) sbyte.MaxValue);
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnStop()
|
|||
|
{
|
|||
|
Trace.TraceInformation(DateTime.Now.ToString() + " SchedulerService.OnStop()");
|
|||
|
ServerControl.Stop();
|
|||
|
}
|
|||
|
|
|||
|
private void InitializeComponent()
|
|||
|
{
|
|||
|
this.components = (IContainer) new Container();
|
|||
|
this.ServiceName = "Service1";
|
|||
|
}
|
|||
|
|
|||
|
private enum Interval30
|
|||
|
{
|
|||
|
Hourly,
|
|||
|
Daily,
|
|||
|
Weekly,
|
|||
|
Monthly,
|
|||
|
Once,
|
|||
|
}
|
|||
|
}
|
|||
|
}
|