DO NOT FLAME 😠
Hi there,
I'm making a series of TUTs that helps you to code a rat in C#.
This code is not using NETWORKING, you have to modify it to work as a part of a rat, I will be there and explain how to modify the codes to form a rat.
It is simple and easy to understand.
Im doing this for the "HF Coders" group that wont accept me as a member 😠
DOWNLOAD SOURCE CODE 🎉
EDIT : for outputing errors, you can add this code
after
and
after
Hi there,
I'm making a series of TUTs that helps you to code a rat in C#.
This code is not using NETWORKING, you have to modify it to work as a part of a rat, I will be there and explain how to modify the codes to form a rat.
It is simple and easy to understand.
Code
//
// DO NOT RIP THIS AND SAY IT IS YOURS //
// Author Morphine Injection //
// Www.HackForums.Net //
//
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.Diagnostics;
namespace CmdTut
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public Process processCmd = new Process();
private void Form1_Load(object sender, EventArgs e)
{
processCmd.StartInfo.FileName = "cmd.exe";
processCmd.StartInfo.CreateNoWindow = true;
processCmd.StartInfo.UseShellExecute = false;
processCmd.StartInfo.RedirectStandardOutput = true;
processCmd.StartInfo.RedirectStandardInput = true;
processCmd.StartInfo.RedirectStandardError = true;
processCmd.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);
processCmd.Start();
processCmd.BeginOutputReadLine();
}
delegate void FillCmdOutputCallBack(string message);
private void FillCmdOutput(string message)
{
if (cmdoutput.InvokeRequired)
{
this.Invoke(new FillCmdOutputCallBack(FillCmdOutput), new object[] { message });
}
else
{
cmdoutput.AppendText(message);
cmdinput.Focus();
}
}
private void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine)
{
if (!String.IsNullOrEmpty(outLine.Data))
{
try
{
FillCmdOutput(outLine.Data + "\r");
}
catch (Exception err) { }
}
}
private void cmdinput_KeyDown(object sender, KeyEventArgs e)
{
try
{
if (e.KeyCode == Keys.Enter)
{
processCmd.StandardInput.WriteLine(cmdinput.Text);
if (cmdinput.Text == "exit")
Close();
cmdinput.Text = "";
}
}
catch (Exception err) { }
}
}
}Im doing this for the "HF Coders" group that wont accept me as a member 😠
DOWNLOAD SOURCE CODE 🎉
EDIT : for outputing errors, you can add this code
Code
processCmd.ErrorDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);Code
processCmd.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);Code
processCmd.BeginErrorReadLine();Code
processCmd.BeginOutputReadLine();
