One Hat Cyber Team
Your IP :
216.73.217.126
Server IP :
185.33.55.30
Server :
Linux cl30.webspacecontrol.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.1.34
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
cxs2
/
app
/
libs
/
CXS
/
Edit File:
Contacts.php
<?php /** * Contacts, Contacts * * @copyright Copyright (c) 2007 DotRoll Kft. (http://www.dotroll.com) * @author Zoltán Istvanovszki <zoltan.istvanovszki@dotroll.com> * @since 2017.06.13. * @package CXS_2.0 */ namespace CXS; class Contacts extends CommonComponent { /** * * @var array Contact list */ private $list = []; /** * * @var array Owners */ private $owners = []; /** * Init contacts */ public function onConstruct() { $this->update(); } /** * Store contact list from cPanel */ public function update() { if ($this->getType() == 'DirectAdmin') { return; } $this->log('Update contacts'); $this->list = []; /* @var $cpanel \CXS\Cpanel */ $cpanel = $this->di->get('cpanel'); $data = $cpanel->cAPI('listaccts'); if (!empty($data['acct'])) { foreach ($data['acct'] as $acct) { $this->list[$acct['user']] = $acct['email']; $this->owners[$acct['user']] = $acct['owner']; } foreach ($data['acct'] as $acct) { if (!\in_array($acct['owner'], ['root', 'domainab', 'freeweb', 'freemail'])) { $this->list[$acct['user']] = $this->list[$acct['owner']]; } } } $cpanel = null; unset($cpanel); $data = null; unset($data); } /** * Get user technical e-mail addresses * * @param string $hash Username * @return array */ public function get(string $hash): array { if ($this->getType() == 'DirectAdmin') { $conf = \parse_ini_file("/usr/local/directadmin/data/users/$hash/user.conf"); if (empty($conf['email'])) { return []; } return \array_unique(\array_map('trim', \explode(',', $conf['email']))); } if (!isset($this->list[$hash])) { $this->update(); } if (!isset($this->list[$hash])) { return [$this->di->get('config')->sender->email]; } return \explode(', ', $this->list[$hash]); } /** * Get user owner from cPanel * * @param string $hash Username * @return string */ public function getOwner(string $hash): string { if ($this->getType() == 'DirectAdmin') { return ''; } if (!isset($this->owners[$hash])) { $this->update(); } if (isset($this->owners[$hash])) { return $this->owners[$hash]; } return ''; } }
Simpan