HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/triad-infosec/wp-content/plugins/autoupdater/lib/Cli.php
<?php
defined('AUTOUPDATER_LIB') or die;

AutoUpdater_Loader::loadClass('Command_Base');

foreach (new DirectoryIterator(AUTOUPDATER_LIB_PATH . 'Command') as $file_info) {
    if (!$file_info->isFile() || $file_info->getExtension() !== 'php') {
        continue;
    }

    $command = strtolower($file_info->getBasename('.php'));
    if ($command === 'base') {
        continue;
    }

    $class_name = AutoUpdater_Loader::loadClass('Command_' . $file_info->getBasename('.php'));
    WP_CLI::add_command('autoupdater ' . $command, $class_name, array(
        'before_invoke' => $class_name . '::beforeInvoke'
    ));
}