mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-21 02:46:10 +00:00
75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Tvsu.Service.Server.TvsuService
|
|||
|
// Assembly: SUService, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: C794206D-ECC0-4CFA-AB4E-5C06FB2FD4CC
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.Win32.Patched.mf-57a055e0e8642f449b4d27fa8ff9cbc0f8367d8cdd69ab6deeca9a801697bce1.exe
|
|||
|
|
|||
|
using System;
|
|||
|
using System.ServiceProcess;
|
|||
|
using Tvsu.Service.Common.InterProcessComm;
|
|||
|
using Tvsu.Service.Common.Util;
|
|||
|
|
|||
|
namespace Tvsu.Service.Server
|
|||
|
{
|
|||
|
public class TvsuService : ServiceBase
|
|||
|
{
|
|||
|
private ServiceController serviceController1;
|
|||
|
private static TvsuService instance = (TvsuService) null;
|
|||
|
public static IChannelManager PipeManager;
|
|||
|
|
|||
|
private TvsuService() => this.InitializeComponent();
|
|||
|
|
|||
|
private static void Main() => ServiceBase.Run(new ServiceBase[1]
|
|||
|
{
|
|||
|
(ServiceBase) new TvsuService()
|
|||
|
});
|
|||
|
|
|||
|
public static TvsuService Instance
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
if (TvsuService.instance == null)
|
|||
|
TvsuService.instance = new TvsuService();
|
|||
|
return TvsuService.instance;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public ServiceController TvsuServiceController => this.serviceController1;
|
|||
|
|
|||
|
private void InitializeComponent()
|
|||
|
{
|
|||
|
this.serviceController1 = new ServiceController("SUService", ".");
|
|||
|
this.ServiceName = "SUService";
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnStart(string[] args)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
TvsuService.PipeManager = (IChannelManager) new Tvsu.Service.Server.PipeManager();
|
|||
|
TvsuService.PipeManager.Initialize();
|
|||
|
ServiceLogger.Instance.Info("Start service");
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ServiceLogger.Instance.Severe("Error on starting service", ex);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnStop()
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
if (TvsuService.PipeManager == null)
|
|||
|
return;
|
|||
|
TvsuService.PipeManager.Stop();
|
|||
|
ServiceLogger.Instance.Info("Stop service");
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ServiceLogger.Instance.Severe("Error on stop service", ex);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|