Trying to find out the origin of the HTTP request

The web application makes an HTTP request, and I cannot figure out how it does it. He does this right after drawing the page. There are no 302 in previous requests, and there is nothing obvious that will tell me how this request is made.

Which will help if I could set a breakpoint that would stop before sending the next HTTP request. Then, right after the page is drawn, I would turn it on and find out who sends it. Firebug allows me to do this for XHR (Ajax) requests, but not for regular requests. This is a normal HTTP request, not AJAX.

Can this be done with debugging tools in chrome or IE?

+6
source share
4 answers

First, how did I get it.

  • Javascript was disabled in the browser - the problem was still happening, it meant that I could control the sending of javascript.
  • Set the maximum number of connections on firefox to 1, this means that the requests were executed sequentially so that I could narrow down when / where the requests I could not explain the receipt of the sent ones.
  • Finally found an HTML video tag like this

:

<video id="my_video" class="video-js" width="313" height="240" controls="controls" preload="none" poster="#"> 

Part of poster="#" was the culprit. This sends a request to the containing page if there is no video to display.

+6
source

In Chrome DevTools, go to the Network panel. Find the corresponding resource by its name in the leftmost column and look at the Initiator column. It will indicate the object that initiated the loading of the resource. It can be a Script, in which case it will also contain a hyperlink to the corresponding script line that loads the resource. The same applies to the Parser initiator - it will provide you with a hyperlink to the corresponding HTML line if it is loaded by your resource.

+5
source

Chrome has a version of firebug. http://getfirebug.com/firebuglite

Fiddler supports HTTPS. This is only for Windows, but you did not specify the platform.

0
source
  • From what you say, if it's not XHR, this should be a JavaScript redirect from the previous page.
  • Disable JavaScript and look at the code, find the code, for example
    • location = ...
    • location.href = ...
    • window.location = ...
    • window.location.href = ... etc.
  • or something like <meta http-equiv="refresh" content="0;URL='http://example.com/'"> in the <head> HTML.
  • Using Tamper the Data , when the rigging, you can send one by one with a pause before each request.
  • In addition, you can use Fiddler to view all HTTP requests initiated by the browser and advanced debugging (see bp * commands)
  • You can also go to the Firebug Net panel and click "Persist" to watch all requests, even after redirecting.
0
source

Source: https://habr.com/ru/post/918106/


All Articles