Network protocols

Hi folks

I am working on a project involving different network protocols, http
and
irc to mention two, to simulate responses back to the sender.
In this case i was wondering if there is some way to have one daemon
listening on a port, and when requested figure out what response to
simulate
for the sender to accept the answer. I want to do this instead of having
to write separate daemons for each service.

Any thoughts on this matter maybe?

I hope my answer was understandable.

Thanks in advance.

-Terje

On 19/10/2012, at 6:54 AM, Terje H. wrote:

Any thoughts on this matter maybe?

This would be possible except each protocol usually uses a different
port.

Henry

On Thu, Oct 18, 2012 at 9:50 PM, Henry M. [email protected]
wrote:

to write separate daemons for each service.

Any thoughts on this matter maybe?

This would be possible except each protocol usually uses a different port.

I’d prefer to keep protocols separate even if they share common code
or even data. But since in reality one port is only used for one type
of service it seems there is no real requirement to have then on a
single port especially since automatic protocol detection might be
complicated etc.

Kind regards

robert

Thanks to all of you for your response. I can see the use of ports to
identify the protocol used, but this is first and foremost intended to
be used for malware analysis - where i already have problems Identifying
the protocol used. But i think this is possible for irc and maybe http,
as these are the most common protocols used. Still i have problems to
find out what port it starts sending to before i have to identify the
protocol. It was a good idea, suddenly it seems so far away :wink:

As a side note i should also mention that i know of easier methods to do
this, as to use a regular irc or web-server daemon - but again thats not
the point :slight_smile:

Again thanks for enlighten me on your view guys, much appreciated.

Best regards

-Terje

Terje H. wrote in post #1080315:

I am working on a project involving different network protocols, http
and
irc to mention two, to simulate responses back to the sender.
In this case i was wondering if there is some way to have one daemon
listening on a port, and when requested figure out what response to
simulate
for the sender to accept the answer. I want to do this instead of having
to write separate daemons for each service.

Many protocols involve the server sending a message before the client
sends anything - SMTP and POP3 are two examples. So you can’t guess the
protocol based on what the client sends, you have to look at the port.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs