kctvt Posted October 24, 2009 Share Posted October 24, 2009 Hi, i'm trying to write a programe can login to my modem, but i dont know how, so... I need help. To login to modem, : - open Cmd: - type "telnet 192.168.1.1" - It'll ask the username,and password . Such as, Pass and user is "Luku" => Login to modem. So, how can we do that when using autoit ? Link to comment Share on other sites More sharing options...
Raven1 Posted October 24, 2009 Share Posted October 24, 2009 First, make sure that the Telnet Client is installed on your PC -> C:\Windows\System32\Telnet.exe If not, then you will have to add it using "Turn Windows Features On or Off" (Vista) or "Add/Remove Windows Components" (XP). Second, check the AutoIt help file for the ShellExecute() function. ShellExecute("telnet", "open 192.168.1.1") Link to comment Share on other sites More sharing options...
Baraoic Posted October 25, 2009 Share Posted October 25, 2009 Personally I would use putty for this then you could FileInstall it and wouldn't have to worry about if it was there. You can download it Here and its free. Now it depends on what your trying to do but if your trying to automate the entire thing then you should use plink which is the command line version. I use it for backing up our network configurations and here is what I useFileInstall("E:\plink.exe", @TempDir & "\plink.exe", 1) $PID = Run(@TempDir & "\plink.exe -SSH -l " & $User & " -pw " & $Pass & " " & $Target & " copy run tftp:", "", @SW_HIDE, 7) For $n = 1 To 45 Sleep(1000) $OUT = StdoutRead($PID) If StringInStr($OUT, "Address or name of remote host []?") Then StdinWrite($PID, $IP & @CRLF & @CRLF) Sleep(5000) ExitLoop EndIf NextYou can probibility modify it for your needs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now