Wednesday, 18 September 2013

create windows batch file to establish a telnet session in Linux Server

create windows batch file to establish a telnet session in Linux Server


Batch File (named Script.bat ):

:: Open a Telnet window
start telnet.exe 192.168.1.1
:: Run the script
cscript SendKeys.vbs

Command File (named SendKeys.vbs ):

set OBJECT=WScript.CreateObject(“WScript.Shell”)
WScript.sleep 50
OBJECT.SendKeys “mylogin{ENTER}”
WScript.sleep 50
OBJECT.SendKeys “mypassword{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” cd /var/tmp{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” rm log_web_activity{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” ln -s /dev/null log_web_activity{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” exit{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” “

2 comments:

  1. Jadwal Daftar Sabung Ayam SV388 15 Februari 2019 di Situs Judi Sabung Ayam Online Melalui Agen Resmi Taruhan Sabung Ayam Live Asli Thailand.

    Jumat, Banten 15 Februari 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete
  2. Thanks for Sharing This Blog.It is very so much valuable content.
    DevOps Training
    DevOps Online Training

    ReplyDelete