Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > telnetting without a telnet module

Reply
Thread Tools

telnetting without a telnet module

 
 
Howard
Guest
Posts: n/a
 
      11-07-2003
Hello everyone,
i was wondering if anybody knew how to "telnet" to another machine
to get a file, but the machine that i am using and the machine i am
targetting both do not have the telnet module. Thanks


Howard
 
Reply With Quote
 
 
 
 
Jane Gaddal
Guest
Posts: n/a
 
      11-14-2003
Use HTTP Post


"Howard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hello everyone,
> i was wondering if anybody knew how to "telnet" to another machine
> to get a file, but the machine that i am using and the machine i am
> targetting both do not have the telnet module. Thanks
>
>
> Howard



 
Reply With Quote
 
 
 
 
GIMME
Guest
Posts: n/a
 
      11-17-2003
Why don't you run Perl from ANT and then have ANT handle the ftp task
?

ANT will allow you to telnet to a remote host and to execute an
ftp from there to yet another remote host. So you can get around
a firewall.

Something like ...

<project name="Manifest" basedir="." default="Doc" >

<property file="${JobName}/job.properties"/>
<property name="JobOrderOutput" value="${JobOrderRoot}/job_output"/>
<property name="Perl" value="/usr/local/bin/perl"/>
<property name="JobOrderPerl" value="${JobOrderRoot}/perl"/>
<property name="JobOrderPerlLib" value="${JobOrderRoot}/lib"/>

<target name="RunPerl">
<echo message="exc : ${Perl} -I${JobOrderPerlLib}
${JobOrderPerl}/${JobScript} ${JobOrderOutput} ${JobOrderArgs}"/>
<exec executable="${Perl}">
<arg line="-I${JobOrderPerlLib}"/>
<arg line="${JobOrderPerl}/${JobScript}"/>
<arg line="${JobOrderOutput}"/>
</exec>
</target>


<target name="FtpToStaging">
<echo message="ftp : ${FTPServer} as ${FTPUserID}/${FTPPassword}"/>
<echo message="lcd : ${JobOrderOutput}"/>
<echo message="put : ${JobOrderOutputFileName}"/>
<ftp server="${FTPServer}"
remotedir="${FTPRemoteDir}"
userid="${FTPUserID}"
password="${FTPPassword}"
>

<fileset dir="${JobOrderOutput}">
<include name="${JobOrderOutputFileName}"/>
</fileset>
</ftp>
</target>


<target name="StagingPushToRemote">
<telnet userid="${TNPStageUserID}"
password="${TNPStagePassword}"
server="${TNPStageServer}"
>

<read string="${TNPStagePrompt}"/>
<write string="ftp ${TNPExternalHost}"/>
<read>):</read>
<write string="${TNPExternalHostUserID}"/>
<read>:</read>
<write string="${TNPExternalHostPassword}"/>
<read>ftp></read>
<write string="binary"/>
<read>ftp></read>
<write string="${TNPExecuteLCD}"/>
<read>ftp></read>
<write string="${TNPExecuteCD}"/>
<read>ftp></read>
<write string="${TNPExecutePush}"/>
<read>ftp></read>
<write>quit</write>
</telnet>
</target>

<target name="MainTarget" >
<antcall target="RunPerl"/>
<antcall target="FtpToStaging"/>
<antcall target="StagingPushToRemote"/>
</target>

</project>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnetting to diff IP with same port number tukker Java 2 04-27-2010 06:27 PM
Telnet - attempting to initiate a telnet session within an established telnet session Carcarius Ruby 0 12-06-2007 03:26 AM
Re: Telnetting into my router Martin Bilgrav Cisco 3 12-05-2006 09:52 PM
Help: Something is telnetting to my Cisco's (Ciscoworks?) genki Cisco 2 12-05-2005 05:11 PM
Telnetting on Mac OSx Jack B. Pollack Computer Support 2 02-23-2004 05:51 PM



Advertisments