From 13eb89c55f855c0028d3e26660001c10cfe042c0 Mon Sep 17 00:00:00 2001 From: NgankBakaa Date: Sat, 26 Jul 2025 21:11:41 +0700 Subject: [PATCH 1/2] chore: wrap su -c commands in quotes for consistency and safety Signed-off-by: NgankBakaa --- MBCPApp/mbcpapp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MBCPApp/mbcpapp.sh b/MBCPApp/mbcpapp.sh index 542785b..ce8c646 100755 --- a/MBCPApp/mbcpapp.sh +++ b/MBCPApp/mbcpapp.sh @@ -316,11 +316,11 @@ do adb start-server adb install 'mbcpapp_apk/MBCP_Flutter_SelfPatched.apk' echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!" - adb shell su -c iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443 + adb shell su -c 'iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443' adb shell am start -n com.mbmobile/io.flutter.plugins.MainActivity sleep 20 echo "Restoring network traffic" - adb shell su -c iptables -t nat -F OUTPUT + adb shell su -c 'iptables -t nat -F OUTPUT' echo "Press [Try again] after got 1005/1007 error on MB, so it's can skip device not secure dialog !" else echo "[MBCP_Flutter_SelfPatched.apk] not found, cannot continue !" From 2182b5df6e8d4027bbc1d91b4b53f2495147a435 Mon Sep 17 00:00:00 2001 From: NgankBakaa Date: Sat, 26 Jul 2025 21:14:53 +0700 Subject: [PATCH 2/2] refactor: impr logging Signed-off-by: NgankBakaa --- MBCPApp/legacy_patch.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MBCPApp/legacy_patch.sh b/MBCPApp/legacy_patch.sh index 73d791a..a13aa06 100755 --- a/MBCPApp/legacy_patch.sh +++ b/MBCPApp/legacy_patch.sh @@ -27,7 +27,7 @@ if [ "$opt" == 'Bypass 1200 error [v6.4.45]' ]; then ## MB Forced update to 658, it must be spoofed! echo "Patching [apktool.yml]..." sed -i 's|658|700|g' ~/mbbpatch/MBCPApp/mbapk/mbapk_unpacked/apktool.yml - echo "This patch are applied by MBCPApp Patcher on $(uname -s -r) with commit :" $(git rev-parse --short HEAD) at $(date). > 'mbapk/mbapk_unpacked/assets/mbcp_info/bypass_1200_error.inf' + echo "This patch are applied by MBCPApp Patcher on $(uname -s -r) with commit :" $(git rev-parse --short HEAD) at $(git show -s --format=%cd HEAD). > 'mbapk/mbapk_unpacked/assets/mbcp_info/bypass_1200_error.inf' # Placeholder patch, not yet implemented @@ -40,18 +40,18 @@ if [ "$opt" == 'Bypass 1200 error [v6.4.45]' ]; then then echo "INFO : MBShield found on unpacked APK ! Bypass signature checks won't be possible if MBShield is present on current unpacked APK !" echo "INFO : Please use supported version !!!" - echo For React Native : MBBank/MB Lite v1.0 up to v6.3.11 - echo For Flutter : MBBank v6.4.0 up to v6.4.21 - echo Some specific version has no MBShield can also be used : - echo MBBank v6.4.24 [versionCode : 624] - echo MBBank v6.4.26 [versionCode : 626] - echo MBBank v6.4.45 [versionCode : 658] + echo "For React Native : MBBank/MB Lite v1.0 up to v6.3.11" + echo "For Flutter : MBBank v6.4.0 up to v6.4.21" + echo "Some specific version has no MBShield can also be used :" + echo "MBBank v6.4.24 [versionCode : 624]" + echo "MBBank v6.4.26 [versionCode : 626]" + echo "MBBank v6.4.45 [versionCode : 658]" else echo "Function not yet implemented due to issues with original repo, check back later !" fi else - echo APK are not unpacked ! Please unpack APK first ! + echo "APK are not unpacked ! Please unpack APK first !" fi elif [ "$opt" == '[TEST] Remove v6.4.56 root detection' ]; then