How to use Baidu network disk second transmission link and its realization principle

In order to prevent the sharing link from being maliciously reported, some resource providers have begun to share in the form of second-pass links. This article explores the principles of instant link extraction and introduces simple usage.

how to use

Skip to the next section for the rationale.

Install extensions and scripts (both 1 and 2 are required, not one of the two)

  1. Install extension components (required)
    • For Chrome and equivalent shell browsers, install the Tampermonkeyextension.
    • For the FireFox browser, you can install the Tampermonkeyextension or Greasemonkey, the former is recommended.
      The oil monkey component allows you to insert additional js code in the browser to freely define the display and operation mode of web pages, and provides common interface encapsulation, which is convenient for development.
  2. Install the oil monkey script (required)
    The commonly used second-pass extraction script is mengzonefire-second-pass link extraction . After clicking the link, click Install on the page.
    Note that after clicking the installation, the Oil Monkey extension will pop up a prompt whether to install it, click Install.

Extract link

Access in the logged-in state, pan.baidu.comthere will be a button on the network disk toolbar 秒传链接:

Click this button, paste the second pass link and click OK.

principle

I have a second link starting with de0276e5f63e27f6604903727c299e7d, how is it used? First take a look at this link in its entirety:

de0276e5f63e27f6604903727c299e7d#1f5cfb6422675ae224739b496c3ea54c#202703879#/mirrornorabbit2.zip
Text

In this link, it is #divided into four parts separated by a sign:

  • file MD5
  • First 256 KiB MD5
  • file size (bytes, B)
  • file name

We all know that for the same file, Baidu Netdisk does not store a separate copy for each user, that is, only one copy of the file is kept on the server.

When a user deletes a file, the network disk only deletes the user's access rights to the file, and the physical file is not deleted, which is why we have "second upload" when uploading.

The principle of Baidu network disk second transfer is to verify the above two MD5 and file sizes. If they are consistent, the dump operation is performed. Of course, this is not my nonsense, because the API list of Baidu PCS has the following description:

Due to interface permissions and other issues, our commonly used dump scripts do not use the rest api interface, but directly use the Baidu network disk web-side self-use interface. It is very simple to verify this interface, just find a shared file and upload it on the web version Baidu network disk and monitor the network:

To sum up, the Miaochuan link uses the Baidu network disk Miaochuan interface to save the necessary parameters as strings in a specific format to achieve the purpose of distribution and transfer.

At present, there are several common second-pass link formats, but they are all similar, and they all have the same parameters after decoding.

Key words

How to use Baidu's second link

Citations

  1. [yeeach][yeeach] How to create and use Baidu Miaochuan links
2. [About the script installation of the second link](https://shimo.im/docs/Jqf8y260KuofSb4K)
  1. Original link

Guess you like

Origin blog.csdn.net/david2000999/article/details/119192762