Others are robbing Moutai, but I have learned the technology

origin

The concept of "grabbing Moutai" started when I saw a picture of a friend posting two bottles of 53-degree Feitian Moutai in the circle of friends. Out of curiosity, I asked a friend, and he said that these two bottles can earn more than 1,000 yuan. From then on, I also started the road to grab Moutai.

The first time I snatched Moutai was the afternoon of Double Twelve. I opened JD.com and found that Moutai could be snatched at 6 p.m. After tasting the sweetness, I turned on my mobile phone at 10:00 every morning to buy it. After persisting for a few days, I accidentally grabbed a second bottle. I felt that it was really easy to buy it.

One day, an official account I followed pushed an introduction to a github project that snatched Moutai scripts. I couldn’t help but searched on GitHub myself, found several snatching Moutai scripts, and finally chose one that I was familiar with. The Moutai-grabbing code written in the language, after compiling by myself, happened to free up one bottle of my two-bottle limit, the program ran, and the snatching was successful in the first second.

That is to say, when the first bottle of the software was snapped up successfully, the author of GitHub removed the code out of risk considerations.

start research

So I felt a shortcut, and started to capture packets by myself and analyze the program logic.

In the first week after that, JD.com came up with a risk control strategy, which was especially familiar in the Moutai group, and the returned content was empty. In fact, it was the famous init interface. This interface began to return empty or was 302 to other web pages. The content returned by this interface is user information, product information, and token, which are all necessary parameters for submitting an order, so this threshold has killed a group of people. However, after a few days of capturing the package, I found the problem and optimized a version by myself, but I didn't rush to buy the quota, so I waited silently for the quota to recover.

In the second week after that, JD.com updated again, adding four parameters, the most powerful one being the sk parameter, which was generated by a confusing js file, so out of curiosity, I started to study js reverse, and finally By studying the rules, writing a program to resolve the confusion, successfully found the generation rules of sk, and just updated the code itself.

the rules have changed

Today, my account finally regained the qualification to buy a bottle. When I was gearing up for a big fight tomorrow, the rules of the Jingdong Moutai store changed!

There are three places where the rules have changed. In the first place, only the mobile app can be used for snap-up (that is, the program that simulated the packet capture process on the computer side before is invalidated); in the second place, not only plus members can snap up, but ordinary members can also snap up; In the third place, the rush-buying time has been changed, the rush-buying appointment at 10:00 has changed to 12:00.

insert image description here

Lost this round but learned a lot

Although the Jingdong computer terminal snatched the Moutai software and researched it by myself, it didn’t come in handy in the end, but I feel that I have learned a lot in this process, such as data capture analysis, several libraries in the Go project such as gjson, etc., which are really easy to use , and the reverse process of those js, although the process of extracting js is uncomfortable, but in the process, I learned a lot of knowledge.

diverge your thinking

  1. Jingdong actually has other things that can be done with this logic
  2. In fact, the mobile terminal can also be simulated, and the threshold is a little higher.
  3. The new release time and rules have changed, the scalpers are on the same starting line as everyone, and tomorrow is the chance to buy manually
  4. The logic of other platforms, if you have time, you can also do a set

The fun of programmers is so unremarkable. If you are interested, just ignite it, and learn the technology while playing.

insert image description here

Guess you like

Origin blog.csdn.net/dtwangquan/article/details/113487055