!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/local/lib/node_modules/homebridge-config-ui-x/   drwxr-xr-x
Free 13.23 GB of 57.97 GB (22.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     extract-plugin-alias.js (3.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* eslint-disable @typescript-eslint/no-var-requires */

/**
 * This script "mocks" homebridge and is used to extract the plugin alias and type.
 */

const path = require('path');
const EventEmitter = require('events').EventEmitter;

let pluginAlias;
let pluginType;

const HomebridgeApiMock = {
  registerPlatform(pluginIdentifier, platformName, constructor) {
    pluginType = 'platform';
    if (typeof platformName === 'function') {
      constructor = platformName;
      platformName = pluginIdentifier;
      pluginAlias = platformName;
    } else {
      pluginAlias = platformName;
    }
  },
  registerAccessory(pluginIdentifier, accessoryName, constructor) {
    pluginType = 'accessory';
    if (typeof accessoryName === 'function') {
      constructor = accessoryName;
      accessoryName = pluginIdentifier;
      pluginAlias = accessoryName;
    } else {
      pluginAlias = accessoryName;
    }
  },
  version: 2.5,
  serverVersion: '1.2.3',
  on: () => { /** mock */ },
  emit: () => { /** mock */ },
  hap: {
    Characteristic: new class Characteristic extends EventEmitter {
      constructor() {
        super();
        return new Proxy(this, {
          get() {
            return {
              UUID: '0000003E-0000-1000-8000-0026BB765291',
            };
          }
        });
      }
    },
    Service: new class Service extends EventEmitter {
      constructor() {
        super();
        return new Proxy(this, {
          get() {
            return {
              UUID: '0000003E-0000-1000-8000-0026BB765291',
            };
          }
        });
      }
    },
    AccessoryLoader: {},
    Accessory: {},
    Bridge: {},
    Categories: {},
    Units: {},
    uuid: {
      generate: () => { /** mock */ }
    }
  },
  platformAccessory() {
    return {
      addService() { /** mock */ },
      getService() { /** mock */ },
      removeService() { /** mock */ },
      context() { /** mock */ },
      services() { /** mock */ }
    };
  },
  registerPlatformAccessories() { /** mock */ },
  unregisterPlatformAccessories() { /** mock */ },
  publishExternalAccessories() { /** mock */ },
  updatePlatformAccessories() { /** mock */ },
  user: {
    configPath() {
      return path.join(process.cwd(), 'config.json');
    },
    storagePath() {
      return process.cwd();
    },
    cachedAccessoryPath() {
      return path.join(process.cwd(), 'accessories');
    },
    persistPath() {
      return path.join(process.cwd(), 'persist');
    }
  }
};

function main() {
  try {
    let pluginInitializer;
    const pluginPath = process.env.UIX_EXTRACT_PLUGIN_PATH;
    const pluginModules = require(pluginPath);

    if (typeof pluginModules === 'function') {
      pluginInitializer = pluginModules;
    } else if (pluginModules && typeof pluginModules.default === 'function') {
      pluginInitializer = pluginModules.default;
    } else {
      throw new Error(`Plugin ${pluginPath} does not export a initializer function from main.`);
    }

    pluginInitializer(HomebridgeApiMock);

    process.send({
      pluginAlias: pluginAlias,
      pluginType: pluginType,
    });
    process.exit();

  } catch (e) {
    process.exit(1);
  }
}

main();

setTimeout(() => {
  process.exit(1);
}, 2500);

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0379 ]--