PluginProbe
The WP Remote WordPress Plugin / 6.36
The WP Remote WordPress Plugin v6.36
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | callback/wings/info.php +82 -20 5.456.36 View file →
@@ -9,9 +9,9 @@
9 9 public $siteinfo;
10 10 public $bvinfo;
11 11 public $bvapi;
12 12
13 - const INFO_WING_VERSION = 2.0;
13 + const INFO_WING_VERSION = 2.7;
14 14
15 15 public function __construct($callback_handler) {
16 16 $this->db = $callback_handler->db;
17 17 $this->siteinfo = $callback_handler->siteinfo;
@@ -51,10 +51,13 @@
51 51 $pdata['current_db_version'] = $this->settings->getOption('woocommerce_db_version');
52 52 $pdata['latest_db_version'] = $this->bvinfo->getLatestWooCommerceDBVersion();
53 53 break;
54 54 case "elementor/elementor.php":
55 + $pdata['current_db_version'] = $this->settings->getOption('elementor_version');
56 + $pdata['latest_db_version'] = $this->bvinfo->getLatestElementorDBVersion($plugin_file);
57 + break;
55 58 case "elementor-pro/elementor-pro.php":
56 - $pdata['current_db_version'] = $this->settings->getOption('elementor_version');
59 + $pdata['current_db_version'] = $this->settings->getOption('elementor_pro_version');
57 60 $pdata['latest_db_version'] = $this->bvinfo->getLatestElementorDBVersion($plugin_file);
58 61 break;
59 62 }
60 63
@@ -72,9 +75,13 @@
72 75 'file' => $plugin_file,
73 76 'title' => $plugin_data['Title'],
74 77 'version' => $plugin_data['Version'],
75 78 'active' => is_plugin_active($plugin_file),
76 - 'network' => $plugin_data['Network']
79 + 'network' => $plugin_data['Network'],
80 + "plugin_uri" => $plugin_data["PluginURI"],
81 + "update_uri" => $plugin_data["UpdateURI"],
82 + "author_uri" => $plugin_data["AuthorURI"],
83 + "author" => $plugin_data["AuthorName"],
77 84 );
78 85 $pdata = $this->addDBInfoToPlugin($pdata, $plugin_file);
79 86 $result["plugins"][] = $pdata;
80 87 }
@@ -87,9 +94,13 @@
87 94 'name' => $theme->Name,
88 95 'title' => $theme->Title,
89 96 'stylesheet' => $theme->get_stylesheet(),
90 97 'template' => $theme->Template,
91 - 'version' => $theme->Version
98 + 'version' => $theme->Version,
99 + 'theme_uri' => $theme->get('ThemeURI'),
100 + 'author' => $theme->get('Author'),
101 + 'author_uri' => $theme->get('AuthorURI'),
102 + 'update_uri' => $theme->get('UpdateURI'),
92 103 );
93 104 } else {
94 105 $pdata = array(
95 106 'name' => $theme["Name"],
@@ -95,9 +106,11 @@
95 106 'name' => $theme["Name"],
96 107 'title' => $theme["Title"],
97 108 'stylesheet' => $theme["Stylesheet"],
98 109 'template' => $theme["Template"],
99 - 'version' => $theme["Version"]
110 + 'version' => $theme["Version"],
111 + 'author' => $theme['Author'],
112 + 'author_uri' => $theme['Author URI'],
100 113 );
101 114 }
102 115 return $pdata;
103 116 }
@@ -103,15 +116,14 @@
103 116 }
104 117
105 118 public function getThemes() {
106 119 $result = array();
107 - $themes = function_exists('wp_get_themes') ? wp_get_themes() : get_themes();
120 + $themes = wp_get_themes();
108 121 foreach($themes as $theme) {
109 122 $pdata = $this->themeToArray($theme);
110 123 $result["themes"][] = $pdata;
111 124 }
112 - $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme();
113 - $pdata = $this->themeToArray($theme);
125 + $pdata = $this->themeToArray(wp_get_theme());
114 126 $result["currenttheme"] = $pdata;
115 127 return $result;
116 128 }
117 129
@@ -116,14 +128,14 @@
116 128 }
117 129
118 130 public function getSystemInfo() {
119 131 $sys_info = array(
120 - 'host' => $_SERVER['HTTP_HOST'],
132 + 'host' => WPRHelper::getRawParam('SERVER', 'HTTP_HOST'),
121 133 'phpversion' => phpversion(),
122 134 'AF_INET6' => defined('AF_INET6')
123 135 );
124 136 if (array_key_exists('SERVER_ADDR', $_SERVER)) {
125 - $sys_info['serverip'] = $_SERVER['SERVER_ADDR'];
137 + $sys_info['serverip'] = WPRHelper::getRawParam('SERVER', 'SERVER_ADDR');
126 138 }
127 139 if (function_exists('get_current_user')) {
128 140 $sys_info['user'] = get_current_user();
129 141 }
@@ -164,8 +176,10 @@
164 176 'uploaddir' => wp_upload_dir(),
165 177 'contentdir' => defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR : null,
166 178 'contenturl' => defined('WP_CONTENT_URL') ? WP_CONTENT_URL : null,
167 179 'plugindir' => defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : null,
180 + 'themedir' => get_stylesheet_directory(),
181 + 'templatedir' => get_template_directory(),
168 182 'dbcharset' => defined('DB_CHARSET') ? DB_CHARSET : null,
169 183 'disallow_file_edit' => defined('DISALLOW_FILE_EDIT'),
170 184 'disallow_file_mods' => defined('DISALLOW_FILE_MODS'),
171 185 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null,
@@ -171,9 +185,11 @@
171 185 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null,
172 186 'custom_usermeta' => defined('CUSTOM_USERMETA_TABLE') ? CUSTOM_USERMETA_TABLE : null,
173 187 'locale' => get_locale(),
174 188 'wp_local_string' => $wp_local_package,
175 - 'charset_collate' => $db->getCharsetCollate()
189 + 'charset_collate' => $db->getCharsetCollate(),
190 + 'allowed_paths' => ini_get('open_basedir'),
191 + 'path_seprator' => PATH_SEPARATOR
176 192 );
177 193 return $wp_info;
178 194 }
179 195
@@ -212,8 +228,14 @@
212 228 }
213 229 if (function_exists('openssl_public_decrypt')) {
214 230 $info['openssl_public_decrypt'] = "1";
215 231 }
232 + if (function_exists('openssl_encrypt')) {
233 + $info['openssl_encrypt'] = "1";
234 + }
235 + if (function_exists('openssl_decrypt')) {
236 + $info['openssl_decrypt'] = "1";
237 + }
216 238 $info['sha1'] = "1";
217 239 $info['apissl'] = "1";
218 240 if (function_exists('base64_encode')) {
219 241 $info['b64encode'] = true;
@@ -260,9 +282,16 @@
260 282 }
261 283
262 284 public function getHostInfo() {
263 285 $host_info = $_SERVER;
264 - $host_info['PHP_SERVER_NAME'] = php_uname('\n');
286 + if (function_exists('php_uname')) {
287 + $host_info['PHP_SERVER_NAME'] = php_uname();
288 + }
289 +
290 + if (isset($_SERVER['SERVER_ADDR']) && function_exists('gethostbyaddr')) {
291 + $host_info['HOST_FROM_IP'] = gethostbyaddr(WPRHelper::getRawParam('SERVER', 'SERVER_ADDR'));
292 + }
293 +
265 294 if (array_key_exists('IS_PRESSABLE', get_defined_constants())) {
266 295 $host_info['IS_PRESSABLE'] = true;
267 296 }
268 297
@@ -273,14 +302,18 @@
273 302 if (defined('WPE_APIKEY')) {
274 303 $host_info['WPE_APIKEY'] = WPE_APIKEY;
275 304 }
276 305
306 + if (defined('IS_ATOMIC')) {
307 + $host_info['IS_ATOMIC'] = IS_ATOMIC;
308 + }
309 +
277 310 return $host_info;
278 311 }
279 312
280 313 public function serverConfig() {
281 314 return array(
282 - 'software' => $_SERVER['SERVER_SOFTWARE'],
315 + 'software' => WPRHelper::getRawParam('SERVER', 'SERVER_SOFTWARE'),
283 316 'sapi' => (function_exists('php_sapi_name')) ? php_sapi_name() : false,
284 317 'has_apache_get_modules' => function_exists('apache_get_modules'),
285 318 'posix_getuid' => (function_exists('posix_getuid')) ? posix_getuid() : null,
286 319 'uid' => (function_exists('getmyuid')) ? getmyuid() : null,
@@ -473,8 +506,31 @@
473 506
474 507 return $result;
475 508 }
476 509
510 + function getPluginFileData($plugin_file) {
511 + $result = array();
512 +
513 + if (!function_exists('get_plugin_data')) {
514 + require_once ABSPATH . 'wp-admin/includes/plugin.php';
515 + }
516 + $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_file);
517 + if ($plugin_data && isset($plugin_data['Version'])) {
518 + $result['version'] = $plugin_data['Version'];
519 + }
520 +
521 + return $result;
522 + }
523 +
524 + function fetchPluginApiData($slug, $action) {
525 + $args = array('slug' => wp_unslash($slug));
526 + $args = (object) $args;
527 + $args = apply_filters('plugins_api_args', $args, $action);
528 + $data = apply_filters('plugins_api', false, $action, $args);
529 +
530 + return $data;
531 + }
532 +
477 533 public function process($request) {
478 534 $db = $this->db;
479 535 $params = $request->params;
480 536 switch ($request->method) {
@@ -530,16 +586,22 @@
530 586 break;
531 587 case "gthost":
532 588 $resp = array('host_info' => $this->getHostInfo());
533 589 break;
590 + case "gtplsinfo":
591 + $resp = array("plugins_info" => array());
592 + $file_by_slug = $params["file_by_slug"];
593 + foreach ($params['slugs'] as $slug) {
594 + $data = $this->fetchPluginApiData($slug, $params['action']);
595 + if (is_object($data) && !property_exists($data, 'version') && isset($file_by_slug[$slug])) {
596 + $plugin_data = $this->getPluginFileData($file_by_slug[$slug]);
597 + $data->version = $plugin_data['version'];
598 + }
599 + $resp['plugins_info'][$slug] = $data;
600 + }
601 + break;
534 602 case "gtplinfo":
535 - $args = array(
536 - 'slug' => wp_unslash($params['slug'])
537 - );
538 - $action = $params['action'];
539 - $args = (object) $args;
540 - $args = apply_filters('plugins_api_args', $args, $action);
541 - $data = apply_filters('plugins_api', false, $action, $args);
603 + $data = $this->fetchPluginApiData($params['slug'], $params['action']);
542 604 $resp = array("plugins_info" => $data);
543 605 break;
544 606 case "gtpostactinfo":
545 607 $resp = $this->getPostActivateInfo($params);