superapp inj

without superapp editor
This commit is contained in:
gdlbo
2022-06-29 20:20:49 +03:00
parent b221a8d55d
commit d3b1e6e075
4 changed files with 52 additions and 4 deletions
@@ -47,14 +47,58 @@ public class JsonInjectors{
var Special = orig.optJSONArray("special");
var Main = orig.getJSONArray("main");
var Other = orig.optJSONArray("other");
if(Special.optJSONObject(0) != null){
if(Special != null){
orig.remove("special");
}
return orig;
}
public static JSONObject superapp(JSONObject orig) throws JSONException{
var Items = orig.optJSONArray("items");
if(Items != null) {
for(int i = 0; i < Items.length(); i++){
var items = Items.optJSONObject(i);
var types = items.optString("type");
switch(types){
case "promo":
Items.remove(i);
case "vkpay_slim":
Items.remove(i);
case "greeting":
Items.remove(i);
case "sport":
Items.remove(i);
case "games":
Items.remove(i);
case "miniapps":
Items.remove(i);
case "informer":
Items.remove(i);
case "holiday":
Items.remove(i);
case "vk_run":
Items.remove(i);
case "weather":
Items.remove(i);
case "food":
Items.remove(i);
case "event":
Items.remove(i);
case "birthdays":
Items.remove(i);
case "music":
Items.remove(i);
}
}
}
return orig;
}
public static boolean haveDonateButton(){
int randomshower = new Random().nextInt(6);
@@ -181,6 +181,10 @@
.method public final a(Lorg/json/JSONObject;)Lcom/vk/dto/menu/SuperAppMenuResponse;
.locals 9
invoke-static {p1}, Lru/vtosters/lite/utils/JsonInjectors;->superapp(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "items"
.line 1
@@ -223,7 +223,7 @@
goto/16 :goto_1
:sswitch_c
const-string v0, "shopping"
const-string v0, "null"
.line 16
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
@@ -1520,7 +1520,7 @@
goto :goto_0
:cond_0
const/4 v2, 0x0
const/4 v2, 0x1 // Force update superapp 0x0 -> 0x1
goto :goto_1