using nc to simulate a service

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy C. Reed
Dátum:  
Tárgy: 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/