AutoHotkey Community

It is currently May 25th, 2012, 11:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: January 27th, 2008, 9:19 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
It's time to share something.
Script made in AHK.

Auto connect to a shell with putty or telnet and send command defined in the text file.

Quote:
Hi all.

If you want to change the script or configurations
you can Delete config.ini and run AutoTelnet or simply edit the .ini file.
Script.txt is the file where you put the commands which you would like to send.
I recommend to use Putty for telnet to avoid some chars (\, |, <, >, [, ]) problems which Microsoft Telnet does.
Use "Sl33p, milliseconds" for delay send between lines.
For force exit use "+exit". Use it if telnet or putty don't closed with standard exit command at the end of the script.

v1.3
1) Comment a single line with semicolon ";" (; Sl33p, 1000)
2) Ability to start the application Minimized or Maximized.
3) Added "RUN, <path>" (uppercase, case sensitive) for run an application on the local PC from the script.
4) Bugfix: in some cases AutoTelnet skipping a line of the script.

v1.2
1) Password can't be read from config.ini as text (simple crypter, just for hide)
2) Added "Silent Mode" that disables the "Done" message box.
3) Added command line support for custom .ini and .txt files.
Usage: autotelnet.exe <ini_filename> <script_filename>

v1.12
1) Added "Slow Mode". Use it if you got lowercase/uppercase, and non letters problems such (\, |, <, >, [, ],{,})
2) No more known limitation. Now you can send { } brackets (Slow Mode needed)

v1.11
Small bugfix

v1.1
1) Bugfix
2) Added Sleep in "Commands to send" window. (Wait X milliseconds between lines)
With negative value the script is a bit faster but it can cause skips.
3) Added "Sl33p, <ms>" command. (Wait X milliseconds for a single line)
4) Supports SSH with Putty (putty.exe -ssh IP)
5) Added "+exit" command that sends exit and kill the process (putty, telnet or any other)


Command Line Examples:
1) autotelnet.exe box1.conf script_1.txt (if files dont exist it create box1.conf and script_1.txt)
2) autotelnet.exe box1.conf (if files dont exist it create box1.conf and script.txt)
(if script_filename omitted script.txt will be used, just script_file cant be used)
3) autotelnet.exe (no command line parameter, uses default conf.ini and script.txt)


Script Example (script.txt file):
ps x
; with removing semicolon in the line below will send " ls"
; ls
Sl33p, 1000
help
; the line below wait for 2 secs and then continue (2000ms)
Sl33p, 2000
RUN, shutdown.exe -s -t 120
; shutdown your PC after 120 secs
Sl33p, 5000
RUN, C:\WINDOWS\system32\shutdown.exe -a
; abort the shutdown process
+exit


Scripter: DJAnonimo


Download


Last edited by DJAnonimo on May 10th, 2008, 2:30 am, edited 5 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2008, 9:34 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
If it is in AHK, post it in Scripts & Functions :wink:

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2008, 11:26 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
It's ok without source there?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2008, 11:33 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Yes.

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2008, 11:39 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
I've moved this topic to Scripts & Functions for you. If you want it back just let me know, although I believe this section has greater exposure :)

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Use NTAutoScript
PostPosted: December 21st, 2008, 5:33 pm 
The NTAutoScript is much better than this one.
and work well anywhere in any console program,not only telnet.
email zhitenglin@163.com
reply you a copy to have a try.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 22nd, 2008, 12:35 am 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
AutoTelnet works with putty SSH and puttytel not only telnet.
it send text to any program, you can send to notepad too.

anyway thank you for info


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2010, 10:29 pm 
DJAnonimo:
how to translate AutoTelnet to other language?. After unpack and run Autotelnet report: "EXE corrupted"


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 5th, 2010, 1:16 am 
Offline

Joined: February 23rd, 2006, 7:43 pm
Posts: 168
Location: Portugal
Don't work in Windows 7 well...

Why don't you give the source so I can correct it? :(
I really don't understand...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg, tic and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group