Exemplo n.º 1
0
		public tactical_proxy_console ()
		{
			_ram = new server_plugin_manager("proxy-request");
			_cam = new server_plugin_manager("proxy-protocol");
			_p = new http_proxy (8080,_ram, _cam);
			_ss.AddSettings (_p.Settings);
			_ss.AddSettings (_cam.Settings);
			_ss.AddSettings (_ram.Settings);
			_p.UriStarted += HandleUriStarted;
			_p.Start();
			Console.Title = "tactical proxyc: Listening on port: " + _p.Port.ToString();
			Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) {
				Console.WriteLine("Bye..");
				_display = false;
				_p.Stop();
			};
		}
Exemplo n.º 2
0
	public tacticalProxy (): base (Gtk.WindowType.Toplevel)
	{
		_reqam = new server_plugin_manager("proxy-request");
		_resam = new server_plugin_manager("proxy-response");
		_cam = new server_plugin_manager("proxy-protocol");
		_p = new http_proxy (8080,_reqam, _resam, _cam);
		_ss.AddSettings (_p.Settings);
		_ss.AddSettings (_cam.Settings);
		_ss.AddSettings (_reqam.Settings);
		_ss.AddSettings (_resam.Settings);
		_p.UriStarted += new http_proxy.ObjDelagate (onUriStarted);
		_p.UriComplete += onUriCompleted;
		this.WidthRequest = 800;
		this.HeightRequest = 600;

		Build ();

		#region Build Toolbar

		toggle_listening = toolbar.create_togglebutton_stock_image("gtk-media-play","Toggle Listening");
		toggle_listening.ShowAll();
		toggle_listening.Toggled += OnMediaPlayAction2Activated;
		toolbar3.add_tool(toggle_listening);

		ToggleButton toggle_record = toolbar.create_togglebutton_stock_image("gtk-media-record","Toggle Capture");
		toggle_record.ShowAll();
		toggle_record.Toggled += OnMediaRecordActionActivated;
		toolbar3.add_tool(toggle_record);

		toolbar3.add_tool(new VSeparator());

		toolbar3.add_tool(new Label("Filters:"));
		_fc = new filter_combo(_fs);
		_fc.Sensitive = false;
		_fc.Changed += filter_changed;
		toolbar3.add_tool(_fc);

		new_filter = toolbar.create_button_stock_image("gtk-add", "Add Filter");
		new_filter.Sensitive = false;
		new_filter.ShowAll();
		new_filter.Clicked += OnFindActionActivated;
		toolbar3.add_tool(new_filter);

		remove_filter = toolbar.create_button_stock_image("gtk-delete","Remove Filter");
		remove_filter.Sensitive = false;
		remove_filter.ShowAll();
		remove_filter.Clicked += delegate(object sender, EventArgs e) {
			_fs.remove_filter(_fc.ActiveText);
		};

		toolbar3.add_tool(remove_filter);

		toolbar3.add_tool(new VSeparator());

		scroll_lock = toolbar.create_togglebutton_stock_image("gtk-goto-bottom", "Scroll Lock");
		scroll_lock.ShowAll();
		scroll_lock.Toggled += delegate(object sender, EventArgs e) {
			proxy_transaction_nodeview1.scroll_lock = scroll_lock.Active;
		};
		scroll_lock.Active = true;
		toolbar3.add_tool(scroll_lock);

		#endregion

		proxy_transaction_nodeview1.add_actions(_reqam.get_actions());
		proxy_transaction_nodeview1.context_changed += delegate(object sender, EventArgs e) {
			scroll_lock.Active = false;
		};
	}