抖音版本16.3.0,hook方式xposed
在采集APP数据的时候很多接口都会用到userId和sec_uid,通过抓取接口webcast/user可以看到id都是由客户端生成的
用户信息
实体类com.bytedance.android.live.base.model.user.User
/**
* 获取当前登录用户ID
* @param lpparam
* @return
*/
public static long getLogInUserId(XC_LoadPackage.LoadPackageParam lpparam){
Class<?> IUserService = XposedHelpers.findClass("com.bytedance.android.live.user.IUserService", lpparam.classLoader);
Object oIUserService = XposedHelpers.callStaticMethod(XposedHelpers.findClass("com.bytedance.android.live.j.g", lpparam.classLoader), "a", IUserService);
Object user = XposedHelpers.callMethod(oIUserService, "user");
Object userid = XposedHelpers.callMethod(user, "b");
return (long) userid;
}
/**
* 获取当前登录用户SEC_UID
* @param lpparam
* @return
*/
public static String getLogInSecUserId(XC_LoadPackage.LoadPackageParam lpparam){
Class<?> IUserService = XposedHelpers.findClass("com.bytedance.android.live.user.IUserService", lpparam.classLoader);
Object oIUserService = XposedHelpers.callStaticMethod(XposedHelpers.findClass("com.bytedance.android.live.j.g", lpparam.classLoader), "a", IUserService);
Object user = XposedHelpers.callMethod(oIUserService, "user");
Object userid = XposedHelpers.callMethod(user, "b");
Object secUid = XposedHelpers.callMethod(user, "a", userid);
return secUid.toString();
}
网友评论