PHP encryption and decryption thunder, FlashGet express, QQ whirlwind address
thunderbolt download mode is becoming more and more popular, the reason is not to do research, this article only studies the thunderbolt download address format, its format see below:
>! M -->thunder://QUFodHRwOi8vYmxvZy44MTA4MjIuY29tWlo=
begins with thunder://, followed by a string of irregular, indefinite long strings, and many friends are puzzled."
in my study, in fact, this is the application of the base64 coding method, as long as the use of Base64 for coding and decoding, the real download address of thunderbolt will be in the world.
PHP is built with Base64 function library. We can use PHP to encrypt and decrypt the thunderbolt download address. Use the above download address as an example:
after the prefix thunder:// is removed, the base64 decodes directly, echo base64_decode (.Quot; QUFodHRwOi8vaGkuYmFpZHUuY29tL2hhY2tsenRaWg==.quot;), and the output results are AAhttp://hi.baidu.com/hacklztZZ, and then the first and end AA and ZZ are removed. The address is.
[code].lt;? Php
$s='thunder://QUFodHRwOi8vZG93bjIuNTF5bG1mLmNuL0dIT1NUWFBTUDN5dWxpbm11ZmVuZ3podWFuZ2ppYmFuWU4xMy4wLmlzb1pa'; $url = preg_replace (.Quot; /^AA (*) ZZ$/.quot;.Quot; Under://'.base64_encode ('AA'.$url.'ZZ').' / '; echo (.Quot; $url\n$xl.quot;);
.Gt; [/code]
is a decoding method. It is easy to introduce the encoding method, download the address http://hi.baidu.com/hacklzt for example, add AA and ZZ to the first and end, and then attach the results to the results. The der:// prefix gets the final encoding result.
after study, FlashGet and QQ cyclones download address is also using the same method, different prefix or additional things are different. The encoding method for
Flashget is:.Quot; flashget://.quot; base64_encode (.Quot; [FLASHGET] loading address [FLASHGET].quot;)
QQ cyclones. That is to say.