mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2025-02-01 06:47:28 +00:00
f2ac1ece55
add
74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: VMS.OSService.Abstract.AbstractService
|
|
// Assembly: VMS.OSP.Service, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 7B29B897-26BF-407B-B0D0-14253383A174
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.Patched.mf-06a1c79ea1bf078d9f5816243d6887697530720ed581c2975d99154e2a24648f.exe
|
|
|
|
using System;
|
|
using System.Diagnostics;
|
|
using VMS.OSP.Services.Logging;
|
|
|
|
namespace VMS.OSService.Abstract
|
|
{
|
|
public abstract class AbstractService
|
|
{
|
|
private const string cApplicationId = "Varian OSP Service";
|
|
private SysLog _sysLog;
|
|
private EventLog _evtLog;
|
|
|
|
internal void Init(SysLog sysLog, EventLog evtLog)
|
|
{
|
|
this._sysLog = sysLog;
|
|
this._evtLog = evtLog;
|
|
}
|
|
|
|
protected SysLog SysLog => this._sysLog;
|
|
|
|
protected void WriteSysLog(OSP_SEVERITY eSeverity, string strCategory, string strMessage)
|
|
{
|
|
if (this.SysLog.ConnectionState.Equals(false))
|
|
{
|
|
this.SysLog.CloseLog();
|
|
this.SysLog.OpenLog();
|
|
}
|
|
try
|
|
{
|
|
this.SysLog.Write(eSeverity, (OSP_FACILITY) 3, "Varian OSP Service", strCategory, strMessage);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
strMessage = "SysLog.Write failed: " + ex.Message + "\r\nOriginal SysLog Msg: " + strMessage;
|
|
this.WriteFallBackEntry(eSeverity, strCategory, strMessage);
|
|
}
|
|
}
|
|
|
|
private void WriteFallBackEntry(OSP_SEVERITY eSeverity, string strCategory, string strMessage)
|
|
{
|
|
if (eSeverity == 6)
|
|
return;
|
|
if (eSeverity == 7)
|
|
return;
|
|
try
|
|
{
|
|
strMessage = string.Format("Application: {0}/{1} Severity: {2}\r\n{3}", (object) "Varian OSP Service", (object) strCategory, (object) ((object) eSeverity).ToString(), (object) strMessage);
|
|
this._evtLog.WriteEntry(strMessage, EventLogEntryType.Error);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
}
|
|
}
|
|
|
|
internal virtual void OnStart(string[] args)
|
|
{
|
|
}
|
|
|
|
internal virtual void OnStop()
|
|
{
|
|
}
|
|
|
|
internal virtual void OnCustomEvent(int command)
|
|
{
|
|
}
|
|
}
|
|
}
|