⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.37
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
psa-pear
/
pear
/
View File Name :
horde-remove-user-data
#!/usr/bin/env php * @category Horde * @copyright 2013-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl LGPL-2 * @package Horde */ $baseFile = __DIR__ . '/../lib/Application.php'; if (file_exists($baseFile)) { require_once $baseFile; } else { require_once 'PEAR/Config.php'; require_once PEAR_Config::singleton() ->get('horde_dir', null, 'pear.horde.org') . '/lib/Application.php'; } Horde_Registry::appInit('horde', array( 'authentication' => 'none', 'cli' => true, 'user_admin' => true )); $usage = <<
$usage, 'optionList' => array( new Horde_Argv_Option('-c', '--continue', array( 'action' => 'store_true', 'help' => 'Continue with next user on failure', 'dest' => 'continue' )), new Horde_Argv_Option('-f', '--force', array( 'action' => 'store_true', 'help' => 'Force removing without prompt', 'dest' => 'force' )), ) ) ); list($options, $argv) = $parser->parseArgs(); /* null = all; particular app otherwise */ $app = null; if (!count($argv)) { $cli->message('Horde directory: ' . realpath(HORDE_BASE), 'cli.message'); do { $user = $cli->prompt('Username:'); } while (!strlen($user)); $argv = array($user); $app = $cli->prompt('Application to remove data from (blank for all apps):'); if (!strlen($app)) { $app = null; } $cli->writeln(); } if (!$options->force) { $cli->writeln($cli->red('Removing data of user(s)') . ':'); $cli->writeln(' ' . implode(', ', $argv)); $cli->writeln(); if ($cli->prompt($cli->red('Are you sure you want to remove user data?'), array('y' => 'Yes', 'n' => 'No'), 'n') != 'y') { exit(0); } } foreach ($argv as $user) { try { $registry->removeUserData($user, $app); $cli->message($user . ': Data removed.', 'cli.success'); } catch (Horde_Exception $e) { if ($options->continue) { $cli->message($user . ': Data NOT removed completely. ' . $e->getMessage() , 'cli.error'); } else { $cli->fatal($user . ': Data NOT removed completely. ' . $e->getMessage()); } } }