Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Fiddler package grabbing tool for Java

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how Java uses the Fiddler package grab tool. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

one。 Download and install Fiddler

It is strongly recommended that you download and install it on the official website, and attach the link https://www.telerik.com/fiddler here. Installing it elsewhere will probably give you a bunch of unnecessary software (junk family buckets). After downloading and installing, the page looks like this:

two。 Set the crawl HTTPS function

After downloading and installing, crawling HTTPS protocol is not supported by default. If you want to crawl HTTPS

Click Tools-Options-HTTPS in the upper left corner first

Then select these three options

Then click Actions-Export Root Certificate to Desktop, and the file will appear on the desktop:

We close Fiddler, and then we need to import the certificate on the browser (the file above). Take Google browser as an example: click Settings-Security and Privacy Settings-Security-manage certificates:

Just import the certificate generated on the desktop in the trusted root certificate authority. Finally, we can reopen Fiddler to capture the HTTPS protocol.

three。 Attempt to crawl HTTP/HTTPS protocol

HTTPS is also an application layer protocol based on HTTP, but it is encrypted on the basis of HTTP. Fiddler will automatically help us decrypt and restore to the original HTTP.

If we open a random page (take Sogou as an example), we will see the following information on the left page of Fiddler:

In this left-hand list, each item is a request + corresponding to the crawled HTTP/HTTPS, and in most cases there is a request + corresponding (unless the other server is down). If you select any of these items, you can observe the detailed format and specific information of the request and related responses (if you think there are too many contents, you can select one of them and press and hold ctrl+a to select all. Then press and hold delete to delete them all)

The content displayed in blue is the request + response of the Sogou search page.

Let's double-click Inspectors:

The upper right corner shows the detailed format of the HTTP request (as shown above)

The lower right corner shows the detailed format of the HTTP response (as shown above)

Finally, we click on the raw above to see the raw data of the request and response:

Note, however, that the raw data of the request is used to write directly to the TCP socket to form the HTTP request.

But the raw data we see in response is actually compressed data (network bandwidth is a high-cost resource, compressed and transmitted, can save network bandwidth, improve efficiency and reduce cost), so we need to click on the decompression above before we can see the HTTP response data read from TCP socket.

After decompression, it is as follows:

four。 The principle of bag grabbing tool

Fiddler is equivalent to a "proxy". When the browser visits the browser page, it will send the HTTP request to Fiddler,Fiddler and then forward the request to the browser's server. When the browser server returns the data, the Fiddler will get the return data and then give the data to the browser. Therefore, Fiddler is very clear about the data details of the interaction between the browser and the browser server, which can help us to complete the corresponding packet capture work.

This is the end of this article on "how Java uses Fiddler package grab tool". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 269

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report