uawdijnntqw1x1x1
IP : 18.221.22.85
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.trash
/
quran
/
..
/
catalog.2
/
.
/
controller
/
api
/
login.php
/
/
<?php class ControllerApiLogin extends Controller { public function index() { $this->load->language('api/login'); $json = $api_info = array(); $this->load->model('account/api'); // Login with API Key if (isset($this->request->post['username']) && isset($this->request->post['key'])) { $api_info = $this->model_account_api->login($this->request->post['username'], $this->request->post['key']); } elseif (isset($this->request->post['key'])) { $api_info = $this->model_account_api->login('Default', $this->request->post['key']); } if ($api_info) { // Check if IP is allowed $ip_data = array(); $results = $this->model_account_api->getApiIps($api_info['api_id']); foreach ($results as $result) { $ip_data[] = trim($result['ip']); } if (!in_array($this->request->server['REMOTE_ADDR'], $ip_data)) { $json['error']['ip'] = sprintf($this->language->get('error_ip'), $this->request->server['REMOTE_ADDR']); } if (!$json) { $json['success'] = $this->language->get('text_success'); $session = new Session($this->config->get('session_engine'), $this->registry); $session->start(); $this->model_account_api->addApiSession($api_info['api_id'], $session->getId(), $this->request->server['REMOTE_ADDR']); $session->data['api_id'] = $api_info['api_id']; // Create Token $json['api_token'] = $session->getId(); } else { $json['error']['key'] = $this->language->get('error_key'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
/home/sudancam/.trash/quran/../catalog.2/./controller/api/login.php