From 55b95d70b24cfa1b4703ae442a3c6d1781cc95aa Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 20 Oct 2022 21:57:47 +0200 Subject: [proxy] rework internal HTTP headers representation --- src/hydrilla/proxy/state_impl/concrete_state.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/hydrilla/proxy/state_impl') diff --git a/src/hydrilla/proxy/state_impl/concrete_state.py b/src/hydrilla/proxy/state_impl/concrete_state.py index 83522cf..c28e360 100644 --- a/src/hydrilla/proxy/state_impl/concrete_state.py +++ b/src/hydrilla/proxy/state_impl/concrete_state.py @@ -223,6 +223,15 @@ class ConcreteHaketiloState(base.HaketiloStateWithFields): item = web_ui_landing_factory ) + mitm_it_page_pattern = 'http://mitm.it/***' + mitm_it_page_factory = policies.MitmItPagePolicyFactory() + + parsed_pattern, = url_patterns.parse_pattern(mitm_it_page_pattern) + new_policy_tree = new_policy_tree.register( + parsed_pattern = parsed_pattern, + item = mitm_it_page_factory + ) + # Put script blocking/allowing rules in policy tree. cursor.execute('SELECT pattern, allow_scripts FROM rules;') -- cgit v1.2.3