admin管理员组文章数量:1552303
把普通链接转为迅雷、旋风、快车链接(过程返过来就可以把迅雷、旋风、快车链接变成普通链接)
关于迅雷、快车、超级旋风下载地址加密算法都是通过base64算法加密,只不过在加密前后做了一些特别的标志。Base64编码是一种加密算法
1、 迅雷专用链接编码
原地址为:http://im.baidu/install/BaiduHi.exe
a 在原地址前面加"AA",后面加"ZZ"(不包括引号),地址变为:AAhttp://im.baidu/install/BaiduHi.exeZZ
b 此地址base64编码为:
QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQmFpZHVIaS5leGVaWg==
c 迅雷专链即在上地址前加thunder://,即:
Thunder://QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQ mFpZHVIaS5leGVaWg==
2、 快车专用链接编码
a 在原地址前后都加上"[FLASHGET]"(不包括引号),地址变为:[FLASHGET]http://im.baidu/install/BaiduHi.exe[FLASHGET]
b 此地址base64编码为:
W0ZMQVNIR0VUXWh0dHA6Ly9pbS5iYWlkdS5jb20vaW5zdGFsbC9CYWlkdUhpLmV4ZVtGTEFTSEdFVF0=&yinbing1986
c 快车专链即在上地址前加flashget://,注意后面还要加上"&符号",符号怎么得出不清楚,在最后后面加的是个人信息,可加可不加。
Flashget://W0ZMQVNIR0VUXWh0dHA6Ly9pbS5iYWlkdS5jb20vaW5zdGFsbC9CYWlkdUhpLmV4ZVtGTEFTSEdFVF0=&yinbing1986
注意: 在把快车专用链接变成普通链接时,要取[FLASHGET]之间的信息。
3、 旋风专用链接编码
a 旋风相对就简单多了,将原地址直接base64编码为
aHR0cDovL2ltLmJhaWR1LmNvbS9pbnN0YWxsL0JhaWR1SGkuZXhl
b 旋风专链即在上地址前加qqdl://,即
qqdl://aHR0cDovL2ltLmJhaWR1LmNvbS9pbnN0YWxsL0JhaWR1SGkuZXhl
4、 知道其原理后,要解密起来就有了方法,但是有没有最直接的方法呢?有
打开网址http://tool.114la/code/urlconvert/
Base64编码与解码网址: http://base64.xpcha/
代码如下:
import java.io.IOException;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* 转化qq旋风、迅雷、快车的专用下载链接为普通http的下载链接 * 如果找不到 sun.misc.BASE64Decoder 类,用以下步骤可解决
* 右键项目-》属性-》 java bulid path-》jre System Library-》access rules-》resolution选择
* accessible,下面填上** 点击确定即可!!! *
*
* @author Jcking
*/
public class Turn2HTTP {
// public static final String preUrl = "qqdl://aHR0cDovL2Rvd24ucXEuY29tL3NnL2Z1bGwvc2dfRnVsbFZlcnNpb25fMS4xLjU4LmV4ZQ==";
// public static final String preUrl = "Thunder://QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQmFpZHVIaS5leGVaWg==";
public static final String preUrl = "Flashget://W0ZMQVNIR0VUXWh0dHA6Ly9pbS5iYWlkdS5jb20vaW5zdGFsbC9CYWlkdUhpLmV4ZVtGTEFTSEdFVF0=&yinbing1986";
public static final String divider = "//";
private void turn(String url) {
String head = url.substring(0, url.indexOf(divider));
String content = url.substring(url.indexOf(divider) + divider.length());
String result = "";
if ("qqdl:".equalsIgnoreCase(head)) {
// 为qq旋风链接
result = qqdl2http(content);
} else if ("thunder:".equalsIgnoreCase(head)) {
// 为迅雷链接
result = thunder2http(content);
} else if ("flashget:".equalsIgnoreCase(head)) {
// 为快车链接
result = flashget2http(content);
}
System.out.println(result);
}
private String qqdl2http(String url) {
try {
byte[] bytes = new BASE64Decoder().decodeBuffer(url);
String result = new String(bytes);
return result;
} catch (IOException e) {
return null;
}
}
private String thunder2http(String url) {
try {
byte[] bytes = new BASE64Decoder().decodeBuffer(url);
String result = new String(bytes);
//左闭右开
result = result.substring(2, result.length() - 2);
return result;
} catch (IOException e) {
return null;
}
}
private String flashget2http(String url) {
String flag = "[FLASHGET]";
try {
byte[] bytes = new BASE64Decoder().decodeBuffer(url);
String result = new String(bytes);
result = result.substring(flag.length(), result.lastIndexOf(flag));
return result;
} catch (IOException e) {
return null;
}
}
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("Turn2HTTP");
String url = "http://im.baidu/install/BaiduHi.exe";
String preUrl = Turn2SpecialLink.http2flashget(url);
System.out.println(preUrl);
new Turn2HTTP().turn(preUrl);
}
}
import java.io.IOException;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* 普通链接转为特殊链接,如迅雷,快车,旋风
*
* @author huangqunyan
*
*/
public class Turn2SpecialLink {
// private String url = "http://im.baidu/install/BaiduHi.exe";
public static String http2qqdl(String url) {
String result = new BASE64Encoder().encode(url.getBytes());
return "qqdl://" + result;
}
public static String http2thunder(String url) {
String urlStr = "AA" + url + "ZZ";
String result = new BASE64Encoder().encode(urlStr.getBytes());
return "thunder://" + result;
}
public static String http2flashget(String url) {
String urlStr = "[FLASHGET]" + url + "[FLASHGET]";
String result = new BASE64Encoder().encode(urlStr.getBytes());
return "Flashget://" + result +"&qanyan";
}
public static void main(String[] args) {
String url = "http://im.baidu/install/BaiduHi.exe";
System.out.println(Turn2SpecialLink.http2flashget(url));
System.out.println(Turn2SpecialLink.http2thunder(url));
System.out.println(Turn2SpecialLink.http2qqdl(url));
}
}
版权声明:本文标题:普通链接与迅雷、旋风、快车链接相互转化的步骤 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1727282169a1106486.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论