From 926bda681952b269ae7deeb5171a436b18fba307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=A5=E5=A5=A5emoji?= <741500926@qq.com> Date: Fri, 24 Nov 2023 14:31:59 +0800 Subject: [PATCH] Update bypass.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 兼容PHP8.0 以下 版本 目前通过PHP7.4测试成功 --- bypass.php | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/bypass.php b/bypass.php index 2e32fa9..6d8db4a 100644 --- a/bypass.php +++ b/bypass.php @@ -1,32 +1,32 @@ bin . " " . $id . "logcat *:S CloudDeviceStatus:V", if (is_resource($process)) { while (!feof($pipes[1])) { $output = fgets($pipes[1]); - + if (str_contains($output, "CloudDeviceStatus: args:")) { if (preg_match("/args:(.*)/", $output, $matches)) { $args = trim($matches[1]); } $adb -> runAdb($id . "shell svc data disable"); } - + if (str_contains($output, "CloudDeviceStatus: headers:")) { if (preg_match("/headers:(.*)/", $output, $matches)) { $headers = trim($matches[1]); @@ -321,7 +334,7 @@ if (is_resource($process)) { break; } } - + fclose($pipes[1]); }