Ctrip Travel APP crawler, collect reverse analysis of hotel price agreement

Foreword:

        Recently, I clicked on the Ctrip APP agreement to obtain the price of each hotel room through the agreement. There is a certain demand, a mess, and finally a slap in the face.

Reverse process (work hard):

        1. Determine the communication method: Let’s capture the packet first, but...the packet can’t be captured with fiddler, it’s interesting! According to past experience, after one-pass analysis, I felt that WebSocket was used, and then I started coding (a huge mistake was committed here). After the coding was completed, I discovered that the communication did not use a special WebSocket at all. I have no choice but to analyze it again and finally make sure to use the self-built Socket protocol! ! ! ! ! ! I want to cry without tears, so the hard truth is: don’t rush the coding guy!

        Two: socket sending and receiving position of the message: since it has been determined that the packet is sent and received through the socket, first determine the position of the receiving and sending package, decompile the apk with jadx, search the socket, and finally determine the position of the receiving message:

Guess you like

Origin blog.csdn.net/nanxiaotiantian/article/details/109519375