Skip to content

Commit

Permalink
1、修复不知名原因的下载失败bug
Browse files Browse the repository at this point in the history
2、修复图片无法下载
  • Loading branch information
nining377 committed Feb 18, 2021
1 parent b4993a9 commit dab59a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Object urlObj = httpUrl.get(request);
//加了一个反营销版权保护的URL,暂时作用未知
if (urlObj.toString().contains("appcustomconfig/get") || (removeAd && (urlObj.toString().contains("api/ad") || urlObj.toString().endsWith(".jpg") || urlObj.toString().endsWith(".mp4"))) || (removeUpdate && (urlObj.toString().contains("android/version") || urlObj.toString().contains("android/upgrade")))) {
if (urlObj.toString().contains("music.126.net"))
return;
Field url = urlObj.getClass().getDeclaredField(urlFieldString);
boolean urlAccessible = url.isAccessible();
url.setAccessible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public DownloadMD5Hook() {
protected void beforeHookedMethod(MethodHookParam param) {
final Object[] array = (Object[]) param.args[3];
String path = param.args[0].toString();
if (((String) array[5]).length() == 32) {
if (((String) array[5]).length() == 32)
return;
}
array[5] = fileToMD5(path);
param.args[3] = array;
}
Expand Down

0 comments on commit dab59a5

Please sign in to comment.