403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/usr/share/doc/libipc-run-perl/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/share/doc/libipc-run-perl/examples/synopsis_scripting
#!/usr/bin/perl -w
use strict;

my @cat = qw( cat );
my ( $in_q, $out_q, $err_q );

use IPC::Run qw( start pump finish timeout );

# Incrementally read from / write to scalars.  Note that $in_q
# is a queue that is drained as it is used. $h is for "harness".
my $h = start \@cat, \$in_q, \$out_q, \$err_q, timeout(10), debug => 1;

$in_q .= "some input\n";
pump $h until $out_q =~ /input\n/g;

$in_q .= "some more input\n";
pump $h until $out_q =~ /\G.*more input\n/;

$in_q .= "some final input\n";
finish $h or die "cat returned $?";

warn $err_q if $err_q;
print $out_q ;    ## All of cat's output


Youez - 2016 - github.com/yon3zu
LinuXploit