aHR0cCUzQS8vemhpc2h1LmJhaWR1LmNvbS92Mi9tYWluL2luZGV4Lmh0bWwlMjMvdHJlbmQvJTI1RTglMjU4NSUyNUJFJTI1RTglMjVBRSUyNUFGJTNGd29yZHMlM0QlMjVFOCUyNTg1JTI1QkUlMjVFOCUyNUFFJTI1QUY=
I wrote a lot of articles about encryption parameter encryption. Today I wrote an article about return value decryption for your reference.
Let’s take a look at the results that need to be analyzed. You can see that the page has two values: the time axis and the index value. Now we are going to grab the value of the index axis.
After a simple analysis, we see that the following request has a string of data
values returned in the form of ciphertext. We boldly guess that this is the encrypted return result. There must be decryption logic on the page to decrypt this data
You can see that the encrypted result has 3 segments, namely pc
, all
and wise
. The decryption logic here should be the same, so we only need to analyze one.
Searching for key times such as data
, pc
, wise
, etc., did not find the encryption logic, and tried the xhr
breakpoint, but did not find the decryption logic.
By referring to the articles of
Rare Cow Data
I have written before, as well as the ideas that I mentioned in some of the basic articles I have written before, which can be located by searching the keywords ofencryption and decryption
Suddenly it occurred to me that there is a decryption keyword decrypt
, you can try again
Sure enough, I found the following results
I chased in and hit the breakpoint, it really is the logic we need (I hope all front-end engineers can write comments)
You can also find the upper level of logic through the stack to confirm
The logic is very clear, let’s just copy it and see if we can decrypt it
After all, the logic is very simple
This logic can also be copied into the Python
version
def decrypt_data(password, data):
n =list(password)
i =list(data)
a ={}
result =[]
ln =int(len(n)/2)
start = n[ln:]
end = n[:ln]for j, k inzip(start, end):
a.update({k: j})for j in data:
result.append(a.get(j))return''.join(result)
That’s all for today, let’s meet again next time~
[ Finish]