i just relized i had that commented out (sorry notepad has no colors) but im
sure this code worked if you can follow
private void mailit()
{
smtp mail = new smtp();
mail.to = txtTo.Text;
mail.from = txtFrom.Text;
mail.name = txtName.Text;
mail.subj = txtSub.Text;
mail.body = txtBody.Text;
mail.label9 = label9;
//mail.pool = listBox2;
mail.srv = ssrv;
mail.inx = ind.ToString();
mail.listBox1 = listBox1;
mail.amount = (Convert.ToInt32(txtAmt.Text)/threads);
if (ind != threads)
{
ind++;
if (started == 0)
{
ThreadStart startz = new ThreadStart(mailit);
worker[ind] = new Thread(startz);
}
worker[ind].Start();
if (ind == (threads-1))
{
}
}
mail.Mail();
}
private void button1_Click(object sender, System.EventArgs e)
{
//to do
//amount sent fix
//add waitOne to the socket class not in the mail class, use timeout
paramater etc
//make this project for exfilter command line
string server;
threads = Convert.ToInt32(txtThreads.Text);
smtp mail2 = new smtp();
if (ind > 0)
{ started=1;
server =
txtTo.Text.Substring(txtTo.Text.IndexOf("@")+1,(txtTo.Text.Length-txtTo.Text.IndexOf("@")-1));
ssrv=mail2.MXLookup(server);
listBox1.Items.Add("00 - Started at "+System.DateTime.Now);
ind=0;
ind++;
worker[ind].Start();
}
else
{
tp.SetMaxThreads(100,5000);
ThreadStart startz = new ThreadStart(mailit);
server =
txtTo.Text.Substring(txtTo.Text.IndexOf("@")+1,(txtTo.Text.Length-txtTo.Text.IndexOf("@")-1));
ssrv=mail2.MXLookup(server);
listBox1.Items.Add("00 - Started at "+System.DateTime.Now);
ind++;
worker[ind] = new Thread(startz);
worker[ind].Start();
}