change makeAuth

pull/23/head
fengyuecanzhu 3 years ago
parent 359d210c6b
commit 56ffb9ce9c
  1. 1
      .gitignore
  2. 1
      .idea/gradle.xml
  3. 4
      .idea/modules.xml
  4. 3
      app/src/main/java/xyz/fycz/myreader/model/user/UserService.kt
  5. 4
      build.gradle
  6. 6
      dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt
  7. 81
      dynamic/src/main/java/xyz/fycz/dynamic/fix/App245Fix.kt
  8. 1
      settings.gradle

1
.gitignore vendored

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

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

@ -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.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.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/dynamic/FYReader.dynamic.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/dynamic/FYReader.dynamic.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" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/user/FYReader.user.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/user/FYReader.user.unitTest.iml" />
</modules> </modules>
</component> </component>
</project> </project>

@ -266,6 +266,7 @@ object UserService {
App.getApplication().packageName, App.getApplication().packageName,
AppInfoUtils.SHA1 AppInfoUtils.SHA1
) + "&appVersion=" + App.getVersionCode() + ) + "&appVersion=" + App.getVersionCode() +
"&deviceId=" + getUUID() + "&isDebug=" + App.isDebug() "&isDebug=" + App.isDebug() +
"&deviceId=" + getUUID()
} }
} }

@ -34,6 +34,10 @@ buildscript {
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' 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:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.github.megatronking.stringfog:gradle-plugin:3.0.0'
// xor算法使
classpath 'com.github.megatronking.stringfog:xor:3.0.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }

@ -26,10 +26,7 @@ import com.kongzue.dialogx.dialogs.BottomDialog
import me.fycz.maple.MapleBridge import me.fycz.maple.MapleBridge
import me.fycz.maple.MapleUtils import me.fycz.maple.MapleUtils
import me.fycz.maple.MethodHook import me.fycz.maple.MethodHook
import xyz.fycz.dynamic.fix.App243Fix import xyz.fycz.dynamic.fix.*
import xyz.fycz.dynamic.fix.App244Fix
import xyz.fycz.dynamic.fix.App244Fix2
import xyz.fycz.dynamic.fix.AppFix
import xyz.fycz.myreader.application.App import xyz.fycz.myreader.application.App
import xyz.fycz.myreader.ui.activity.MainActivity import xyz.fycz.myreader.ui.activity.MainActivity
@ -49,6 +46,7 @@ class AppLoadImpl : IAppLoader {
App243Fix::class.java, App243Fix::class.java,
App244Fix::class.java, App244Fix::class.java,
App244Fix2::class.java, App244Fix2::class.java,
App245Fix::class.java,
) )
override fun onLoad(appParam: AppParam) { override fun onLoad(appParam: AppParam) {

@ -0,0 +1,81 @@
/*
* 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(), DO_FILTER_KEY,
"AES/ECB/PKCS5Padding"
)?.let { String(it) }.toString()
} catch (e: Exception) {
""
}
return "&auth=$auth" +
"&deviceId=" + UserService.getUUID() +
"&isDebug=" + App.isDebug()
}
val DO_FILTER_KEY = "79qdunN8534y44T3".toByteArray()
}

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

Loading…
Cancel
Save