/// <summary>
        /// Creates a new InspectorPipelineCommand.
        /// </summary>
        /// <param name="clientSettings"> The HTTP Properties.</param>
        /// <param name="proxySettings"> The HTTP Proxy settings.</param>
        /// <param name="httpState"> The HTTP State.</param>
        /// <param name="callback"> The callback method.</param>
        public InspectorPipelineCommand(HttpProperties clientSettings, HttpProxy proxySettings, HttpState httpState, Delegate callback)
        {
            Initialize();

            inspectorPipeline.ClientSettings = clientSettings;
            inspectorPipeline.ProxySettings = proxySettings;
            HttpStateData = httpState;
            CallbackMethod = callback;
        }
コード例 #2
0
        /// <summary>
        /// Creates a new proxy dialog.
        /// </summary>
        /// <param name="proxySettings"> The proxy settings.</param>
        public ProxyDialog(HttpProxy proxySettings)
            : this()
        {
            this.ProxySettings = proxySettings;

            if ( this.ProxySettings != null )
            {
                this.txtProxyUrl.Text = proxySettings.ProxyUri;
                this.chkBypassLocal.Checked = proxySettings.BypassOnLocal;
            }
        }
コード例 #3
0
        /// <summary>
        /// Creates a new SoftTestCommand.
        /// </summary>
        /// <param name="url"> The url to apply the test.</param>
        /// <param name="form"> The form to apply the tests.</param>
        /// <param name="proxySettings"> The http proxy settings.</param>
        /// <param name="httpProperties"> The http settings.</param>
        /// <param name="sqlTest"> The sql test to use.</param>
        /// <param name="xssTest"> The xss test to use.</param>
        /// <param name="bufferLength"> The buffer overflow length to use.</param>
        public SoftTestCommand(Uri url,
			HtmlFormTag form,
			HttpProxy proxySettings,
			HttpProperties httpProperties,
			string sqlTest,
			string xssTest,
			int bufferLength)
            : this()
        {
            this._xssSignature = xssTest;
            this._sqlSignature = sqlTest;
            this._bufferLen = bufferLength;

            this.Url = url;
            this.FormTag = form;
            this.Proxy = proxySettings;
            this.ProtocolProperties = httpProperties;

            //			updateElementNames.Add("__VIEWSTATE");
            //			updateElementNames.Add("__EVENTTARGET");
        }
コード例 #4
0
        /// <summary>
        /// Loads the proxy dialog options.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoadProxyOptions(object sender, EventArgs e)
        {
            ProxyDialog proxyDialog = new ProxyDialog(this.ProxySettings);
            proxyDialog.IsProxySettingSet = this.IsProxyEnabled;
            proxyDialog.ShowDialog();
            if ( proxyDialog.IsProxySettingSet )
            {
                this.IsProxyEnabled = proxyDialog.IsProxySettingSet;
                this.ProxySettings = proxyDialog.ProxySettings;
            }

            proxyDialog.Close();
        }
コード例 #5
0
 /// <summary>
 /// Sets the Proxy
 /// </summary>
 /// <param name="hwr"> The HttpWebRequest type.</param>
 /// <param name="proxySettings"> The HttpProxy settings type.</param>
 protected void SetProxy(HttpWebRequest hwr, HttpProxy proxySettings)
 {
     if ( proxySettings.Credentials == null )
     {
         hwr.Proxy = new WebProxy(proxySettings.ProxyUri,proxySettings.BypassOnLocal);
     }
     else
     {
         hwr.Proxy = new WebProxy(proxySettings.ProxyUri,proxySettings.BypassOnLocal, proxySettings.BypassList, proxySettings.Credentials);
     }
 }
コード例 #6
0
        /// <summary>
        /// Sets the proxy settings.
        /// </summary>
        private void SetProxy()
        {
            if ( this.txtProxyUrl.Text.Length > 0 )
            {
                proxyUri = this.txtProxyUrl.Text;

                this.ProxySettings = new HttpProxy();
                this.ProxySettings.ProxyUri = proxyUri;

                this.ProxySettings.BypassOnLocal = this.chkBypassLocal.Checked;

                if ( (username != String.Empty) || (password != String.Empty) || (domain != String.Empty) )
                {
                    this.ProxySettings.SetProxyAuthentication(username,password,domain);
                }
                else
                {
                    if ( (username != String.Empty) || (password != String.Empty) )
                    {
                        this.ProxySettings.SetProxyAuthentication(username,password);
                    }
                    else
                    {
                        // public proxy settings
                        this.ProxySettings.SetPublicProxy();
                    }
                }
            }
            else
            {
                if ( this.ProxySettings!=null )
                    this.ProxySettings = null;
            }
        }