使用IP:ポートを接続すると、あなたは、サーバー
これは私がIPを変更するために私のルータにtelnetのスルー接続するために書いた古いスクリプトであるとの通信を行います。
TCPStartup()
TrayTip("Changing IP adress!", "...connecting...", 10)
$router_IP = "192.168.1.1"
$port = "23" ; standard telnet port
$username = "admin"
$pass = "****"
Dim $ConnectedSocket = -1
$ConnectedSocket = TCPConnect($router_IP, $port)
If $ConnectedSocket = -1 Then
TrayTip("Changing IP adress!", "Error! Cant connect!", 10)
Sleep(3000)
Exit
EndIf
TrayTip("Changing IP adress!", "Connected.", 10)
$old = ""
$ret = TCPSend($ConnectedSocket, $username & @LF)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, $username & @LF)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, $username & @LF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP address!", $old, 10)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, $pass & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, "sh" & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(3000)
$ret = TCPSend($ConnectedSocket, "ifconfig nas_8_35 down" & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(10000)
$ret = TCPSend($ConnectedSocket, "ifconfig nas_8_35 up" & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, "exit" & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(2000)
$ret = TCPSend($ConnectedSocket, "exit" & @CRLF)
$old &= TCPRecv($ConnectedSocket, 2048)
TrayTip("Changing IP adress!", $old, 10)
Sleep(5000)
私はあなたが新しく追加されたことから、これらが起動する場所です、また、ユーザー名を3回あなた... を送る理由
は覚えていないことができ :
Autoit for absolute beginners
Autoit 1-2-3
は、
Autoit Tcp examples and scripts
TELNET
幸運を祈る!
あなたは私が助けを求めようとしている他の誰よりも100倍役立っています!私はnewbが学ぶのを助けるために時間を割いていただきありがとうございます!ありがとうございました! –
@BuzzKillingtonよろしくお願いします! ハッピーコーディング – Milos
また、忘れてしまったことは、cmd.exeを使用してtelnetで手動でログインして、実行する必要があるすべてのコマンドを調べて書き留めることができます。次に、TCPを使ってautoitでそれを複製するだけです。 – Milos