Telnet proxy

S

Shuttermutt

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
 
J

James Willmore

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
 
N

news

Shuttermutt said:
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

Shuttermutt

A simple network proxy, in other words?




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
 
S

Shuttermutt

James said:
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 " 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
 
T

Tom Feist

Shuttermutt said:
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 " 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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top