[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: listen on tcp port and log input ??



Marcel Welschbillig wrote:
> 
> Dose anybody know of any programs i could use to open a port on a debian
> box and log the data that comes in to a file ??

I think netcat will work:
 	netcat -l -p port.you.wont.to.listen > /home/user/file
it will listen for a connection at the specifig port and write the data
to the file. After the connection ist stoped
the netcat will return. If you wont sevral connections one after another
and write it all to the file a script like:
#! /bin/bash
while [ 1 -lt 2 ] ; do
 	netcat -l -p port.you.wont.to.listen >> /home/user/file
done
exit 0
will add the data in the file.

ingo
-- 
ingo dross infomation/security architecture
[]___¸
######-\
O_-_-_O-\



Reply to: