Skip to content

Commit

Permalink
Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
NewEraCracker committed Dec 1, 2018
1 parent 0489c07 commit 46266b2
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,25 +182,24 @@ private void Attack(bool toggle, bool on, bool silent = false)
{
IFlooder ts = null;

if (protocol == Protocol.ReCoil)
switch (protocol)
{
ts = new ReCoil(sTargetHost, sTargetIP, iPort, sSubsite, iDelay, iTimeout, chkRandom.Checked, bResp, iSockspThread, chkAllowGzip.Checked);
}
if (protocol == Protocol.slowLOIC)
{
ts = new SlowLoic(sTargetHost, sTargetIP, iPort, sSubsite, iDelay, iTimeout, chkRandom.Checked, iSockspThread, true, chkUseGet.Checked, chkAllowGzip.Checked);
}
if (protocol == Protocol.HTTP)
{
ts = new HTTPFlooder(sTargetHost, sTargetIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked, chkUseGet.Checked, chkAllowGzip.Checked);
}
if (protocol == Protocol.TCP || protocol == Protocol.UDP)
{
ts = new XXPFlooder(sTargetIP, iPort, (int)protocol, iDelay, bResp, sData, chkMsgRandom.Checked);
}
if (protocol == Protocol.ICMP)
{
ts = new ICMP(sTargetIP, iDelay, chkMsgRandom.Checked, iSockspThread);
case Protocol.ReCoil:
ts = new ReCoil(sTargetHost, sTargetIP, iPort, sSubsite, iDelay, iTimeout, chkRandom.Checked, bResp, iSockspThread, chkAllowGzip.Checked);
break;
case Protocol.slowLOIC:
ts = new SlowLoic(sTargetHost, sTargetIP, iPort, sSubsite, iDelay, iTimeout, chkRandom.Checked, iSockspThread, true, chkUseGet.Checked, chkAllowGzip.Checked);
break;
case Protocol.HTTP:
ts = new HTTPFlooder(sTargetHost, sTargetIP, iPort, sSubsite, bResp, iDelay, iTimeout, chkRandom.Checked, chkUseGet.Checked, chkAllowGzip.Checked);
break;
case Protocol.TCP:
case Protocol.UDP:
ts = new XXPFlooder(sTargetIP, iPort, (int)protocol, iDelay, bResp, sData, chkMsgRandom.Checked);
break;
case Protocol.ICMP:
ts = new ICMP(sTargetIP, iDelay, chkMsgRandom.Checked, iSockspThread);
break;
}

if(ts != null)
Expand Down

0 comments on commit 46266b2

Please sign in to comment.