Exemplo n.º 1
0
 internal static void UpdateProxyHeaderFieldsWithUIHeadersParameters()
 {
     Parameters TempHolder = new Parameters();
     if (IronProxy.CurrentSession.Request.Headers.Has("Host"))
     {
         TempHolder.Set("Host", IronProxy.CurrentSession.Request.Headers.Get("Host"));
     }
     if (IronProxy.CurrentSession.Request.Headers.Has("Cookie"))
     {
         TempHolder.Set("Cookie", IronProxy.CurrentSession.Request.Headers.Get("Cookie"));
     }
     IronProxy.CurrentSession.Request.Headers.RemoveAll();
     foreach (DataGridViewRow Row in UI.ProxyRequestParametersHeadersGrid.Rows)
     {
         IronProxy.CurrentSession.Request.Headers.Add(Row.Cells[0].Value.ToString(), Row.Cells[1].Value.ToString());
     }
     foreach (string Name in TempHolder.GetNames())
     {
         IronProxy.CurrentSession.Request.Headers.Set(Name, TempHolder.Get(Name));
     }
     FillProxyRequestHeaderFields(IronProxy.CurrentSession.Request);
 }
Exemplo n.º 2
0
 static string GetStringFromInjectionParameters(Parameters InjectionParameters, List<int> InjectionList)
 {
     StringBuilder IS = new StringBuilder();
     int i = 0;
     foreach (string Name in InjectionParameters.GetNames())
     {
         IS.Append(Convert.ToBase64String(Encoding.UTF8.GetBytes(Name))); IS.Append(":"); IS.Append(Convert.ToBase64String(Encoding.UTF8.GetBytes(InjectionParameters.Get(Name))));
         IS.Append("-");
         if (InjectionList.Contains(i))
         {
             IS.Append("1");
         }
         else
         {
             IS.Append("0");
         }
         IS.Append(";");
         i++;
     }
     return IS.ToString();
 }
Exemplo n.º 3
0
 internal static void UpdateMTHeaderFieldsWithUIHeadersParameters()
 {
     if (ManualTesting.CurrentRequest == null) return;
     Parameters TempHolder = new Parameters();
     if (ManualTesting.CurrentRequest.Headers.Has("Host"))
     {
         TempHolder.Set("Host", ManualTesting.CurrentRequest.Headers.Get("Host"));
     }
     if (ManualTesting.CurrentRequest.Headers.Has("Cookie"))
     {
         TempHolder.Set("Cookie", ManualTesting.CurrentRequest.Headers.Get("Cookie"));
     }
     ManualTesting.CurrentRequest.Headers.RemoveAll();
     foreach (DataGridViewRow Row in UI.MTRequestParametersHeadersGrid.Rows)
     {
         ManualTesting.CurrentRequest.Headers.Add(Row.Cells[0].Value.ToString(), Row.Cells[1].Value.ToString());
     }
     foreach (string Name in TempHolder.GetNames())
     {
         ManualTesting.CurrentRequest.Headers.Set(Name, TempHolder.Get(Name));
     }
     FillMTRequestHeaderFields(ManualTesting.CurrentRequest);
 }