aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.29k stars 176 forks source link

[Script] Strange behaviour #951

Closed LuanTeles closed 9 months ago

LuanTeles commented 1 year ago

Aldo it seems that if a script has the word /dev_blind it will enable it even if it is commented out

One exemple is my autoexec.bat

if exist /dev_flash/vsh/resource/explore/xmb/pro.xml
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x157 #Enable CPU/RSX/FAN Chart
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x147 #Disable /dev_blind on Startup
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x0E #Enable Artemis
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x377 #Disable Notification Icons
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x40 #Disable Startup Notification
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x27 #Disable PS2 Classics
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x28 #Disable PSP Launcher
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x25E #Disable Scan Content on Startup
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=32&pos=0x30 #Info: ID+Version+Tags
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x249 #Mount Info: Info 2
else
    goto end
end if
    goto end

:end

The dev_blind is being enabled automatically just because it is written on it

LuanTeles commented 1 year ago

The same happens with my boot_init.txt and onxmb.bat. I added the command to enable dev_blind before the commands that need it and at the end of the script I disable it. Then I realized it wasn't disabling dev_blind, so I removed the /dev_blind?1 command and it was still enabling dev_blind, so I removed /dev_blind?0 and the same thing, it was still enabled, so I removed all dev_blind paths and finally it was not enabled anymore.

It's not a problem, but even if I delete my entire script and add the command /dev_blind?0 which is used to disable dev_blind it is having the opposite effect, it is enabling dev_blind haha

The only thing that matters to me is making the script disable dev_blind when the /dev_blind?0 command is run. In fact, it works as intended via the web browser, the problem only occurs via script.

This is my boot_init for reference:

wait 9
wait 9
/delete.ps3/dev_hdd0/tmp/explore/nsx
/delete.ps3/dev_hdd0/tmp/explore/xil2
/dev_blind?1

/remap.ps3/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/Features_Switch_Xai_Plugin.xml&to=/dev_flash/vsh/resource/explore/xmb/pro.xml&to=/dev_flash/vsh/resource/explore/xmb/pro.xml

if exist /dev_flash/vsh/resource/explore/xmb/pro.xml
    /remap.ps3/dev_hdd0/xmlhost/game_plugin/games.xml&to=dev_hdd0/xmlhost/game_plugin/mygames.xml
    /remap.ps3/dev_hdd0/xmlhost/game_plugin/retro.xml&to=dev_hdd0/xmlhost/game_plugin/ROMS.xml
    /remap.ps3/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/remaps/Features_Switch_Webman_Plugin.xml&to=/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/Features_Switch_Webman_Plugin.xml
    wait 5
    popup PS3™ 4K Pro
    beep3
    wait 1
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=32&pos=0x30
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x377
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x249
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x157
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x147
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x40
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x25E
    /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x0E
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/boot_plugins/cfw/,/dev_hdd0/   
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_friend.xml,/dev_blind/vsh/resource/explore/xmb/category_friend.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_game.xml,/dev_blind/vsh/resource/explore/xmb/category_game.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_game_tool2.xml,/dev_blind/vsh/resource/explore/xmb/category_game_tool2.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_music.xml,/dev_blind/vsh/resource/explore/xmb/category_music.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_network.xml,/dev_blind/vsh/resource/explore/xmb/category_network.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_network_tool2.xml,/dev_blind/vsh/resource/explore/xmb/category_network_tool2.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_photo.xml,/dev_blind/vsh/resource/explore/xmb/category_photo.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_psn.xml,/dev_blind/vsh/resource/explore/xmb/category_psn.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_tv.xml,/dev_blind/vsh/resource/explore/xmb/category_tv.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_user.xml,/dev_blind/vsh/resource/explore/xmb/category_user.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_user_login.xml,/dev_blind/vsh/resource/explore/xmb/category_user_login.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_video.xml,/dev_blind/vsh/resource/explore/xmb/category_video.xml
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/game_column_fix/cfw/category_network_service_mode_tools.xml,/dev_blind/vsh/resource/explore/xmb/category_network_service_mode_tools.xml
else
    /delete.ps3/dev_hdd0/boot_plugins.txt;/delete_ps3/dev_hdd0/tmp/wm_icons/icon_wm_root.png;/refresh.ps3;/delete.ps3/dev_hdd0/tmp/canyon;/delete.ps3/dev_hdd0/tmp/canyon.off;/delete.ps3/dev_hdd0/tmp/coldboot;/delete.ps3/dev_hdd0/tmp/coldboot.off;/delete.ps3/dev_hdd0/tmp/earth;/delete.ps3/dev_hdd0/tmp/earth.off;/delete.ps3/dev_hdd0/tmp/gameboot;/delete.ps3/dev_hdd0/tmp/gameboot.off;/delete.ps3/dev_hdd0/tmp/gameboot_logo;/delete.ps3/dev_hdd0/tmp/gameboot_logo.off;/delete.ps3/dev_hdd0/tmp/impose;/delete.ps3/dev_hdd0/tmp/impose.off;/delete.ps3/dev_hdd0/tmp/lines;/delete.ps3/dev_hdd0/tmp/lines.off;/delete.ps3/dev_hdd0/tmp/psn_icons;/delete.ps3/dev_hdd0/tmp/psn_icons.off;/delete.ps3/dev_hdd0/tmp/theme;/delete.ps3/dev_hdd0/tmp/theme.off;/delete.ps3/dev_hdd0/tmp/wallpaper;/delete.ps3/dev_hdd0/tmp/wallpaper.off;/delete.ps3/dev_hdd0/tmp/system_music;/move.ps3/dev_hdd0/xmlhost.off&to=/dev_hdd0/xmlhost;/move.ps3/dev_hdd0/boot_plugins_firmware_change.txt&to=/dev_hdd0/boot_plugins.txt;/delete_ps3/dev_hdd0/theme/CD_*.p3t;/delete_ps3/dev_hdd0/autoexec.bat;/delete_ps3/dev_hdd0/boot_init_swap.txt;/delete_ps3/dev_hdd0/onxmb.bat;/delete_ps3/dev_hdd0/patches.bat;/delete_ps3/dev_hdd0/ingame.bat;/delete_ps3/dev_hdd0/home/$USERID$/webbrowser/setting.xml;/delete.ps3/dev_hdd0/PROISO;/delete_ps3/dev_blind/vsh/resource/theme/01.p3t;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x253;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x27;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x28;/xmb.ps3$xregistry(/setting/user/$USERID$/browser/exitConfirmation)=0;/xmb.ps3$xregistry(/setting/net/dnsFlag)=1;/netstatus.ps3?dns1=1.1.1.1;/netstatus.ps3?dns2=1.0.0.1;/delete_ps3/dev_hdd0/boot_init.txt;/reboot.ps3
    goto end
end if

if noCobra
    move /dev_blind/sys/stage2.bin.bak,/dev_blind/sys/stage2.bin
    move /dev_blind/sys/stage2.cex.bak,/dev_blind/sys/stage2.cex
    move /dev_blind/sys/stage2.dex.bak,/dev_blind/sys/stage2.dex
    move /dev_blind/rebug/cobra/stage2.cex.bak,/dev_blind/rebug/cobra/stage2.cex
    move /dev_blind/rebug/cobra/stage2.dex.bak,/dev_blind/rebug/cobra/stage2.dex
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.off,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.xml
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.off
    /reboot.ps3
else if PS3HEN
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.off
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.off
    /unloadprx.ps3/dev_hdd0/plugins/fps_counter.sprx
else if Mamba
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.off
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.off,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.xml
else if Debug
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.off,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.xml
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.off
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/on.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/payloads/cobra/debug_mode.png
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/off.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/payloads/cobra/release_mode.png
else if Cobra
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.off,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Cobra_Tools.xml
    move /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.xml,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/CFW_Mamba_Tools.off
end if

if DEX
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/off.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/system_mode/cex.png
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/on.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/system_mode/dex.png
else
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/on.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/system_mode/cex.png
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/off.png,/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/icons/system_mode/dex.png
end if

if exist /dev_usb000
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/security_key/cfw/on/&to=/dev_usb000/
else if exist /dev_usb001
    copy /dev_hdd0/game/PS34KPROX/USRDIR/toolbox/patches/security_key/cfw/on/&to=/dev_usb001/
end if

:end
/dev_blind?0
aldostools commented 1 year ago

Yes, the script auto mounts /dev_blind if it is mentioned in the script

If you don't want this behavior mention dev_blind instead of /dev_blind

BTW Your script has an incorrect syntax: the # for remmarks is only valid on the start of the line. You use it in middle of a command line.

LuanTeles commented 1 year ago

Yes, the script auto mounts /dev_blind if it is mentioned in the script

If you don't want this behavior mention dev_blind instead of /dev_blind

BTW Your script has an incorrect syntax: the # for remmarks is only valid on the start of the line. You use it in middle of a command line.

Thanks aldo, i fixed the script, but how about the copy/move operations they will still work without the / in the path?

i just tried here dev_blind?0 instead of /dev_blind?0 it still doesn't unmount the dev_blind at the end of the scrip

aldostools commented 1 year ago

I haven't tested, but /dev_blind?0 should work since the auto-mount occurs before the execution of the web command

Additionally the auto-mount of /dev_blind is performed only once per script. So it shouldn't interfere after /dev_blind?1

LuanTeles commented 1 year ago

I haven't tested, but /dev_blind?0 should work since the auto-mount occurs before the execution of the web command

Additionally the auto-mount of /dev_blind is performed only once per script. So it shouldn't interfere after /dev_blind?1

I tried a blank script only with /dev_blind?0 in it and dev_blind is getting enabled and not disabled

aldostools commented 1 year ago

Ok, I will test this bug when I have some free time

LuanTeles commented 1 year ago

Ok, I will test this bug when I have some free time

Thanks, I'm just worried about disabling dev_blind because a lot of users are complaining about the PS3 Pro breaking "out of nowhere", but users install so-called "stores" that replace the category xmls, so my boot_init.txt/onxmb .bat/ingame .bat they all use the copy command to ensure the user doesn't install anything that breaks the XMB, restoring my default xmls.

As an additional measure, I want to put the command to disable dev_blind in all scripts, since most don't even know about dev_blind and to install these packages dev_blind must be mounted.

image

aldostools commented 1 year ago

I fixed the regression in /dev_blind?0 https://github.com/aldostools/webMAN-MOD/commit/254043e6bd622ed6b8b88069ba66ba2297b4b6e9#diff-7ce85c6ec3a1ac7aeb039b7e08aa985a8703296f8f914a87fd02c3ce0c23dff7

LuanTeles commented 10 months ago

Aldo, it is still happening

/dev_blind?0 still enables dev_blind

aldostools commented 10 months ago

Please verify that the version installed is the latest.

I just tested http://0/dev_blind?0 and it's working as expected.

LuanTeles commented 10 months ago

Please verify that the version installed is the latest.

I just tested http://0/dev_blind?0 and it's working as expected.

the issue only happens via script, do you remember?

aldostools commented 10 months ago

Ah ok I will check again and let you know what I found.

aldostools commented 10 months ago

test updating again

LuanTeles commented 9 months ago

Fixed