diff --git a/module_new/zdefend-fix/action.sh b/module_new/zdefend-fix/action.sh index f128468..bcb3499 100644 --- a/module_new/zdefend-fix/action.sh +++ b/module_new/zdefend-fix/action.sh @@ -21,12 +21,9 @@ cat '/data/data/com.mbmobile/databases/vtap' | grep "true" && echo "VTAP is prov # Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users echo "Deleting /data/magisk if it exists..." [[ -d /data/magisk ]] && rm -r /data/magisk +find /data -name 'magisk_backup*' -delete echo Forcing stop MB Bank... am force-stop com.mbmobile - -echo Starting Flutter activity... -echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!" -echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass device not secure dialog !" rm -rf /data/data/com.mbmobile/files/0* rm -rf /data/data/com.mbmobile/files/1* rm -rf /data/data/com.mbmobile/files/2* @@ -40,14 +37,17 @@ echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass devi rm -rf /data/data/com.mbmobile/files/KNOV3PN* rm -rf /data/data/com.mbmobile/files/zxpolicyme* rm -rf /data/data/com.mbmobile/files/policyme* - -iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443 - +echo "ATTENTION : Network traffic will be redirected to fake IP for 20 seconds !!!" +echo "Press [Try again] after got 1005/1007/VPN error on MB, so it's can bypass device not secure dialog !" +# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables +iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 122.122.0.122 am start -n com.mbmobile/io.flutter.plugins.MainActivity -# VPN connection requires 20 seconds, while normal one only requires 10 seconds sleep 20 echo "Restoring network traffic" -iptables -t nat -F OUTPUT +# Reference : https://gist.github.com/jstrosch/3190568 (Line 7) +iptables -t nat -F + + if [ $SYSLANGVI ]; then su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP.'" >/dev/null 2>&1 else diff --git a/module_new/zdefend-fix/customize.sh b/module_new/zdefend-fix/customize.sh index d4b2cac..03a74d7 100644 --- a/module_new/zdefend-fix/customize.sh +++ b/module_new/zdefend-fix/customize.sh @@ -69,6 +69,7 @@ chmod +x 'vtapnotinit.sh' # Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users [ -d /data/magisk ] && echo "Magisk folder found! deleting..." && rm -r /data/magisk +find /data -name 'magisk_backup*' -delete echo --------------------------- if [ -d /data/adb/magisk ]; then @@ -105,13 +106,15 @@ sleep 2 rm -rf /data/data/com.mbmobile/files/zxpolicyme* rm -rf /data/data/com.mbmobile/files/policyme* echo Starting Flutter activity... -echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!" -echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass device not secure dialog !" -iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443 +echo "ATTENTION : Network traffic will be redirected to fake IP for 20 seconds !!!" +echo "Press [Try again] after got 1005/1007/VPN error on MB, so it's can bypass device not secure dialog !" +# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables +iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 122.122.0.122 am start -n com.mbmobile/io.flutter.plugins.MainActivity sleep 20 echo "Restoring network traffic" -iptables -t nat -F OUTPUT +# Reference : https://gist.github.com/jstrosch/3190568 (Line 7) +iptables -t nat -F if [ $SYSLANGVI ]; then su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP. Sau khi thao tác xong, nên khởi động lại thiết bị ngay.'" >/dev/null 2>&1 diff --git a/module_new/zdefend-fix/script/MB_Bank.sh b/module_new/zdefend-fix/script/MB_Bank.sh index e230a96..cee4f2d 100755 --- a/module_new/zdefend-fix/script/MB_Bank.sh +++ b/module_new/zdefend-fix/script/MB_Bank.sh @@ -3,7 +3,7 @@ SYSLANGVI="$(getprop persist.sys.locale | grep vi-VN)" su -c am force-stop com.mbmobile echo "Starting flutter activity..." -echo "Network traffic will be redirected to [medium.com] for 20 seconds !!!" +echo "Network traffic will be redirected to fake IP for 20 seconds !!!" echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass device not secure dialog !" su -c rm -rf /data/data/com.mbmobile/files/0* su -c rm -rf /data/data/com.mbmobile/files/1* @@ -19,11 +19,14 @@ echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass devi su -c rm -rf /data/data/com.mbmobile/files/zxpolicyme* su -c rm -rf /data/data/com.mbmobile/files/policyme* -su -c iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443 +# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables +iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 122.122.0.122 am start -n com.mbmobile/io.flutter.plugins.MainActivity -# VPN connection requires 20 seconds, while normal one only requires 10 seconds sleep 20 -echo "Restoring network traffic..." +echo "Restoring network traffic" +# Reference : https://gist.github.com/jstrosch/3190568 (Line 7) +iptables -t nat -F + su -c iptables -t nat -F OUTPUT if [ $SYSLANGVI ]; then su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP.'" >/dev/null 2>&1