79549074

Date: 2025-04-01 20:06:30
Score: 0.5
Natty:
Report link

I had the same issue.

I used the following script and works for me. I used IA to find the correct one.

@echo off
SET input=%1

REM Verificar si se proporcionó un argumento
IF "%input%"=="" (
    echo Error: No se proporcionó una dirección en el formato telnet:host:puerto
    exit /b 1
)

REM Extraer correctamente el host y el puerto
FOR /F "tokens=2 delims=:" %%a IN ("%input%") DO SET host=%%a
FOR /F "tokens=3 delims=:" %%a IN ("%input%") DO SET port=%%a

REM Quitar barras "//" si las hay
SET host=%host://=%
SET port=%port:/=%

REM Eliminar espacios en host y puerto
SET host=%host: =%
SET port=%port: =%

REM Validar que ambos valores existen
IF "%host%"=="" (
    echo Error: Host no identificado
    exit /b 1
)

IF "%port%"=="" (
    echo Error: Puerto no identificado
    exit /b 1
)

echo Host: %host%
echo Puerto: %port%

REM Ir a la carpeta de MobaXterm
cd /d "C:\Program Files (x86)\Mobatek\MobaXterm" || (
    echo Error: No se encontró la carpeta de MobaXterm
    exit /b 1
)

REM Ejecutar Telnet en MobaXterm con el formato correcto
MobaXterm.exe -newtab "cmd /c telnet %host% %port%"

enter image description here

Best,

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-1): I had the same
  • Whitelisted phrase (-1): works for me
  • RegEx Blacklisted phrase (2): encontr
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jonathan Ordoñes