public override void Attack()
        {
            Form[] forms=DataLayer.GetHostsForms(_hosts);

            Queue<Form> sharedQueue = new Queue<Form>();
            foreach (var form in forms)
                sharedQueue.Enqueue(form);

            object sharedLock = new object();

            XssAttackingSharedReource sharedResource = new XssAttackingSharedReource(sharedQueue, sharedLock, _attack);

            for (int i = 0; i < _numberOfThreads; i++)
            {
                EncodedXssAttackerAgent agent = new EncodedXssAttackerAgent(sharedResource);
                agent.AgentAttackCompleted += agent_AgentAttackCompleted;
                agent.AgentAttackStarted += agent_AgentAttackStarted;
                agent.AgentAttackAnnounced += agent_AgentAttackAnnounced;
                agent.AttackAsync();
            }
        }
Exemple #2
0
        public override void Attack()
        {
            Form[] forms = DataLayer.GetHostsForms(_hosts);

            Queue <Form> sharedQueue = new Queue <Form>();

            foreach (var form in forms)
            {
                sharedQueue.Enqueue(form);
            }

            object sharedLock = new object();

            XssAttackingSharedReource sharedResource = new XssAttackingSharedReource(sharedQueue, sharedLock, _attack);

            for (int i = 0; i < _numberOfThreads; i++)
            {
                EncodedXssAttackerAgent agent = new EncodedXssAttackerAgent(sharedResource);
                agent.AgentAttackCompleted += agent_AgentAttackCompleted;
                agent.AgentAttackStarted   += agent_AgentAttackStarted;
                agent.AgentAttackAnnounced += agent_AgentAttackAnnounced;
                agent.AttackAsync();
            }
        }
 public SimpleXssAttackerAgent(XssAttackingSharedReource sharedResource)
 {
     _sharedResource = sharedResource;
 }
 public EncodedXssAttackAnnounceItem(XAttack xAttack, EncodedXssAttackStatus attackStatus, XssAttackingSharedReource attackingSharedResource, string description, DateTime dateTime)
     : base(attackingSharedResource,description,dateTime)
 {
     this.XAttack = xAttack;
     this.AttackStatus = attackStatus;
 }
 public SimpleXssAttackerAgent(XssAttackingSharedReource sharedResource)
 {
     _sharedResource = sharedResource;
 }
Exemple #6
0
 public EncodedXssAttackerAgent(XssAttackingSharedReource sharedResource)
 {
     _sharedResource = sharedResource;
 }
Exemple #7
0
 public EncodedXssAttackAnnounceItem(XAttack xAttack, EncodedXssAttackStatus attackStatus, XssAttackingSharedReource attackingSharedResource, string description, DateTime dateTime)
     : base(attackingSharedResource, description, dateTime)
 {
     this.XAttack      = xAttack;
     this.AttackStatus = attackStatus;
 }
 public EncodedXssAttackerAgent(XssAttackingSharedReource sharedResource)
 {
     _sharedResource = sharedResource;
 }