mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 03:16:11 +00:00
f2ac1ece55
add
105 lines
2.6 KiB
C#
105 lines
2.6 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: ATI.ACE.CCCInstall.CCCInstallLog
|
|
// Assembly: CCCInstall, Version=2.0.3163.17516, Culture=neutral, PublicKeyToken=null
|
|
// MVID: FB1048F0-5C3B-4430-944F-CD20B70875CD
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Virut.ce-a5390b2b18d2a77666607470ebf93830056f4a617362a2ac03e16666a0bc6bad.exe
|
|
|
|
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
namespace ATI.ACE.CCCInstall
|
|
{
|
|
public class CCCInstallLog
|
|
{
|
|
private StringBuilder sb;
|
|
private bool ShowLog = true;
|
|
|
|
public CCCInstallLog()
|
|
{
|
|
try
|
|
{
|
|
this.sb = new StringBuilder();
|
|
this.sb.AppendLine("===========================================");
|
|
this.sb.AppendLine("** CCCInstall started: " + DateTime.Now.ToString("u"));
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
|
|
public CCCInstallLog(bool showLog)
|
|
{
|
|
this.ShowLog = showLog;
|
|
if (!showLog)
|
|
return;
|
|
try
|
|
{
|
|
this.sb = new StringBuilder();
|
|
this.sb.AppendLine("===========================================");
|
|
this.sb.AppendLine("** CCCInstall started: " + DateTime.Now.ToString("u"));
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
|
|
public void LogException(Exception e)
|
|
{
|
|
if (!this.ShowLog)
|
|
return;
|
|
try
|
|
{
|
|
this.sb.AppendFormat("[{0}] Exception:\r\n{1}\r\n{2}\r\n", (object) DateTime.Now.ToString("u"), (object) e.Message, (object) e.StackTrace);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
|
|
public void LogException(Exception e, string additionalMessage)
|
|
{
|
|
if (!this.ShowLog)
|
|
return;
|
|
try
|
|
{
|
|
this.sb.AppendFormat("[{0}] Exception: {1}\r\n{2}\r\n{3}\r\n", (object) DateTime.Now.ToString("u"), (object) additionalMessage, (object) e.Message, (object) e.StackTrace);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
|
|
public void LogMessage(string message)
|
|
{
|
|
if (!this.ShowLog)
|
|
return;
|
|
try
|
|
{
|
|
this.sb.AppendFormat("[{0}] Message: {1}\r\n", (object) DateTime.Now.ToString("u"), (object) message);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
|
|
public void LogFinished()
|
|
{
|
|
if (!this.ShowLog)
|
|
return;
|
|
StreamWriter streamWriter = (StreamWriter) null;
|
|
try
|
|
{
|
|
streamWriter = new StreamWriter("CCCInstall_" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".log", true);
|
|
streamWriter.Write(this.sb.ToString());
|
|
streamWriter.WriteLine("** CCCInstall ended: " + DateTime.Now.ToString("u"));
|
|
streamWriter.WriteLine("===========================================");
|
|
}
|
|
finally
|
|
{
|
|
streamWriter?.Close();
|
|
}
|
|
}
|
|
}
|
|
}
|