コード例 #1
0
ファイル: ElasticUn1c0rn.php プロジェクト: BikeMaker/Code
 static function output(\Un1c0rn\BaseExploit $exploit, $data)
 {
     $db = new \Un1c0rn\ElasticDb('pwn', 'hosts');
     $host = $db->load($exploit->ip);
     $insert = $host === false ? true : false;
     $db->save($exploit->ip, array('ip' => $exploit->ip, 'updated' => time()));
     $db->addData($exploit->ip, 'leaks', array('port' => $exploit->port, 'date' => time(), 'data' => $data, 'type' => $exploit->getTag()));
     $db->addData($exploit->ip, 'tags', $exploit->getTag());
 }
コード例 #2
0
ファイル: HostDetail.php プロジェクト: BikeMaker/Code
 function get($ip)
 {
     global $config;
     $this->setData('view', 'views/details.tpl');
     $_hostDb = new \Un1c0rn\ElasticDb('pwn', 'hosts', $config['elasticsearch']['ip']);
     $data = $_hostDb->load($ip);
     $this->templateData = array_merge($this->templateData, array('host' => $data));
     $this->templateData['page_title'] = 'Leak history for ' . $data['ip'];
     $this->render();
 }
コード例 #3
0
ファイル: Page.php プロジェクト: BikeMaker/Code
 function get($pageId)
 {
     global $config;
     $this->cache304($page, 3600);
     $this->setData('view', 'views/page.tpl');
     $_e = new \Un1c0rn\ElasticDb('site', 'pages', $config['elasticsearch']['ip']);
     $page = $_e->load($pageId);
     if (!$page) {
         $this->templateData['title'] = '404 - Page not found';
         $this->templateData['content'] = htmlentities($page) . ' not found :O';
         header("HTTP/1.0 404 Not Found");
     }
     $this->templateData = array_merge($this->templateData, $page);
     $this->render();
 }