Scheduled Telnet Task

compaqman

Member
Hello All,

I am looking for a way to run a super simple Telnet script on a nightly basis.

Here is what needs to happen:

1.) Run Telnet
2.) Connect to 192.168.1.XXX
3.) "USERNAME"
4.) "PASSWORD"
5.) "#40 MACRO 50"
6.) Exit Telnet

** Bold is actual keystrokes that need to be sent.


I have two devices that should be capable of running this script.

I.) pfSense FreeBSD
II.) Windows XP W/ Task Scheduler (Needs to run whether logged in or not.)

Basically, This script needs to be run on a nightly basis, and I'm not sure how to execute it.

I welcome all of your ideas and input on this challenge.

Thanks!
- Jon
 
Here's the thing.

I need an application that sends the pre-configured commands via Telnet session.

I have created a WSF, and scheduled it with the Task Scheduler, but the WSF will not run, unless the user session is active. in other words, if the account is locked or logged off, the WSF will not run.

I found something called the Telnet Scripting Tool, but I can't get the program to 'WAIT' and see the proper string, for the final 'SEND' command.

In regards the the Telnet Scripting Tool here is the specific issue:

After the user and pass are authenticated, the telnet server responds with:
Authenticated.
Text Mode Engaged.
[begins a carriage return]


I can't get the Telnet Scripting Tool to see that carriage return to 'SEND' the #40 MACRO 50 command
 
Back
Top