Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Telnet proxy

Reply
Thread Tools

Telnet proxy

 
 
Shuttermutt
Guest
Posts: n/a
 
      09-04-2003
Good day all! I'm looking to write a prog that sits in between a
telnet client and server. In other words, the telnet client of the
user's choice would connect to my prog which would, in turn, connect
to the telnet server. My prog would move data back and forth between
the client and the server without manipulating it.

I've started playing with Net::Telnet and IO::Socket, but before I go
too far, I'd like to know if anyone's run across this and/or if
somebody might have suggestions as to how I might proceed.

'Mutt


 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      09-04-2003
On Thu, 04 Sep 2003 12:03:58 GMT
"Shuttermutt" <(E-Mail Removed)> wrote:
> Good day all! I'm looking to write a prog that sits in between a
> telnet client and server. In other words, the telnet client of the
> user's choice would connect to my prog which would, in turn, connect
> to the telnet server. My prog would move data back and forth between
> the client and the server without manipulating it.
>
> I've started playing with Net::Telnet and IO::Socket, but before I
> go too far, I'd like to know if anyone's run across this and/or if
> somebody might have suggestions as to how I might proceed.


Don't use telnet Use SSH. Unless you're using telnet on the
client end and then using SSH to communicate with the server. Telnet
sends everything clear text - SSH does not.

There is Net::SSH and a few other SSH modules for Perl to aid in
development.

HTH
--
Jim
---
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
---
a real quote ...
Linus Torvalids: "They are somking crack ...."
(http://www.eweek.com/article2/0,3959,1227150,00.asp)
---
a fortune quote ...
X-rated movies are all alike ... the only thing they leave to the
imagination is the plot.
 
Reply With Quote
 
 
 
 
news@roaima.freeserve.co.uk
Guest
Posts: n/a
 
      09-04-2003
Shuttermutt <(E-Mail Removed)> wrote:
> Good day all! I'm looking to write a prog that sits in between a
> telnet client and server. In other words, the telnet client of the
> user's choice would connect to my prog which would, in turn, connect
> to the telnet server. My prog would move data back and forth between
> the client and the server without manipulating it.


A simple network proxy, in other words?

> I'd like to know if anyone's run across this and/or if
> somebody might have suggestions as to how I might proceed.


In the general case, google for telnet proxy. In the perl specific case,
check out the first hit on google for "perl telnet application proxy".

Chris
--
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}
 
Reply With Quote
 
Shuttermutt
Guest
Posts: n/a
 
      09-04-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Shuttermutt <(E-Mail Removed)> wrote:
>
>>Good day all! I'm looking to write a prog that sits in between a
>>telnet client and server. In other words, the telnet client of the
>>user's choice would connect to my prog which would, in turn, connect
>>to the telnet server. My prog would move data back and forth between
>>the client and the server without manipulating it.

>
>
> A simple network proxy, in other words?
>
>
>>I'd like to know if anyone's run across this and/or if
>>somebody might have suggestions as to how I might proceed.

>
>
> In the general case, google for telnet proxy. In the perl specific case,
> check out the first hit on google for "perl telnet application proxy".


Hmmm... I hadn't seen ip_relay.pl before. It'll be worth taking a look
at it to see how he's doing things. I've also been playing with
fwdport.pl from The Cookbook and, while I can get it to work, I'm having
some trouble with it failing OOTB.

The real reason for doing this is so that my prog can analyze the data
moving between the telnet client and server and, when it finds something
interesting, do something else. Nothing sinister, mind you. I'm trying
to put together a scripting framework for a telnet-based game.

Anyway, thanks for the pointer to ip_relay. I googled before I asked, I
promise!

'Mutt

 
Reply With Quote
 
Shuttermutt
Guest
Posts: n/a
 
      09-04-2003
James Willmore wrote:
> On Thu, 04 Sep 2003 12:03:58 GMT
> "Shuttermutt" <(E-Mail Removed)> wrote:
>
>>Good day all! I'm looking to write a prog that sits in between a
>>telnet client and server. In other words, the telnet client of the
>>user's choice would connect to my prog which would, in turn, connect
>>to the telnet server. My prog would move data back and forth between
>>the client and the server without manipulating it.
>>
>>I've started playing with Net::Telnet and IO::Socket, but before I
>>go too far, I'd like to know if anyone's run across this and/or if
>>somebody might have suggestions as to how I might proceed.

>
>
> Don't use telnet Use SSH. Unless you're using telnet on the
> client end and then using SSH to communicate with the server. Telnet
> sends everything clear text - SSH does not.
>
> There is Net::SSH and a few other SSH modules for Perl to aid in
> development.


Actually, I'm restricted to telnet since I don't have control over the
server side of things. I don't need a firewall type proxy as much as a
spy layer between the client of the user's choice and the server. You
see, I want to analyze the data being sent back and forth, catch what's
interesting, and use that as a part of a scripting framework for a
telnet-based game.

For example, if the server sent "Player Mutt moved from [A] to [B]" to
the client, I'd like to catch that and then let scripts act on that
information as they see fit. That way, if someone wanted to write a prog
that fired when a player moved and acted accordingly, my framework would
provide the necessary event and data to let them do that.

I've been playing with fwdport.pl from The Cookbook and I can proxy
ports, but I'm having trouble with the forking OOTB. If I can get it
fixed, the next step would be figuring out how to watch the data stream
between client and server.

Thanks for the heads up!
'Mutt

 
Reply With Quote
 
Tom Feist
Guest
Posts: n/a
 
      09-09-2003
Shuttermutt <(E-Mail Removed)> writes:

> Actually, I'm restricted to telnet since I don't have control over the
> server side of things. I don't need a firewall type proxy as much as a
> spy layer between the client of the user's choice and the server. You
> see, I want to analyze the data being sent back and forth, catch
> what's interesting, and use that as a part of a scripting framework
> for a telnet-based game.
>
> For example, if the server sent "Player Mutt moved from [A] to [B]" to
> the client, I'd like to catch that and then let scripts act on that
> information as they see fit. That way, if someone wanted to write a
> prog that fired when a player moved and acted accordingly, my
> framework would provide the necessary event and data to let them do
> that.


You could try using POE, specifically something like:
http://poe.perl.org/?POE_Cookbook/TCP_Forwarding and with the added
bonus of the event driven POE kernel available for doing the actual
logic. It really is a very handy framework for lots of common things.
(Uncommon ones too, I wouldn't doubt)

--
Shabble.
(Whose alarm clock is now running a small perl script)
 
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
telnet class - proxy option Carcarius Ruby 0 12-13-2007 09:54 PM
Telnet - attempting to initiate a telnet session within an established telnet session Carcarius Ruby 0 12-06-2007 03:26 AM
Need to talk to a telnet server and send a telnet break Jim Isaacson C Programming 5 11-05-2004 09:17 PM
Perl telnet proxy Shuttermutt Perl 0 09-03-2003 10:03 PM
How can I telnet when I dont have specific access to a telnet client Jack B. Pollack Computer Support 4 07-24-2003 08:58 PM



Advertisments