private void button1_Click(object sender, EventArgs e)
 {
     AutomatedVulnerabilityDetectorVersion2.GUIs.SharedVariables.myTestingForm=new GUIs.TestingForm(1,true);
     AutomatedVulnerabilityDetectorVersion2.GUIs.SharedVariables.myTestingForm.Show();
     XssAttack xss = new XssAttack(1);
     xss.attackEachInputfield(textBox1.Text);
 }
        public void attack()
        {
            DB.PagesManager pagesManager = new DB.PagesManager();
            SqlInjectionAttack sql = new SqlInjectionAttack(this._profileID);
            XssAttack xss = new XssAttack(this._profileID);
            RfiAttack rfi = new RfiAttack(this._profileID);
            //xss
            if (this._xssTest)
            {
                if (!this.deepScan) // normal mode
                {
                    xss.attackAllInputfields(this._url);
                    xss.attackAllQueryStrings(this._url);
                }
                else // deep scan mode
                {
                    xss.attackEachInputfield(this._url);
                    xss.attackEachQueryString(this._url);
                }
                pagesManager.setHasXSSed(true, this._url);
            }

            // sql injection
            if (this._sqlTest)
            {
                if (!this.deepScan)
                {
                    sql.attackAllInputfields(this._url);
                    sql.attackAllQueryStrings(this._url);
                }
                else
                {
                    sql.attackEachInputfield(this._url);
                    sql.attackEachQueryString(this._url);
                }
                pagesManager.setHasSQLInjection(true, this._url);
            }

            // rfi
            if (this._rfiTest)
            {
                if (!this.deepScan)
                {
                    rfi.attackAllInputfields(this._url);
                    rfi.attackAllQueryStrings(this._url);
                }
                else
                {
                    rfi.attackEachInputfield(this._url);
                    rfi.attackEachQueryString(this._url);
                }
                pagesManager.setHasRFIed(true, this._url);
            }

            // update gui
            GUIs.SharedVariables.myTestingForm.refreshExploits();
        }