aboutsummaryrefslogtreecommitdiffstats
path: root/examples/iframe_injector.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/iframe_injector.py')
-rw-r--r--examples/iframe_injector.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/iframe_injector.py b/examples/iframe_injector.py
index 7042dbab..42260a7e 100644
--- a/examples/iframe_injector.py
+++ b/examples/iframe_injector.py
@@ -3,16 +3,16 @@
from libmproxy.protocol.http import decoded
-def start(ctx, argv):
+def start(context, argv):
if len(argv) != 2:
raise ValueError('Usage: -s "iframe_injector.py url"')
- ctx.iframe_url = argv[1]
+ context.iframe_url = argv[1]
-def handle_response(ctx, flow):
+def handle_response(context, flow):
with decoded(flow.response): # Remove content encoding (gzip, ...)
c = flow.response.replace(
'<body>',
- '<body><iframe src="%s" frameborder="0" height="0" width="0"></iframe>' % ctx.iframe_url)
+ '<body><iframe src="%s" frameborder="0" height="0" width="0"></iframe>' % context.iframe_url)
if c > 0:
- ctx.log("Iframe injected!") \ No newline at end of file
+ context.log("Iframe injected!") \ No newline at end of file