Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../var/softacul.../suitecrm
File: get_user.php
<?php
[0] Fix | Delete
[1] Fix | Delete
@unlink('get_user.php');
[2] Fix | Delete
[3] Fix | Delete
function __getRunningUser(){
[4] Fix | Delete
// works on Windows and Linux, but might return null on systems that include "exec" in
[5] Fix | Delete
// disabled_functions in php.ini (typical in shared hosting)
[6] Fix | Delete
$runningUser = exec('whoami');
[7] Fix | Delete
[8] Fix | Delete
if ($runningUser == null) { // matches null, false and ""
[9] Fix | Delete
if (__is_windows()) {
[10] Fix | Delete
$runningUser = getenv('USERDOMAIN').'\\'.getenv('USERNAME');
[11] Fix | Delete
} elseif (function_exists('posix_getpwuid') && function_exists('posix_geteuid')) {
[12] Fix | Delete
$usr = posix_getpwuid(posix_geteuid());
[13] Fix | Delete
$runningUser = $usr['name'];
[14] Fix | Delete
}
[15] Fix | Delete
}
[16] Fix | Delete
return ($runningUser == null) ? '' : $runningUser;
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
function __is_windows(){
[20] Fix | Delete
[21] Fix | Delete
static $is_windows = null;
[22] Fix | Delete
if (!isset($is_windows)) {
[23] Fix | Delete
$is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN';
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
return $is_windows;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
$cronUser = __getRunningUser();
[30] Fix | Delete
echo '<get_user>'.$cronUser.'</get_user>';
[31] Fix | Delete
[32] Fix | Delete
?>
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function