gcmfix v2 is here
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken;
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken2;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersion;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersionBuild;
|
||||
import static ru.vtosters.lite.utils.Preferences.musicFixNew;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Base64;
|
||||
@@ -38,7 +41,14 @@ public class GCMFix {
|
||||
genNewKey();
|
||||
}
|
||||
|
||||
public static String requestTokenV2(){
|
||||
return FixToken2();
|
||||
}
|
||||
|
||||
public static String requestToken() {
|
||||
if(musicFixNew()){
|
||||
return FixToken();
|
||||
}
|
||||
String xappide;
|
||||
try {
|
||||
String[] aidarr = {"3974055026275073921", "4418584909973341826", "4585634953328772978"};
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
public class NewGcmFix {
|
||||
private static final short[] DATA = {835, 841, 841, 842, 771, 853, 771, 842, 771, 842, 859, 855, 832, 783, 846, 791, 852, 844, 855, 843, 770, 841, 842, 861, 845, 846, 851, 852, 777, 863, 778, 775, 775, 939, 951, 900, 934, 940, 905, 941, 935, 897, 935, 911, 935, 940, 931, 1015, 955, 916, 925, 900, 1015, 992, 939, 951, 900, 955, 940, 1020, 1019, 932, 916, 925, 903, 1016, 903, 909, 900, 1022, 916, 918, 896, 1022, 926, 922, 1022, 935, 936, 927, 992};
|
||||
|
||||
public static String FixToken() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "۠ۡۦ".hashCode();
|
||||
int hashCode2 = "ۤۢۨ".hashCode();
|
||||
int hashCode3 = "ۦ۠ۤ".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1751594) | ((-1751595) & hashCode2), ((hashCode3 ^ (-1)) & 1753419) | ((-1753420) & hashCode3), ((hashCode ^ (-1)) & 1747007) | ((-1747008) & hashCode));
|
||||
}
|
||||
|
||||
public static String FixToken2() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "ۦۧۢ".hashCode();
|
||||
int hashCode2 = "ۥ۟ۡ".hashCode();
|
||||
int hashCode3 = "ۣۤ۟".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1752486) | ((-1752487) & hashCode2), ((hashCode3 ^ (-1)) & 1751664) | ((-1751665) & hashCode3), ((hashCode ^ (-1)) & 1753487) | ((-1753488) & hashCode));
|
||||
}
|
||||
|
||||
private static String convert(short[] sArr, int i, int i2, int i3) {
|
||||
char[] cArr = new char[i2];
|
||||
for (int i4 = 0; i4 < i2; i4 = 1 - (0 - i4)) {
|
||||
short s = sArr[0 - ((0 - i) - i4)];
|
||||
cArr[i4] = (char) (((s ^ (-1)) & i3) | ((i3 ^ (-1)) & s));
|
||||
}
|
||||
return new String(cArr);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,6 @@ import ru.vtosters.lite.ui.dialogs.DisableBattery;
|
||||
import ru.vtosters.lite.ui.dialogs.InstallGMS;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.dialogs.Start;
|
||||
import ru.vtosters.lite.ui.dialogs.VKIDProtection;
|
||||
|
||||
public class Globals {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
@@ -72,7 +71,7 @@ public class Globals {
|
||||
Start.alert(activity);
|
||||
InstallGMS.alert(activity);
|
||||
DisableBattery.alert(activity);
|
||||
VKIDProtection.alert(activity);
|
||||
// VKIDProtection.alert(activity);
|
||||
}
|
||||
|
||||
public static void componentSwitcher(String component, Boolean enabled) {
|
||||
|
||||
@@ -150,6 +150,10 @@ public class Preferences {
|
||||
return getBoolValue("awayphp", true);
|
||||
}
|
||||
|
||||
public static boolean musicFixNew() {
|
||||
return getBoolValue("musicFixNew", true);
|
||||
}
|
||||
|
||||
public static Class useNewSettings() {
|
||||
boolean bool = getBoolValue("useNewSettings", true);
|
||||
return bool? VTSettings.class : SettingsListFragment.class;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference
|
||||
android:key="vkid_warn"
|
||||
android:summary="@string/vkidsumm"
|
||||
android:title="@string/debug_warning" />
|
||||
<PreferenceCategory android:title="@string/vkx_title">
|
||||
<Preference
|
||||
android:enabled="false"
|
||||
@@ -28,5 +24,9 @@
|
||||
android:key="gcmfix"
|
||||
android:summary="@string/vk_fix_music_summary"
|
||||
android:title="@string/vk_fix_music" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="musicFixNew"
|
||||
android:title="Фикс музыки v2" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
+11
@@ -207,6 +207,17 @@
|
||||
|
||||
check-cast v4, Ljava/lang/String;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->gcmfix()Z
|
||||
|
||||
move-result v6
|
||||
|
||||
if-eqz v6, :cond_10
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/audio/gcm/GCMFix;->requestTokenV2()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
:cond_10
|
||||
invoke-virtual {v0, v3, v4}, Lcom/vk/api/internal/MethodCall$a;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
const-string v3, "nonce"
|
||||
|
||||
Reference in New Issue
Block a user