Javaweb's Grab Bag Tour (ii): Grab Bag tool

Source: Internet
Author: User

When it comes to grabbing tools, many of our browsers have built-in grab kits and a lot of good plugins, and here's what I'm using: Charles. (When I say this tool, you may, oh, this is the AH, there are a bunch of tutorials on the web, but here I would like to use a number of examples).

As for Charles ' installation instructions, see the link: Charles using tutorial Guide

Next I'll talk about 3 examples: (Remember Charles Agent to open, mobile phone capture package, WiFi settings Agent)

  1. First, let's grab a news link from today's headline page to see the interface

    Clear the contents of Charles at this point, and wait a little more. Click on the link and we'll see what's on Charles.

    We want to select the sequence mode (request from the top down). When we click on the link, we send an HTTP request, request a Charles Proxy, and then forward it to the server, all of which we can see the data class capacity. Let's take a closer look.

    1. The picture on the red circle above has a ball, indicating that they click on the data request, some of the following picture signs, the request is a picture. We click on this link and see request,response below.
    2. See request: Below are headers (requested header information), cookies (requested cookies), Raw. Because it is a GET request, there is no form option. We click on Overview and we will see.

      You are not mistaken, the URL here is your request path, you directly click on this path will be directly into this page. Response CODE200 indicates a successful response. Method,kept alive and so on.
      3. Observe response:

      Below there are headers (response headers), some other options, because the response returned is HTML we clicked on HTML, the positive shows that we have correctly taken the content.
  2. We come to catch the mobile version of today's headlines, remember to connect to the computer WiFi, set up mobile WiFi information as follows: Proxy set to Manual, your host's IP, port that Charles's proxy port default 8888.
    Look at the information you want to grab:
    I'm going to catch a girl. What do you think about boys smoking?
    We can click this link to see:
    Let us analyze:

    1. host:60.29.248.126, it should be the top of the page. Their service IP address, their server project is hanging on the above (my personal guess Oh,) The response is a JSON string, their client based on the response of the JSON string, the corresponding parse, and then go to request data. There's a lot of encryption in there. (If you want to learn about it, you can study the returned JSON string, which contains all of the contents of his response, either a conversion or a request for a link.) )

    I'm going to grab my own data for an app:

    This is a simple login: we see host:192.168.191.1:8080. It should be my computer's Web server. Path: This is my request path, and the following request form is the parameter I requested. Phone,pwd. This request responds to a corresponding message (Xml,html,json is possible).

I grabbed QQ, they are encrypted, the process is very complex, interested can go to try.

This talk about here, there is a wrong place, the rookie hope you point out.

Next, HttpClient, and HttpClient's tool encapsulation class. After this, we can use Java to simulate the request, fetch the data, and analyze the data in the background.

Javaweb's Grab Bag Tour (ii): Grab Bag tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.