360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2
以下内容为反编译后的 iLIILLILliiII.java 源代码,内容仅作参考
package LLLilI;
import android.content.Context;
import android.content.pm.PackageManager;
import android.util.Log;
import com.anythink.expressad.foundation.g.a;
import com.anythink.expressad.foundation.g.f.g.b;
import com.google.android.gms.common.util.AndroidUtilsLight;
import com.google.android.gms.common.util.Clock;
import com.google.android.gms.common.util.DefaultClock;
import com.google.android.gms.common.util.Hex;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import java.util.HashMap;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.json.JSONObject;
public final class iLIILLILliiII {
public static final int[] f880iiL = {2, 4, 8, 16, 32, 64, 128, 256};
public static final Pattern lllLL = Pattern.compile("^[^:]+:([0-9]+):(android|ios|web):([0-9a-f]+)");
public final Context IiILLLILLilLl;
public final iiIlllLIi IllLLLIil;
public final ScheduledExecutorService IllLl;
public final iliiIilIilLilIi.iiIlllLIi LIiIl;
public final iIi LlllL;
public final Set f881iL;
public final illli iiiIil;
public final iIiiiiiiLI.i iiilLllli;
public int f882lLi;
public boolean IiiLIIlLiLLlLL = false;
public final Random ILiIiliL = new Random();
public final Clock IiliIiIil = DefaultClock.getInstance();
public final String iiLIIlIILiILilI = "firebase";
public boolean IilIL = false;
public boolean lIlILilLLLlIi = false;
public iLIILLILliiII(iliiIilIilLilIi.iiIlllLIi iiillllii, iIiiiiiiLI.i iVar, illli illliVar, iiIlllLIi iiillllii2, Context context, Set set, iIi iii, ScheduledExecutorService scheduledExecutorService) {
this.f881iL = set;
this.IllLl = scheduledExecutorService;
this.f882lLi = Math.max(8 - iii.IiiLIIlLiLLlLL().f876iL, 1);
this.LIiIl = iiillllii;
this.iiiIil = illliVar;
this.iiilLllli = iVar;
this.IllLLLIil = iiillllii2;
this.IiILLLILLilLl = context;
this.LlllL = iii;
}
public static void IiiLIIlLiLLlLL(HttpURLConnection httpURLConnection) {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
try {
httpURLConnection.getInputStream().close();
if (httpURLConnection.getErrorStream() != null) {
httpURLConnection.getErrorStream().close();
}
} catch (IOException unused) {
}
}
}
public static boolean IilIL(int i2) {
return i2 == 408 || i2 == 429 || i2 == 502 || i2 == 503 || i2 == 504;
}
public static String IllLl(InputStream inputStream) {
StringBuilder sb = new StringBuilder();
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
sb.append(readLine);
}
} catch (IOException unused) {
if (sb.length() == 0) {
return "Unable to connect to the server, access is forbidden. HTTP status code: 403";
}
}
return sb.toString();
}
public final synchronized iiLli IiILLLILLilLl(HttpURLConnection httpURLConnection) {
return new iiLli(httpURLConnection, this.iiiIil, this.IllLLLIil, this.f881iL, new LIIi(this), this.IllLl);
}
public final void IllLLLIil(HttpURLConnection httpURLConnection, String str, String str2) {
String str3;
Matcher matcher;
byte[] packageCertificateHashBytes;
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("X-Goog-Firebase-Installations-Auth", str2);
iliiIilIilLilIi.iiIlllLIi iiillllii = this.LIiIl;
iiillllii.iL();
iliiIilIilLilIi.iLLlLiLLlill illllilllill = iiillllii.f4632lLi;
httpURLConnection.setRequestProperty("X-Goog-Api-Key", illllilllill.f4629iL);
Context context = this.IiILLLILLilLl;
httpURLConnection.setRequestProperty("X-Android-Package", context.getPackageName());
String str4 = null;
try {
packageCertificateHashBytes = AndroidUtilsLight.getPackageCertificateHashBytes(context, context.getPackageName());
} catch (PackageManager.NameNotFoundException unused) {
Log.i("FirebaseRemoteConfig", "No such package: " + context.getPackageName());
}
if (packageCertificateHashBytes == null) {
Log.e("FirebaseRemoteConfig", "Could not get fingerprint hash for package: " + context.getPackageName());
str3 = null;
httpURLConnection.setRequestProperty("X-Android-Cert", str3);
httpURLConnection.setRequestProperty("X-Google-GFE-Can-Retry", "yes");
httpURLConnection.setRequestProperty("X-Accept-Response-Streaming", "true");
httpURLConnection.setRequestProperty(b.a, "application/json");
httpURLConnection.setRequestProperty("Accept", "application/json");
HashMap hashMap = new HashMap();
iiillllii.iL();
matcher = lllLL.matcher(illllilllill.IiiLIIlLiLLlLL);
if (matcher.matches()) {
str4 = matcher.group(1);
}
hashMap.put("project", str4);
hashMap.put("namespace", this.iiLIIlIILiILilI);
hashMap.put("lastKnownVersionNumber", Long.toString(this.iiiIil.LIiIl.f878iL.getLong("last_template_version", 0L)));
iiillllii.iL();
hashMap.put(com.anythink.expressad.videocommon.e.b.u, illllilllill.IiiLIIlLiLLlLL);
hashMap.put("sdkVersion", "21.4.1");
hashMap.put("appInstanceId", str);
byte[] bytes = new JSONObject(hashMap).toString().getBytes(a.bR);
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(httpURLConnection.getOutputStream());
bufferedOutputStream.write(bytes);
bufferedOutputStream.flush();
bufferedOutputStream.close();
}
str3 = Hex.bytesToStringUppercase(packageCertificateHashBytes, false);
httpURLConnection.setRequestProperty("X-Android-Cert", str3);
httpURLConnection.setRequestProperty("X-Google-GFE-Can-Retry", "yes");
httpURLConnection.setRequestProperty("X-Accept-Response-Streaming", "true");
httpURLConnection.setRequestProperty(b.a, "application/json");
httpURLConnection.setRequestProperty("Accept", "application/json");
HashMap hashMap2 = new HashMap();
iiillllii.iL();
matcher = lllLL.matcher(illllilllill.IiiLIIlLiLLlLL);
if (matcher.matches()) {
}
hashMap2.put("project", str4);
hashMap2.put("namespace", this.iiLIIlIILiILilI);
hashMap2.put("lastKnownVersionNumber", Long.toString(this.iiiIil.LIiIl.f878iL.getLong("last_template_version", 0L)));
iiillllii.iL();
hashMap2.put(com.anythink.expressad.videocommon.e.b.u, illllilllill.IiiLIIlLiLLlLL);
hashMap2.put("sdkVersion", "21.4.1");
hashMap2.put("appInstanceId", str);
byte[] bytes2 = new JSONObject(hashMap2).toString().getBytes(a.bR);
BufferedOutputStream bufferedOutputStream2 = new BufferedOutputStream(httpURLConnection.getOutputStream());
bufferedOutputStream2.write(bytes2);
bufferedOutputStream2.flush();
bufferedOutputStream2.close();
}
public final synchronized void LIiIl() {
lIlILilLLLlIi(Math.max(0L, this.LlllL.IiiLIIlLiLLlLL().iL().getTime() - new Date(this.IiliIiIil.currentTimeMillis()).getTime()));
}
public final synchronized boolean iL() {
boolean z;
if (!this.f881iL.isEmpty() && !this.IiiLIIlLiLLlLL && !this.IilIL) {
if (!this.lIlILilLLLlIi) {
z = true;
}
}
z = false;
return z;
}
public final void iiLIIlIILiILilI(Date date) {
iIi iii = this.LlllL;
int i2 = iii.IiiLIIlLiLLlLL().f876iL + 1;
int i3 = 8;
if (i2 < 8) {
i3 = i2;
}
long millis = TimeUnit.MINUTES.toMillis(f880iiL[i3 - 1]);
iii.lIlILilLLLlIi(i2, new Date(date.getTime() + (millis / 2) + this.ILiIiliL.nextInt((int) millis)));
}
public final synchronized void iiiIil() {
for (LIIi lIIi2 : this.f881iL) {
lIIi2.iL();
}
}
public final synchronized void iiilLllli(boolean z) {
this.IiiLIIlLiLLlLL = z;
}
public final synchronized void lIlILilLLLlIi(long j) {
if (!iL()) {
return;
}
int i2 = this.f882lLi;
if (i2 > 0) {
this.f882lLi = i2 - 1;
this.IllLl.schedule(new androidx.activity.Il(this, 17), j, TimeUnit.MILLISECONDS);
} else if (!this.lIlILilLLLlIi) {
new LlliIIL.iiLli();
iiiIil();
}
}
public final URL lLi() {
String str;
try {
String str2 = this.iiLIIlIILiILilI;
Object[] objArr = new Object[2];
iliiIilIilLilIi.iiIlllLIi iiillllii = this.LIiIl;
iiillllii.iL();
Matcher matcher = lllLL.matcher(iiillllii.f4632lLi.IiiLIIlLiLLlLL);
if (matcher.matches()) {
str = matcher.group(1);
} else {
str = null;
}
objArr[0] = str;
objArr[1] = str2;
return new URL(String.format("https://firebaseremoteconfigrealtime.googleapis.com/v1/projects/%s/namespaces/%s:streamFetchInvalidations", objArr));
} catch (MalformedURLException unused) {
Log.e("FirebaseRemoteConfig", "URL is malformed");
return null;
}
}
}