Burp Suite User Forum

Create new post

Capturing and modifying javascript in the server response before page is displayed

Vincent | Last updated: Nov 09, 2017 05:04PM UTC

Hi, I'm trying to modify the Javascript code in the server response before it reaches my browser, but the problem I'm having is that the page loads in the browser while the Javascript is displayed on the Intercept tab. When modifying the Javascript and forwarding it, the browser still displays the page with the unmodified code. Why is that?

PortSwigger Agent | Last updated: Nov 09, 2017 05:06PM UTC

Hi Vincent, Thanks for your message. That's an interesting scenario. I wonder if they script is being loaded asynchronously? There's some information about async script loading here: - https://davidwalsh.name/html5-async You should be able to tell for sure if you review the code of the page that loads that JavaScript. If it is, one option would be to use a Match and Replace rule (in Proxy > Options) to modify the tag so the script loads synchronously Please let us know if you need any further assistance.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.