Exemple #1
0
        public async Task <IActionResult> Start(FuzzerParametersViewModel model)
        {
            HttpClient client = _clientFactory.CreateClient();

            HttpContent content = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");
            await client.PostAsync(_configuration.GetValue <string>("FuzzerHost") + "/Fuzz/Start", content);

            return(RedirectToAction("Summary", "FuzzerRun"));
        }
Exemple #2
0
        public async Task <IActionResult> IndexAsync()
        {
            List <KnownEndpointEntity> endpoints = await _endpointRepository.GetAllEndpoints();

            FuzzerParametersViewModel model = new FuzzerParametersViewModel();

            model.ExecutionTime = 2;
            model.Target        = @"http://host.docker.internal";

            foreach (KnownEndpointEntity requestEntity in endpoints)
            {
                model.Endpoints.Add(new KnownEndpointViewModel(requestEntity));
            }

            return(View(model));
        }