Networking Forums

Networking Forums > Computer Networking > Linux Networking > Using netcat for a small server

Reply
Thread Tools Display Modes

Using netcat for a small server

 
 
Thomas Henkel
Guest
Posts: n/a

 
      07-19-2003, 10:16 PM
Hi!

I wrote a simple server using netcat and a shell script (respectively a
batch file for MS-Dos).

At the moment I'm able to let netcat listen at a port, wait for incoming
traffic, respond to the client with a predefined answer (f.e. "ok") and
process the query thereafter:

netcat -l -p 50000 <answer.txt >query.txt
[...]

But what I want to do now is to receive a query from a client, process it
and answer with a *custom* response depending on the query to the same
connection. Is this possible at all with netcat? Any suggestions?

Tom
 
Reply With Quote
 
 
 
 
Xenna
Guest
Posts: n/a

 
      07-25-2003, 05:05 PM
Thomas Henkel wrote:

> But what I want to do now is to receive a query from a client, process it
> and answer with a *custom* response depending on the query to the same
> connection. Is this possible at all with netcat? Any suggestions?


I don't think so. I think you need to learn how to write Perl or Python
scripts or something...

Not every problem looks like a nail...

X.

 
Reply With Quote
Reply

Thread Tools
Display Modes

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
Problem opening a listening port using netcat ( or other server ) bradphelan Linux Networking 3 10-06-2006 08:04 PM
netcat as server, answers client inconsistently david Linux Networking 0 03-22-2006 01:25 AM
Small RADIUS Server? Eric Wireless Internet 8 10-19-2005 11:38 PM
Re: netcat as an http proxy server William Park Linux Networking 0 07-05-2004 08:40 PM
Small Business Server 2003 Premium DHCP server problems =?Utf-8?B?ZHBjaHJpc3RAaG9sZ2VyZGFuc2tlLmNvbQ==?= Windows Networking 4 06-10-2004 09:51 AM



1 2 3 4 5 6 7 8 9 10 11