-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dawnnnnnn
committed
May 30, 2024
0 parents
commit e65a5b6
Showing
49 changed files
with
1,108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
/.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Hook_WeChat_FaaS_Xposed | ||
|
||
[Hook_WeChat_FaaS](https://github.com/FourTwooo/Hook_WeChat_FaaS)的Xposed版本 | ||
|
||
## 用法 | ||
|
||
1. 自编译or下载release中的apk文件 | ||
2. 安装到有LSPosed的设备上,作用域勾选微信 | ||
3. 打开微信,进入任意一个小程序 | ||
4. 访问Xposed插件暴露的API接口,执行云函数和获取日志 | ||
|
||
|
||
## API接口 | ||
|
||
| 接口名 | 参数 | 返回值 | 说明 | | ||
| :---: | :---: | :---: | :---: | | ||
| GET / | 无 | ok | 用于测试Xposed Server是否开启 | | ||
| POST /CallWX | {"appid": "wxafec6f8422cb357b","jsapi_name": "login","data": "{\\"requestInQueue\\":false}"} | {"result": "wxafec6f8422cb357b-86"} | 调用云函数,返回请求序列号 | | ||
| GET /wx_log | 无 | ["[WX-FaaS-HOOK] Find app: com.tencent.mm","[WX-FaaS-HOOK] start embeddedServer at 0.0.0.0:59999",...] | 查询近1500条日志| | ||
|
||
|
||
## 注意事项 | ||
1. 第一次打开小程序执行自定义云函数后有可能会出现只有request但没有response的情况,需要划掉小程序重新打开,再执行一次自定义云函数 | ||
2. 必须进入到小程序页面才能打开Xposed Server,退出小程序后Xposed Server也会关闭 | ||
3. 本版本未经过充分测试,请勿在生产环境使用 | ||
|
||
|
||
## 效果图 | ||
wx.login请求和响应 | ||
![jscode request](images/image-1.png) | ||
![jscode response](images/image-2.png) | ||
|
||
UserCryptoManager.getLatestUserKey请求和响应 | ||
![getuserencryptkey request](images/image-3.png) | ||
![getuserencryptkey response](images/image-4.png) | ||
|
||
|
||
## 致谢 | ||
[Hook_WeChat_FaaS](https://github.com/FourTwooo/Hook_WeChat_FaaS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.jetbrains.kotlin.android) | ||
} | ||
|
||
android { | ||
namespace = "com.dawnnnnnn.wechat_cloud_function_hook" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.dawnnnnnn.wechat_cloud_function_hook" | ||
minSdk = 24 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
packaging { | ||
jniLibs { | ||
excludes += "META-INF/**" | ||
} | ||
resources { | ||
excludes += "META-INF/**" | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
isShrinkResources = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.material) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
compileOnly("de.robv.android.xposed:api:82") | ||
implementation("io.ktor:ktor-server-core:1.6.1") | ||
implementation("io.ktor:ktor-server-netty:1.6.1") | ||
implementation("io.ktor:ktor-gson:1.6.1") | ||
|
||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.dawnnnnnn.wechat_cloud_function_hook", | ||
"variantName": "debug", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "1.0", | ||
"outputFile": "app-debug.apk" | ||
} | ||
], | ||
"elementType": "File", | ||
"minSdkVersionForDexing": 24 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.dawnnnnnn.wechat_cloud_function_hook", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "1.0", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File", | ||
"baselineProfiles": [ | ||
{ | ||
"minApi": 28, | ||
"maxApi": 30, | ||
"baselineProfiles": [ | ||
"baselineProfiles/1/app-release.dm" | ||
] | ||
}, | ||
{ | ||
"minApi": 31, | ||
"maxApi": 2147483647, | ||
"baselineProfiles": [ | ||
"baselineProfiles/0/app-release.dm" | ||
] | ||
} | ||
], | ||
"minSdkVersionForDexing": 24 | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/androidTest/java/com/dawnnnnnn/wechat_cloud_function_hook/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.dawnnnnnn.wechat_cloud_function_hook | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.dawnnnnnn.wechat_cloud_function_hook", appContext.packageName) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<application | ||
|
||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.Wechat_cloud_function_hook" | ||
tools:targetApi="34" > | ||
<meta-data | ||
android:name="xposedmodule" | ||
android:value="true" /> | ||
<meta-data | ||
android:name="xposeddescription" | ||
android:value="@string/app_description"/> | ||
<meta-data | ||
android:name="xposedminversion" | ||
android:value="53" /> | ||
<meta-data | ||
android:name="xposedscope" | ||
android:resource="@array/scope" /> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.dawnnnnnn.wechat_cloud_function_hook.WeChatHook |
Oops, something went wrong.