rm some files

pull/28/head
fengyuecanzhu 2 years ago
parent 17171167ac
commit 27f5269df1
No known key found for this signature in database
GPG Key ID: 04B78AD06A9D6E6C
  1. 1
      .gitignore
  2. 1
      .idea/gradle.xml
  3. 4
      .idea/modules.xml
  4. 2
      build.gradle
  5. 29
      dynamic/build.gradle
  6. 19980
      dynamic/dictionary_rules.txt
  7. 6
      dynamic/proguard-rules.pro
  8. 31
      dynamic/src/main/java/xyz/fycz/dynamic/StringFog.java
  9. 59
      dynamic/src/main/java/xyz/fycz/dynamic/StringFogImpl.java
  10. 78
      dynamic/src/main/java/xyz/fycz/dynamic/fix/App245Fix.kt
  11. 1
      settings.gradle

1
.gitignore vendored

@ -7,6 +7,7 @@
/build
/captures
/user
/plugin
.externalNativeBuild
keystore
# Compiled class file

@ -14,6 +14,7 @@
<option value="$PROJECT_DIR$/DialogX" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/dynamic" />
<option value="$PROJECT_DIR$/plugin" />
<option value="$PROJECT_DIR$/user" />
</set>
</option>

@ -15,6 +15,10 @@
<module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.main.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/plugin/FYReader.plugin.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.main.iml" />

@ -33,7 +33,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.github.megatronking.stringfog:gradle-plugin:3.0.0'

@ -19,8 +19,6 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'stringfog'
id 'top.niunaijun.blackobfuscator'
}
android {
@ -49,32 +47,6 @@ android {
}
}
stringfog {
//
implementation 'com.github.megatronking.stringfog.xor.StringFogImpl'
//
enable false
//
fogPackages = ['xyz.fycz.dynamic']
// 使2,
// HardCodeKeyGenerator("This is a key")
//
debug true
}
//
BlackObfuscator {
//
enabled false
//
depth 5
// ()
obfClass = ["xyz.fycz.dynamic"]
// blackClass中的包或者类不会进行混淆()
blackClass = []
}
dependencies {
compileOnly("androidx.core:core-ktx:$kotlin_version")
testImplementation 'junit:junit:4.13.2'
@ -84,5 +56,4 @@ dependencies {
compileOnly 'org.greenrobot:greendao:3.3.0'
compileOnly project(":app")
compileOnly project(":DialogX")
api 'com.github.megatronking.stringfog:xor:3.0.0'
}

File diff suppressed because it is too large Load Diff

@ -18,8 +18,4 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# 混淆字典
-obfuscationdictionary dictionary_rules.txt
-classobfuscationdictionary dictionary_rules.txt
-packageobfuscationdictionary dictionary_rules.txt
#-renamesourcefileattribute SourceFile

@ -1,31 +0,0 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic;
/**
* Generated code from StringFog gradle plugin. Do not modify!
*/
public final class StringFog {
private static final StringFogImpl IMPL = new StringFogImpl();
public static String decrypt(byte[] value, byte[] key) {
return IMPL.decrypt(value, key);
}
}

@ -1,59 +0,0 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic;
import java.nio.charset.StandardCharsets;
/**
* StringFog xor encrypt and decrypt implementation.
*
* @author Megatron King
* @since 2018/9/2 14:34
*/
public final class StringFogImpl {
public byte[] encrypt(String data, byte[] key) {
return xor(data.getBytes(StandardCharsets.UTF_8), key);
}
public String decrypt(byte[] data, byte[] key) {
return new String(xor(data, key), StandardCharsets.UTF_8);
}
public boolean shouldFog(String data) {
return true;
}
private static byte[] xor(byte[] data, byte[] key) {
int len = data.length;
int lenKey = key.length;
int i = 0;
int j = 0;
while (i < len) {
if (j >= lenKey) {
j = 0;
}
data[i] = (byte) (data[i] ^ key[j]);
i++;
j++;
}
return data;
}
}

@ -1,78 +0,0 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic.fix
import me.fycz.maple.MapleBridge
import me.fycz.maple.MapleUtils
import me.fycz.maple.MethodReplacement
import xyz.fycz.myreader.application.App
import xyz.fycz.myreader.model.user.UserService
import xyz.fycz.myreader.util.AppInfoUtils
import xyz.fycz.myreader.util.utils.EncoderUtils
/**
* @author fengyue
* @date 2022/5/23 18:20
*/
@AppFix([243, 244, 245], ["修改用户服务验证机制(beta)"], "2022-05-23")
class App245Fix : AppFixHandle {
override fun onFix(key: String): BooleanArray {
val result = try {
fixMakeAuth()
true
} catch (e: Exception) {
MapleUtils.log(e)
false
}
fixResult(key, "makeAuth", result)
return booleanArrayOf(result)
}
private fun fixMakeAuth() {
MapleUtils.findAndHookMethod(
UserService::class.java,
"makeAuth",
object : MethodReplacement() {
override fun replaceHookedMethod(param: MapleBridge.MethodHookParam): Any {
return makeAuth()
}
}
)
}
fun makeAuth(): String {
var auth = "signal=" + AppInfoUtils.getSingInfo(
App.getmContext(),
App.getApplication().packageName,
AppInfoUtils.SHA1
) + "&appVersion=" + App.getVersionCode()
auth = try {
EncoderUtils.encryptAES2Base64(
auth.toByteArray(), "79qdunN8534y44T3".toByteArray(),
"AES/ECB/PKCS5Padding"
)?.let { String(it) }.toString()
} catch (e: Exception) {
""
}
return "&auth=$auth" +
"&deviceId=" + UserService.getUUID() +
"&isDebug=" + App.isDebug()
}
}

@ -20,3 +20,4 @@ include ':app'
include ':DialogX'
include ':dynamic'
include ':user'
include ':plugin'

Loading…
Cancel
Save