using nc to simulate a service

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
Subject: using nc to simulate a service
On Tue, 12 Aug 2003, Mike Starke wrote:

> #! /usr/bin/perl
> system ("touch /home/me/it_worked-$ARGV[0]");


The "parameters" you mentioned are not command line arguments.

They become the standard input to the script.

Your script should read from standard input and store that data.

(Of course, you should limit how much data is read and also limit what is
saved based on what is accepted as your valid input.)

Jeremy C. Reed
http://www.reedmedia.net/