13.7. cgi-test

Let's add to our black bag the following script:

#!/usr/bin/perl -Tw
use strict;
print "Content-type: text/plain

";
print "$_: $ENV{$_}
" for sort keys %ENV;
print "
Input:
";
print <STDIN>;

Use this whenever you have doubts about what a form is really sending to the server. Just make this script the target of the form action, and you'll get a terse dump of the environment variables and any content that the form sent via POST.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset