Пример #1
0
        /// <summary>
        /// Injects Casaba Request Sessions into Fiddler.. 
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        public static void CasabaSessionFiddlerInjector(Secsay.Session s)
        {
            Fiddler.HTTPRequestHeaders reqHeaders = new Fiddler.HTTPRequestHeaders();
            StringDictionary flags = new StringDictionary();
            string sc;

            foreach (string key in s.Request.Headers.Keys)
            {
                List<string> values = s.Request.Headers[key];
                foreach (string v in values)
                {
                    reqHeaders.Add(key, v);
                }
            }
            reqHeaders.RequestPath = s.Request.Path;
            reqHeaders.HTTPMethod = s.Request.HttpMethod;
            if (s.ContainsCodePoint)
                sc = s.Chr.ToString();  //Here and i put the code point as text string..
            else
                sc = "";

            flags[UASettings.casabaFlag] = sc;
            Fiddler.FiddlerApplication.oProxy.InjectCustomRequest(reqHeaders, s.Request.BodyBytes, flags);
        }
Пример #2
0
 public static void Save(Secsay.UASettings settings)
 {
     XmlSerializer s = new XmlSerializer(typeof(Secsay.UASettings));
     string myDoc = Environment.GetEnvironmentVariable("UserProfile");
     TextWriter w = new StreamWriter(fileName);
     s.Serialize(w, settings);
     w.Close();
 }
Пример #3
0
 public void CreateUI(Secsay.UAEngine engine)
 {
     Secsay.UAEngine xa = new Secsay.UAEngine();
     ui = new UAUserInterface(xa);
     Application.Run(ui);
 }