淘歌音乐 v2.0.49版本的 MD5 值为:49b2dab2d28afd9ea0c9c8648d644406
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.ss.android.downloadlib.a.d;
import android.text.TextUtils;
import android.util.Base64;
import com.ss.android.downloadlib.a.j;
import com.ss.android.downloadlib.f.i;
import com.ss.android.socialbase.downloader.g.c;
import com.ss.android.socialbase.downloader.g.e;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.json.JSONObject;
public class a {
public static void a(c cVar, long j, String str, String str2) {
if (cVar == null || j.e() == null) {
return;
}
String optString = j.i().optString("upload_secret_key");
if (TextUtils.isEmpty(optString)) {
return;
}
try {
final HashMap hashMap = new HashMap();
String str3 = j.j().b;
hashMap.put("from", str3);
String valueOf = String.valueOf(System.currentTimeMillis());
hashMap.put("timestamp", valueOf);
hashMap.put("signature", a(str3, valueOf, optString));
JSONObject jSONObject = new JSONObject();
jSONObject.put("ad_id", j);
jSONObject.put("log_extra", str);
jSONObject.put("download_url", cVar.j());
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("app_name", cVar.i());
jSONObject2.put("package_name", str2);
jSONObject2.put("package_size", cVar.am());
List<e> H = cVar.H();
if (H != null && !H.isEmpty()) {
Iterator<e> it = H.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
e next = it.next();
if (TextUtils.equals(next.a(), "User-Agent")) {
jSONObject2.put("User-Agent", next.b());
break;
}
}
}
jSONObject.put("request_info", jSONObject2.toString());
hashMap.put("info", jSONObject.toString());
com.ss.android.downloadlib.e.a().b(new Runnable() {
@Override
public void run() {
j.e().a("POST", "https://i.snssdk.com/inspect/aegis/client/app/resend/", hashMap, null);
}
});
} catch (Exception unused) {
}
}
private static String a(String str, String str2, String str3) {
try {
return Base64.encodeToString(i.a((str + "|" + str2).getBytes(), str3.getBytes(), "HmacSHA1"), 2);
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
}