rawkhopper Posted June 25, 2020 Share Posted June 25, 2020 Hello everybody, I have a tool that I need to send some commands to over telnet. I hate repetitive tasks. AutoIt is great for removing the need for me to do repitive tasks. Anyway when I am aligning a tool there are a few commands I send over telnet. This changes the conditions of the tool for alignment. I have a working script. But I was going to try to make a gui to include several scripts into one so that I could just click the corresponding button. Before I go that route I was wondering how hard it would be to get rid of plink.exe and use TCPConnect and such? Can someone one help me adapt this script to do that? I am not a programmer I am a hack that tends to cut and paste until it works but was hoping to up my game with this little project. Or is this project too difficult for someone like me? Seems like once I have a simple script I could do a lot with it. Please help! expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\Icons\Company.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WindowsConstants.au3> #include <Constants.au3> If Not FileExists ("C:\Comany\Service\TelnetTools\") Then ; Checks to see if the Dir exists and creates it if it is not there DirCreate ("C:\Comany\Service\TelnetTools\") EndIf If Not FileExists ("C:\Comany\Service\TelnetTools\plink.exe") Then ; Checks to see if the File exists and creates it if it is not there FileInstall (".\plink.exe", "C:\Comany\Service\TelnetTools\plink.exe") EndIf Run ("C:\Comany\Service\TelnetTools\plink.exe 192.168.0.2 -l Comany -pw password -no-antispoof") WinWait ("C:\Comany\Service\TelnetTools\plink.exe", "", 10) Sleep (1000) WinActivate ("C:\Comany\Service\TelnetTools\plink.exe") Sleep (2000) Send ("cmdtest") Send("{Enter}") Sleep (1000) Send ("293") Send("{Enter}") Sleep (1000) Send ("0") Send ("{Enter}") Sleep (1000) Send ("fff") Send ("{Enter}") Sleep (1000) Send ("logout") Send ("{Enter}") Sleep (500) Exit Link to comment Share on other sites More sharing options...
Nine Posted June 25, 2020 Share Posted June 25, 2020 There a very good examples in help file using TCP* functions. Look under Network / TCPRecv function, there are 2 examples that can serve as the basis of your script. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
rawkhopper Posted June 25, 2020 Author Share Posted June 25, 2020 So I see lots of TCP examples but not much in the way of interacting with an existing telnet server. Is this something that is difficult to do and requires a full telnet client? Link to comment Share on other sites More sharing options...
Nine Posted June 25, 2020 Share Posted June 25, 2020 Google AutoIt Telnet Server. You will get plenty of examples to start you up. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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