Reverse Engineering "Your Instructions for Use" Notes

It was April 3, 2018. I, along with a few classmates, took a small test on NetEase Cloud Music.
The background of the test is this: enter the username and gender, select the gender, and do six questions. The question is to listen to a piece of music and choose from three options which you think is the closest. After completing the question, you will get a picture with your instruction manual and three words.
In the next few days, my teacher, Mr. Yang, gave me a task: to reverse engineer the code of the NetEase Cloud Music test.
I tried it a few times first, and I felt that the answers I got were quite different. I roughly estimated that the exhaustive workload was endless, and I gave up exhaustion.
Afterwards. Look at the code with Google Chrome. Looking at the folder, I saw the folder where the problem picture material is stored. The number is up to 15 (later I learned that there are 16), a total of six. So I guess, the question is randomly generated from 15 questions.
The code is html calling two pieces of js. I didn’t read it at first. After the teacher suggested to use Astyle, I found a js code formatting tool on Baidu. Brother Hua said that browsers* (chrome and firefox) have pretty print functions. You can read the code line by line. At this point I know very little about the language JavaScript.
I first wandered through the code aimlessly. More than 20,000 lines, the first big gain is to find the text of the manual. There are a total of 66 articles, my darling, this is exhaustive, and it has to be exhausted until the year of the monkey and the month of the horse.
The next step is to search in the code with various keywords and travel. Notepad++ looks at the code very well. A more powerful keyword is "spec", which refers directly to the results. Then I tried to find some variables and functions of intermediate results, but I didn't find the end. The code is obfuscated, many variable names are n, N, A, a, U, u. The function names are also messed up.
At this point, it was a bit of a breakdown. One of the suggestions the teacher gave me was to modify the code in two parts and debug it. It is said that firefox has such a function, but I have not found a plug-in that supports this function.
Then I learned JavaScript for two days. It is found that it is only a programming language, it is also scoped, and it is also necessary to define functions. The mystery of the beginning is gone, and the belief that it will be made one day.
Yesterday, I downloaded the code locally, but it didn't work as I expected. I don't know much about the operating environment of this website.
Finally today, I found the logic for judging spec near the keyword spec. Yes, it has nothing to do with which songs you listen to and which options you choose, but it has a little to do with gender. The 66 specs can be divided into several different categories according to their labels and genders. The check function determines whether they can be selected. See the picture for details. It is worth mentioning that there is an attribute in the spec option called foodie, which can be translated into Chinese as "foodie". After the text is generated, it needs to be converted into a picture. But I can't figure out how to convert it into a picture. Maybe that function is not in this file.



Teacher Yang reminded me to keep a journal for long-term work. I recorded two out of eight days. Looking forward to my progress on the next job.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324456429&siteId=291194637