Baidu Network disk on the browser to download large files to do some restrictions, when more than a certain size of the file must use the Baidu cloud housekeeper can download, which brings inconvenience to the user's use.
[Do not look at the analysis, please pull directly to the bottom of the page]
1. Baidu Network Disk speed limit principle
When you click on the download of a large file, Baidu network disk will pop up such a prompt box.
Let's give the next breakpoint and see what code created this prompt box.
Then click again to download a large file, we found that the breakpoint has broken down.
You can see that this is showing the prompt dialog, we need to look up the call stack to find out.
Skipping some jquery operations, we see a function that continues to look up.
This isplatformwindows branch is very suspicious, we follow up to see, so I canceled the DOM breakpoint, and the 1748 line here a breakpoint.
It's broken, let's go and see.
This function is simply a navigator.platform of the platform-related strings, let's modify it to see what happens.
Let the code keep running.
Well, we succeeded.
2. Write a snippet of code to crack it.
From the above debugging we already know that Baidu is to determine whether the Window.navigator.platform by Win32 start to determine if the browser is running the download, so we only need to modify this variable to easily remove the limit.
After trying I found that platform this attribute was frozen by Baidu.
So you can only modify navigator.
Modify the code as follows:
Object.defineproperty (this, ' Navigator ', {value: {platform: ""}});
A sentence summary:
Open the browser console (F12) on the command line line Object.defineproperty (this, ' Navigator ', {value: {platform: ""}}); This code can be lifted Baidu network disk on the browser to download large file restrictions.
Remove the restrictions on downloading large files from Baidu Cloud browser