1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-02-16 00:24:29 +01:00

Fix PHP Meterpreter crashing when trying to close a resource

This commit is contained in:
sjanusz 2022-03-30 11:51:24 +01:00
parent 00729491d3
commit 67cc780e6f
No known key found for this signature in database
GPG Key ID: 62086A0F9E2BB842

View File

@ -925,7 +925,9 @@ function close_process($proc) {
# real harm in that, so go ahead and just always make sure they get
# closed.
foreach ($proc['pipes'] as $f) {
if (is_resource($f)) {
@fclose($f);
}
}
if (is_callable('proc_get_status')) {
$status = proc_get_status($proc['handle']);
@ -1353,7 +1355,3 @@ function channel_create_stdapi_net_udp_client($req, &$pkt) {
return ERROR_SUCCESS;
}
}