public void Prepare(InjectionInfos injectInfos)
 {
     _userStop           = false;
     _requestList        = new List <Request>();
     _extractingInfos    = new ExtractorInfos();
     _lastQueryOutput    = string.Empty;
     _injector           = new InjectingClass();
     _injectInfos        = injectInfos;
     _requestConstructor = new RequestConstructor(injectInfos)
     {
         EncodeCharacters = _encodeCharacter,
         EncodeWhiteSpace = _encodeWhiteSpace
     };
     _internalData.Prepared      = true;
     _internalData.UseConditions = true;
 }
        public DbExtractor()
        {
            //Properties
            _encodeCharacter  = false;
            _encodeWhiteSpace = false;
            _minColumns       = 1;
            _maxColumns       = 20;
            _extractingInfos  = new ExtractorInfos();

            // Private
            _injectionPatterns           = new InjectPatterns();
            _internalData                = new InternalData();
            _queryConstructor            = new QueryConstructor.QueryConstructor();
            _injectInfos                 = new InjectionInfos();
            _requestList                 = new List <Request>();
            _lastQueryOutput             = string.Empty;
            _reqManager                  = new RequestManager();
            _reqManager.RequestFinished += ReqManagerRequestFinished;
            _requestsComplete            = new ManualResetEvent(false);
            _injector = new InjectingClass();
            _userStop = false;
        }
        private void btn_Start_Click(object sender, EventArgs e)
        {
            if (testForWrongInPut())
            {
                //InjectInfos

                DatabaseExtractor.MinColumns       = Convert.ToInt32(nud_Min.Value);
                DatabaseExtractor.MaxColumns       = Convert.ToInt32(nud_Max.Value);
                DatabaseExtractor.EncodeCharacter  = cb_EncodeCharacter.Checked;
                DatabaseExtractor.EncodeWhiteSpace = cb_EncodeWhiteSpaces.Checked;

                InjectInfos = new InjectionInfos();

                if (raBu_Choose.Checked == true)
                {
                    if (richTextBox_Preview.Text == string.Empty)
                    {
                        InjectInfos.POST = txt_Post.Text + "{Inject}";
                    }
                    else
                    {
                        InjectInfos.POST = richTextBox_Preview.Text;
                    }
                    InjectInfos.URL = txt_URL.Text;
                }
                else
                {
                    InjectInfos.URL  = richTextBox_Preview.Text;
                    InjectInfos.POST = txt_Post.Text;
                }
                InjectInfos.InjectableParameter = "";
                InjectInfos.DefaultValue        = "";

                if (raBu_Choose.Checked == true)
                {
                    InjectInfos.ModifyType = ModifyType.POST;
                }
                else
                {
                    InjectInfos.ModifyType = ModifyType.GET;
                }

                InjectInfos.Success = txt_Success.Text;
                InjectInfos.CustomCookieCollection = CookieCol;
                DatabaseExtractor.Prepare(InjectInfos);
                lv_Status.Items.Clear();
                tv_Database.Nodes.Clear();
                lv_Database.Clear();
                DatabaseExtractor.ExtractingInfos.Status.Clear();
                btn_GetDatabase.Enabled = false;
                btn_ReadColumns.Enabled = false;
                btn_ReadRows.Enabled    = false;
                btn_ReadTables.Enabled  = false;
                awaitingFinish          = true;
                DatabaseExtractor.UserStartMethod();
                AddDataTab();
                tc_1.SelectedTab = tc_1.TabPages[1];
                tabPageData.Focus();
                Thread thread = new Thread(new ThreadStart(DatabaseExtractor.TestParameterInjectable));
                thread.Start();
            }
        }