| @@ -9,9 +9,9 @@ | ||
| 9 | 9 | public $siteinfo; |
| 10 | 10 | public $bvinfo; |
| 11 | 11 | public $bvapi; |
| 12 | 12 | |
| 13 | - const INFO_WING_VERSION = 2.2; | |
| 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; |
| @@ -116,15 +116,14 @@ | ||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | public function getThemes() { |
| 119 | 119 | $result = array(); |
| 120 | - $themes = function_exists('wp_get_themes') ? wp_get_themes() : get_themes(); | |
| 120 | + $themes = wp_get_themes(); | |
| 121 | 121 | foreach($themes as $theme) { |
| 122 | 122 | $pdata = $this->themeToArray($theme); |
| 123 | 123 | $result["themes"][] = $pdata; |
| 124 | 124 | } |
| 125 | - $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme(); | |
| 126 | - $pdata = $this->themeToArray($theme); | |
| 125 | + $pdata = $this->themeToArray(wp_get_theme()); | |
| 127 | 126 | $result["currenttheme"] = $pdata; |
| 128 | 127 | return $result; |
| 129 | 128 | } |
| 130 | 129 | |
| @@ -129,14 +128,14 @@ | ||
| 129 | 128 | } |
| 130 | 129 | |
| 131 | 130 | public function getSystemInfo() { |
| 132 | 131 | $sys_info = array( |
| 133 | - 'host' => $_SERVER['HTTP_HOST'], | |
| 132 | + 'host' => WPRHelper::getRawParam('SERVER', 'HTTP_HOST'), | |
| 134 | 133 | 'phpversion' => phpversion(), |
| 135 | 134 | 'AF_INET6' => defined('AF_INET6') |
| 136 | 135 | ); |
| 137 | 136 | if (array_key_exists('SERVER_ADDR', $_SERVER)) { |
| 138 | - $sys_info['serverip'] = $_SERVER['SERVER_ADDR']; | |
| 137 | + $sys_info['serverip'] = WPRHelper::getRawParam('SERVER', 'SERVER_ADDR'); | |
| 139 | 138 | } |
| 140 | 139 | if (function_exists('get_current_user')) { |
| 141 | 140 | $sys_info['user'] = get_current_user(); |
| 142 | 141 | } |
| @@ -177,8 +176,10 @@ | ||
| 177 | 176 | 'uploaddir' => wp_upload_dir(), |
| 178 | 177 | 'contentdir' => defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR : null, |
| 179 | 178 | 'contenturl' => defined('WP_CONTENT_URL') ? WP_CONTENT_URL : null, |
| 180 | 179 | 'plugindir' => defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : null, |
| 180 | + 'themedir' => get_stylesheet_directory(), | |
| 181 | + 'templatedir' => get_template_directory(), | |
| 181 | 182 | 'dbcharset' => defined('DB_CHARSET') ? DB_CHARSET : null, |
| 182 | 183 | 'disallow_file_edit' => defined('DISALLOW_FILE_EDIT'), |
| 183 | 184 | 'disallow_file_mods' => defined('DISALLOW_FILE_MODS'), |
| 184 | 185 | 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null, |
| @@ -184,9 +185,11 @@ | ||
| 184 | 185 | 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null, |
| 185 | 186 | 'custom_usermeta' => defined('CUSTOM_USERMETA_TABLE') ? CUSTOM_USERMETA_TABLE : null, |
| 186 | 187 | 'locale' => get_locale(), |
| 187 | 188 | 'wp_local_string' => $wp_local_package, |
| 188 | - 'charset_collate' => $db->getCharsetCollate() | |
| 189 | + 'charset_collate' => $db->getCharsetCollate(), | |
| 190 | + 'allowed_paths' => ini_get('open_basedir'), | |
| 191 | + 'path_seprator' => PATH_SEPARATOR | |
| 189 | 192 | ); |
| 190 | 193 | return $wp_info; |
| 191 | 194 | } |
| 192 | 195 | |
| @@ -225,8 +228,14 @@ | ||
| 225 | 228 | } |
| 226 | 229 | if (function_exists('openssl_public_decrypt')) { |
| 227 | 230 | $info['openssl_public_decrypt'] = "1"; |
| 228 | 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 | + } | |
| 229 | 238 | $info['sha1'] = "1"; |
| 230 | 239 | $info['apissl'] = "1"; |
| 231 | 240 | if (function_exists('base64_encode')) { |
| 232 | 241 | $info['b64encode'] = true; |
| @@ -273,9 +282,16 @@ | ||
| 273 | 282 | } |
| 274 | 283 | |
| 275 | 284 | public function getHostInfo() { |
| 276 | 285 | $host_info = $_SERVER; |
| 277 | - $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 | + | |
| 278 | 294 | if (array_key_exists('IS_PRESSABLE', get_defined_constants())) { |
| 279 | 295 | $host_info['IS_PRESSABLE'] = true; |
| 280 | 296 | } |
| 281 | 297 | |
| @@ -295,9 +311,9 @@ | ||
| 295 | 311 | } |
| 296 | 312 | |
| 297 | 313 | public function serverConfig() { |
| 298 | 314 | return array( |
| 299 | - 'software' => $_SERVER['SERVER_SOFTWARE'], | |
| 315 | + 'software' => WPRHelper::getRawParam('SERVER', 'SERVER_SOFTWARE'), | |
| 300 | 316 | 'sapi' => (function_exists('php_sapi_name')) ? php_sapi_name() : false, |
| 301 | 317 | 'has_apache_get_modules' => function_exists('apache_get_modules'), |
| 302 | 318 | 'posix_getuid' => (function_exists('posix_getuid')) ? posix_getuid() : null, |
| 303 | 319 | 'uid' => (function_exists('getmyuid')) ? getmyuid() : null, |