Example #1
0
        public ActionResult GetCollectors()
        {
            Dictionary <string, RUN_STATUS> dict = new Dictionary <string, RUN_STATUS>();
            string RunId = AttackSurfaceAnalyzerClient.GetLatestRunId();

            foreach (BaseCollector c in AttackSurfaceAnalyzerClient.GetCollectors())
            {
                var fullString = c.GetType().ToString();
                var splits     = fullString.Split('.');
                dict.Add(splits[splits.Length - 1], c.IsRunning());
            }
            Dictionary <string, object> output = new Dictionary <string, object>();

            output.Add("RunId", RunId);
            output.Add("Runs", dict);
            return(Json(JsonConvert.SerializeObject(output)));
        }
Example #2
0
        public ActionResult GetCollectors()
        {
            Dictionary <string, RUN_STATUS> dict = new Dictionary <string, RUN_STATUS>();
            string RunId = AttackSurfaceAnalyzerClient.GetLatestRunId();

            //TODO: Improve this to not have to change this variable on every loop, without having to call GetCollectors twice.
            foreach (BaseCollector c in AttackSurfaceAnalyzerClient.GetCollectors())
            {
                var fullString = c.GetType().ToString();
                var splits     = fullString.Split('.');
                dict.Add(splits[splits.Length - 1], c.IsRunning());
            }
            Dictionary <string, object> output = new Dictionary <string, object>();

            output.Add("RunId", RunId);
            output.Add("Runs", dict);
            //@TODO: Also return the RunId
            return(Json(JsonConvert.SerializeObject(output)));
        }
Example #3
0
 public ActionResult GetLatestRunId()
 {
     return(Json(HttpUtility.UrlEncode(AttackSurfaceAnalyzerClient.GetLatestRunId())));
 }
Example #4
0
 public ActionResult GetLatestRunId()
 {
     return(Json(AttackSurfaceAnalyzerClient.GetLatestRunId()));
 }