昨天想要下載個CS來玩,結果發現好多下載鏈接都是迅雷的鏈接的。
心頭一陣無名火起,於是想要弄一個迅雷地址的解碼器出來。
其實網上已經有好多這樣的在線解碼網站了,我弄出這個來純屬娛樂。
前段時間在論壇的時候有人發了個非常二的帖子,就是用base64編碼的。然後就知道了還有base64這麼個好玩的東西。
現在一看迅雷的下載鏈接,感覺和base64異常的相似。
迅雷的下載鏈接一般都是thunder://xxxxxxxxxx;後面是一大串形似亂碼的東西,其實這個不是亂碼,只不過是是用base64加密過的url地址而已。
我抱着試試看的態度,base64 -d了一下,嘿,還真對得起咱這張臉。
出來了個AAhttp://xxxxxZZ形式的鏈接。
看來迅雷就是在鏈接的頭尾加上了AA和ZZ之後再用base64加密了一下。
既然原理搞清楚了,那麼接下來的事情就非常好辦了。
同理可破解快車的下載鏈接。
下面是源碼,各位大牛請多指正。
=====================分割線==========================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class ThunderDecoder extends JFrame
{
JPanel panel_1 = new JPanel();
JButton decode = new JButton("解碼");
JLabel label_1 = new JLabel("鏈接地址:(包括thunder://)");
JLabel label_2 = new JLabel("解碼結果:");
JTextField tf_1 = new JTextField();
JTextField tf_2 = new JTextField();
String thunder = "";
String code = "";
String url = "";
public ThunderDecoder()
{
super("迅雷地址解碼器");
setSize(400,300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container c = getContentPane();
c.setLayout(null);
c.add(panel_1);
panel_1.setBounds(0, 0, 400,300);
panel_1.setLayout(null);
panel_1.add(label_1);
label_1.setBounds(5,5,300,20);
panel_1.add(tf_1);
tf_1.setBounds(5,30,300,20);
tf_1.setEditable(true);
panel_1.add(label_2);
label_2.setBounds(5,80,300,20);
panel_1.add(tf_2);
tf_2.setBounds(5,105,300,20);
tf_2.setEditable(true);
BHandler h = new BHandler();
panel_1.add(decode);
decode.setBounds(100,160,100,30);
decode.addActionListener(h);
setVisible(true);
}
class BHandler implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
thunder = tf_1.getText();
code = thunder.substring(10);