Ejemplo n.º 1
0
        public void PerformAnalyzation()
        {
            foreach (var byPassObject in ByPassFilter.Filter)
            {
                // Update Status des FilterByPassObject (Logging)
                _responseForm.UpdateStatus(byPassObject.ID, "analyzing...");

                bool success = false;

                if (byPassObject.ResponseContent.Contains(byPassObject.ByPassString))
                {
                    success = true;
                }

                // Set Result und Ende
                _responseForm.SetResult(byPassObject.ID, success);
                _responseForm.UpdateStatus(byPassObject.ID, "...done");
            }
        }
Ejemplo n.º 2
0
        private void btSimuRetRes_Click(object sender, EventArgs e)
        {
            if (started)
            {
                Random rnd  = new Random();
                int    next = -1;

                if (returned == null)
                {
                    returned = new int[ByPassFilter.Filter.Count];
                    for (int j = 0; j < returned.Length; j++)
                    {
                        returned[j] = -1;
                    }
                }

                if (i < ByPassFilter.Filter.Count)
                {
                    next = rnd.Next(0, ByPassFilter.Filter.Count);

                    while (returned.Contains(next) && (i < ByPassFilter.Filter.Count))
                    {
                        next = rnd.Next(0, ByPassFilter.Filter.Count);
                    }

                    returned[i] = next;

                    i++;

                    int res = rnd.Next(0, 2);

                    _xSSEvalForm.SetResult(next, Convert.ToBoolean(res));
                    _xSSEvalForm.UpdateStatus(next, "completed");
                }
            }
        }