daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Dec 10th, 2015 164 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use FCGI::Client;
  6. use IO::Socket::INET;
  7.  
  8. my $port = 9000;
  9.     my $sock = IO::Socket::INET->new(
  10.         PeerAddr => '127.0.0.1',
  11.         PeerPort => $port,
  12.     ) or die $!;
  13.     my $client = FCGI::Client::Connection->new( sock => $sock );
  14.     my ( $stdout, $stderr ) = $client->request(
  15.         +{
  16.             REQUEST_METHOD => 'GET',
  17.             QUERY_STRING   => 'foo=bar',
  18.             SCRIPT_URI     => '/index.php',
  19.             REQUEST_URI    => 'x' x 1000,
  20.         },
  21.         ''
  22.     );
  23.  
  24. print "Stdout: $stdout\n";
  25. print "Stderr: $stderr\n";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top