@echo off

for /f "delims== tokens=1,2" %%G in (settings.cfg) do set %%G=%%H


For /F "Usebackq Delims=" %%# in (
    "iplist.txt"
) do (
    Echo [+] Connect: %%# [password: %ASICSSHPASS%]
    %CD%\bin\winscp.com /command "open scp://root:%ASICSSHPASS%@%%#/ -hostkey=*" "put %CD%\bin\upgrade.cgi /www/pages/cgi-bin/" "exit" "%%#" 1>nul && (
        Echo [i] Upgrade.cgi replaced) || (
        Echo [X] Upgrade.cgi replaced failed)
)

pause