⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.50
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 :
nag-create-missing-add-histories-sql
#!/usr/bin/env php */ if (file_exists(__DIR__ . '/../../nag/lib/Application.php')) { $baseDir = __DIR__ . '/../'; } else { require_once 'PEAR/Config.php'; $baseDir = PEAR_Config::singleton() ->get('horde_dir', null, 'pear.horde.org') . '/nag/'; } require_once $baseDir . 'lib/Application.php'; Horde_Registry::appInit('nag', array('cli' => true)); $history = $GLOBALS['injector']->getInstance('Horde_History'); // Run through every tasklist. $tasklists = $nag_shares->listAllShares(); foreach ($tasklists as $tasklist => $share) { $cli->writeln("Creating default histories for $tasklist ..."); // List all tasks. $storage = $GLOBALS['injector']->getInstance('Nag_Factory_Driver')->create($tasklist); $storage->retrieve(); $tasks = $storage->listTasks(); foreach ($tasks as $taskId => $task) { $log = $history->getHistory('nag:' . $tasklist . ':' . $task['uid']); $created = false; foreach ($log as $entry) { if ($entry['action'] == 'add') { $created = true; break; } } if (!$created) { $history->log('nag:' . $tasklist . ':' . $task['uid'], array('action' => 'add'), true); } } } $cli->writeln("** Default histories successfully created ***");