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
# -*- coding: utf-8 -*- | |
import eg | |
eg.RegisterPlugin( | |
name = "AutoRemote", | |
author = "joaomgcd", | |
version = "1.991006", | |
guid = "{C18A174E-71E3-4C74-9A2B-8653CE9991E1}", |
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
private const val 多音字分隔符 = "'" | |
private const val 单字分隔符 = " " | |
private const val EMPTY_STRING = "" | |
private const val INIT_INDEX = 0 | |
fun String.getPronounce(): Set<String> { | |
fun go(arr: List<String>, index: Int, wholePinyin: String, firstChar: String, set: MutableSet<String>) { | |
if (index < arr.size) { | |
arr[index].split(多音字分隔符).forEach { | |
val head = if (it.isNotEmpty()) it[0].toString() else "" |
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
### 自定义 圣骑士2 | |
# 职业:圣骑士 | |
# 模式:狂野模式 | |
# | |
# 2x (0) 活动假人 | |
# 2x (1) 力量祝福 | |
# 2x (1) 持盾卫士 | |
# 2x (1) 智慧祝福 | |
# 1x (1) 最后的水晶龙 | |
# 2x (1) 适者生存 |
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
// frida -U ${package} -l request.js | |
Java.perform(function () { | |
var OkHttpClient = Java.use("okhttp3.OkHttpClient"); | |
var RealCall = Java.use("okhttp3.RealCall"); | |
OkHttpClient.newCall.implementation = function (request) { | |
var result = this.newCall(request) | |
console.log(request.toString()) | |
return result |
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
private const val LIMIT_SIZE = 120 * 1024 | |
private fun getBitmapForWeChat(bitmap: Bitmap): Bitmap = bitmap.takeIf { | |
bitmap.wechatSize() < LIMIT_SIZE | |
} ?: bitmap.scale(LIMIT_SIZE.toFloat() / bitmap.wechatSize()) | |
private fun Bitmap.scale(scale: Float) = Bitmap.createScaledBitmap(this, (width * scale).toInt(), (height * scale).toInt(), true) | |
private fun Bitmap.wechatSize() = this.width * this.height | |
private fun Bitmap.toByteArray() = ByteArrayOutputStream().apply { | |
this@toByteArray.compress(Bitmap.CompressFormat.PNG, 100, this) |
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
/** | |
* 链式判空 | |
*/ | |
inline fun <reified T> T?.ifNull(block: () -> Unit): T? { | |
if (this == null) block() | |
return this | |
} |
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
private def makePageResponse[T <: List[Any]](list: T, start: Int, max: Int, getNextUrl: Map[String, String] => String) = { | |
var nextUrl: Option[String] = None | |
var preUrl: Option[String] = None | |
if (list.nonEmpty && list.size == max) { | |
nextUrl = Some(getNextUrl(Map( | |
"start" -> (start + max).toString, | |
"max" -> max.toString | |
))) | |
} |
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
curl -O https://build.frida.re/frida/android/arm/bin/frida-server | |
adb push frida-server /data/local/tmp/ | |
adb shell "chmod 755 /data/local/tmp/frida-server" | |
adb shell "/data/local/tmp/frida-server &" |
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
<style name="FullScreenDialogTheme" parent="android:Theme.Dialog"> | |
<item name="android:layout_width">match_parent</item> | |
<item name="android:layout_height">match_parent</item> | |
<item name="android:windowBackground">@drawable/black_mask_86</item> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:windowIsFloating">false</item> | |
</style> |
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
class DynamicModeTabLayout : TabLayout { | |
constructor(context: Context?) : super(context) | |
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) | |
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) | |
override fun setupWithViewPager(viewPager: ViewPager?) { | |
super.setupWithViewPager(viewPager) |
OlderNewer