socket "sniffing" and redirection
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > socket "sniffing" and redirection




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    socket "sniffing" and redirection  
luc wastiaux


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 12:47 PM

Hello,
I need to analyze a protocol that uses a simple TCP socket, and I don't
have root access on the system. I was wondering if there exists a
utility that listens on a certain port,  prints (hexdump) the data it
reads, then forwards the data to a remote machine, thereby allowing me
to analyse the protocol without root access.

Thanks for any suggestions.

--
luc wastiaux





[ Post a follow-up to this message ]



    Re: socket "sniffing" and redirection  
Heiko


Report This Message To A Moderator Edit/Delete Message


 
10-03-04 10:55 PM

luc wastiaux wrote:

> I need to analyze a protocol that uses a simple TCP socket, and I don't
> have root access on the system. I was wondering if there exists a
> utility that listens on a certain port,  prints (hexdump) the data it
> reads, then forwards the data to a remote machine, thereby allowing me
> to analyse the protocol without root access.

See if "netcat" (or "nc") is installed.
The actual program is usually called "nc", and "netcat" being a symlink
to it.

$ nc -l -p 19368 | hexdump

-l		listen
-p 19368	port number to listen on

(see "man nc" or "man netcat")

Regards,

Heiko





[ Post a follow-up to this message ]



    Re: socket "sniffing" and redirection  
Martijn Lievaart


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 10:55 PM

On Sun, 03 Oct 2004 16:14:23 +0200, Heiko wrote:

> luc wastiaux wrote:
> 
>
> See if "netcat" (or "nc") is installed.
> The actual program is usually called "nc", and "netcat" being a symlink
> to it.
>
> $ nc -l -p 19368 | hexdump
>
> 	-l		listen
> 	-p 19368	port number to listen on
>
> 	(see "man nc" or "man netcat")

Exactly the answer I was going to give, with the addition that this only
works on unprivileged ports. Otherwise you simply need root access.

As to forwarding to another machine, again netcat. If you need to make a
bi-directional pipe, some simple PERL is in order, stfw.

M4
--
Redundancy is a great way to introduce more single points of failure.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:20 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register