Skip to content

Commit

Permalink
(PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')
Browse files Browse the repository at this point in the history
  • Loading branch information
namiltd committed May 19, 2024
1 parent f9784f1 commit 71e8488
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugins/bat/class.bat.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct($enc)
$buffer = array();
switch (strtolower(PSI_PLUGIN_BAT_ACCESS)) {
case 'command':
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
$_cim = WINNT::getcimv2wmi();
$_wmi = WINNT::initWMI('root\WMI');
$bufferWB = array();
Expand Down
2 changes: 1 addition & 1 deletion plugins/diskload/class.diskload.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($enc)
*/
public function execute()
{
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
$diskphys = array();
$disklogi = array();
try {
Expand Down
2 changes: 1 addition & 1 deletion plugins/hyperv/class.hyperv.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($enc)
*/
public function execute()
{
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) switch (strtolower(PSI_PLUGIN_HYPERV_ACCESS)) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) switch (strtolower(PSI_PLUGIN_HYPERV_ACCESS)) {
case 'command':
try {
$buffer = WINNT::_get_Win32_OperatingSystem();
Expand Down
2 changes: 1 addition & 1 deletion plugins/ps/class.ps.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($enc)
$buffer = "";
switch (strtolower(PSI_PLUGIN_PS_ACCESS)) {
case 'command':
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
try {
$os_wmi = WINNT::_get_Win32_OperatingSystem();
$memtotal = 0;
Expand Down
4 changes: 2 additions & 2 deletions plugins/psstatus/class.psstatus.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct($enc)
} else {
$processes = array(PSI_PLUGIN_PSSTATUS_PROCESSES);
}
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
$short = true;
if (strcasecmp($enc, "UTF-8") == 0) {
foreach ($processes as $process) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public function __construct($enc)
public function execute()
{
if (defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES)) {
if (((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) &&
if ((((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) &&
(strtolower(PSI_PLUGIN_PSSTATUS_ACCESS) == 'command')) {
$strBuf = PSI_PLUGIN_PSSTATUS_PROCESSES;
if (defined('PSI_EMU_HOSTNAME')) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/smart/class.smart.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct($enc)

switch (strtolower(PSI_PLUGIN_SMART_ACCESS)) {
case 'wmi':
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if ((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME') && !WINNT::isAdmin()) {
$this->global_error->addError("SMART WMI mode error", "Mode allowed for WinNT systems, with administrator privileges (run as administrator)");
} else {
Expand Down
2 changes: 1 addition & 1 deletion plugins/stablebit/class.stablebit.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($enc)
*/
public function execute()
{
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
try {
$wmi = WINNT::initWMI('root\StableBit\Scanner');
$this->_result = WINNT::getWMI($wmi, 'Disks', $this->stablebit_items);
Expand Down

0 comments on commit 71e8488

Please sign in to comment.