feat: redirect to fake IP instead

also reference code

Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
Cuynu 2026-01-13 23:56:12 +07:00
commit bafb98b6a5
3 changed files with 23 additions and 17 deletions

View file

@ -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

View file

@ -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

View file

@ -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