profile hide inj test
profiles dead lmao
This commit is contained in:
@@ -28,10 +28,10 @@ import ru.vtosters.lite.utils.Globals;
|
||||
|
||||
public class VTVerifications{
|
||||
private static final OkHttpClient sClient = new OkHttpClient();
|
||||
private static final List<Integer> sVerifications = new ArrayList<>();
|
||||
private static final List<Integer> sPrometheuses = new ArrayList<>();
|
||||
private static final List<Integer> sDevelopers = new ArrayList<>();
|
||||
private static final List<Integer> sServiceAccounts = new ArrayList<>();
|
||||
public static final List<Integer> sVerifications = new ArrayList<>();
|
||||
public static final List<Integer> sPrometheuses = new ArrayList<>();
|
||||
public static final List<Integer> sDevelopers = new ArrayList<>();
|
||||
public static final List<Integer> sServiceAccounts = new ArrayList<>();
|
||||
private static SharedPreferences sVerificationsPrefs;
|
||||
|
||||
public static void load(Context context){
|
||||
|
||||
@@ -1,44 +1,65 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserID;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.vk.profile.presenter.UserPresenter;
|
||||
import com.vtosters.lite.api.ExtendedUserProfile;
|
||||
import com.vtosters.lite.fragments.messages.chat.vc.MsgSendVc;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import ru.vtosters.lite.f0x1d.VTVerifications;
|
||||
|
||||
public class ProfileHide{
|
||||
// private static final OkHttpClient client = new OkHttpClient();
|
||||
//
|
||||
// public static void injectMap(HashMap<Integer, AdministratorProfileFragment.a.a> hashMap) {
|
||||
// for (int i = 0; VTVerifications.sServiceAccountsMap.valueOf(i) < 0; i++) {
|
||||
// boolean valueOf = VTVerifications.sServiceAccountsMap.valueOf(Helper.getId());
|
||||
// if (valueOf) {
|
||||
// hashMap.put(1, new AdministratorProfileFragment.a.C0211a(R.string.service_account_mobile_info, R.color.service_account_admin_333, R.drawable.ic_custom_avatar_id333));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static void fetchInfo(ExtendedUserProfile extendedUserProfile) {
|
||||
// int userID = Helper.getUserID(extendedUserProfile.f11298a);
|
||||
// if (VTVerifications.sServiceAccountsMap.valueOf(userID)) {
|
||||
// Request.Builder builder = new Request.Builder();
|
||||
// try {
|
||||
// String string = new JSONObject(client.newCall(builder.o(HttpUrl.l("https://sf.vknext.ru/block_text?user_id=" + userID)).build()).b().a().p()).getJSONObject(MsgSendVc.e).getString("response");
|
||||
// if (!string.equals("")) {
|
||||
// ExtendedUserProfile.class.getDeclaredField("z2").set(extendedUserProfile, string);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static String getInfo(ExtendedUserProfile extendedUserProfile) {
|
||||
// int userID = Helper.getUserID(extendedUserProfile);
|
||||
// if (VTVerifications.sServiceAccountsMap.valueOf(userID)) {
|
||||
// try {
|
||||
// String str = (String) ExtendedUserProfile.class.getDeclaredField("z2").get(extendedUserProfile);
|
||||
// if (!TextUtils.equals(str, "") && str != null) {
|
||||
// return str;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// return Helper.getContext().getString(UserPresenter.i0.a(userID).intValue());
|
||||
// }
|
||||
private static final OkHttpClient client = new OkHttpClient();
|
||||
|
||||
public static void injectMap(HashMap<Integer, UserPresenter.a.a> hashMap) {
|
||||
for (int i = 0; VTVerifications.sServiceAccounts.get(i) < 0; i++) {
|
||||
boolean valueOf = VTVerifications.sServiceAccounts.equals(getUserId());
|
||||
hashMap.put(100, new UserPresenter.a.a(getIdentifier("service_account_admin_100_info", "string"), getIdentifier("service_account_admin_100", "color"), getIdentifier("ic_custom_avatar_id100", "drawable")));
|
||||
hashMap.put(101, new UserPresenter.a.a(getIdentifier("service_account_admin_101_info", "string"), getIdentifier("service_account_admin_101", "color"), getIdentifier("ic_custom_avatar_id101", "drawable")));
|
||||
hashMap.put(333, new UserPresenter.a.a(getIdentifier("service_account_mobile_info", "string"), getIdentifier("service_account_admin_333", "color"), getIdentifier("ic_custom_avatar_id333", "drawable")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void fetchInfo(ExtendedUserProfile extendedUserProfile) {
|
||||
int userID = getUserID(extendedUserProfile.a);
|
||||
if (VTVerifications.sServiceAccounts.equals(userID)) {
|
||||
Request.a builder = new Request.a();
|
||||
try {
|
||||
String string = new JSONObject(client.a(builder.a(HttpUrl.e("https://sf.vknext.net/block_text?user_id=" + userID)).a()).execute().c().a().g()).getJSONObject(MsgSendVc.d0).getString("response");
|
||||
if (!string.equals("")) {
|
||||
ExtendedUserProfile.class.getDeclaredField("z2").set(extendedUserProfile, string);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getInfo(ExtendedUserProfile extendedUserProfile) {
|
||||
int userID = getUserID(extendedUserProfile);
|
||||
if (VTVerifications.sServiceAccounts.equals(userID)) {
|
||||
try {
|
||||
String str = (String) ExtendedUserProfile.class.getDeclaredField("z2").get(extendedUserProfile);
|
||||
if (!TextUtils.equals(str, "") && str != null) {
|
||||
return str;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return getContext().getString(UserPresenter.q0.a(userID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,34 @@
|
||||
.method public constructor <init>(Landroid/content/Context;Lcom/vtosters/lite/api/ExtendedUserProfile;Z)V
|
||||
.locals 2
|
||||
|
||||
.line 1
|
||||
sget-object v0, Lcom/vk/profile/presenter/UserPresenter;->q0:Lcom/vk/profile/presenter/UserPresenter$a;
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/ProfileHide;->getInfo(Lcom/vtosters/lite/api/ExtendedUserProfile;)Ljava/lang/String;
|
||||
|
||||
iget-object p2, p2, Lcom/vtosters/lite/api/ExtendedUserProfile;->a:Lcom/vk/dto/user/UserProfile;
|
||||
move-result-object p1
|
||||
|
||||
iget p2, p2, Lcom/vk/dto/user/UserProfile;->b:I
|
||||
invoke-static {p1}, Lcom/vk/common/links/LinkParser;->c(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Lcom/vk/common/links/LinkParser;->c(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
const-string p2, "LinkParser.parseWiki(Lin\u2026account_admin_100_info)))"
|
||||
|
||||
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
const/4 p2, 0x0
|
||||
|
||||
const/4 v0, 0x2
|
||||
|
||||
const/4 v1, 0x0
|
||||
|
||||
invoke-direct {p0, p1, p2, v0, v1}, Lcom/vk/profile/adapter/items/c0/StubMessageItem;-><init>(Ljava/lang/CharSequence;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
|
||||
.line 2
|
||||
invoke-virtual {p0, p3}, Lcom/vk/profile/adapter/items/c0/StubMessageItem;->c(Z)V
|
||||
|
||||
return-void
|
||||
|
||||
invoke-virtual {v0, p2}, Lcom/vk/profile/presenter/UserPresenter$a;->a(I)Ljava/lang/Integer;
|
||||
|
||||
|
||||
@@ -143,6 +143,8 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/ProfileHide;->injectMap(Ljava/util/HashMap;)V
|
||||
|
||||
sput-object v0, Lcom/vk/profile/presenter/UserPresenter;->p0:Ljava/util/HashMap;
|
||||
|
||||
return-void
|
||||
|
||||
@@ -509,6 +509,7 @@
|
||||
|
||||
.field public z1:Lcom/vk/dto/common/Model;
|
||||
|
||||
.field public z2:Ljava/lang/String;
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>()V
|
||||
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
iput v4, v2, Lcom/vk/dto/user/UserProfile;->b:I
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/ProfileHide;->fetchInfo(Lcom/vtosters/lite/api/ExtendedUserProfile;)V
|
||||
|
||||
.line 3
|
||||
iget-object v2, v0, Lcom/vtosters/lite/api/ExtendedUserProfile;->a:Lcom/vk/dto/user/UserProfile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user