mirror of https://github.com/MISP/MISP
parent
d89ab91dee
commit
ea9aa8eb3a
|
@ -998,9 +998,11 @@ class EventsController extends AppController {
|
|||
* @param unknown_type $message The custom message that will be appended to the email.
|
||||
* @param unknown_type $all, true: send to org, false: send to person.
|
||||
*
|
||||
* @return True if success, False if error
|
||||
* @codingStandardsIgnoreStart
|
||||
* @throws UnauthorizedException as well.
|
||||
* @codingStandardsIgnoreEnd
|
||||
*
|
||||
* @throws NotFoundException,UnauthorizedException // TODO Exception
|
||||
* @return True if success, False if error
|
||||
*/
|
||||
private function __sendContactEmail($id, $message, $all) {
|
||||
// fetch the event
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<div class="event view"><!-- bluntly copied from View/Events/view.ctp -->
|
||||
<div class="actions" style="float:right;">
|
||||
<?php if ( 0 == $event['Event']['published'] && ($isAdmin || $event['Event']['org'] == $me['org'])):
|
||||
// only show button if alert has not been sent // LATER show the ALERT button in red-ish
|
||||
?>
|
||||
<div class="actions" style="float:right;"><?php
|
||||
if ( 0 == $event['Event']['published'] && ($isAdmin || $event['Event']['org'] == $me['org'])):
|
||||
// only show button if alert has not been sent // LATER show the ALERT button in red-ish
|
||||
?>
|
||||
<ul><li><?php
|
||||
echo $this->Form->postLink('Publish Event', array('controller' => 'events', 'action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?');
|
||||
echo $this->Form->postLink('Publish (no email)', array('controller' => 'events', 'action' => 'publish', $event['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!');
|
||||
?> </li></ul>
|
||||
<?php elseif (0 == $event['Event']['published']): ?>
|
||||
<ul><li>Not published</li></ul>
|
||||
<?php else: ?>
|
||||
<!-- ul><li>Alert already sent</li></ul -->
|
||||
<?php endif; ?>
|
||||
?> </li></ul><?php
|
||||
elseif (0 == $event['Event']['published']): ?>
|
||||
<ul><li>Not published</li></ul><?php
|
||||
else: ?>
|
||||
<!-- ul><li>Alert already sent</li></ul --><?php
|
||||
endif; ?>
|
||||
<ul><li><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $event['Event']['id'])); ?> </li></ul>
|
||||
</div>
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
|||
<dd>
|
||||
<?php echo h($event['Event']['id']); ?>
|
||||
|
||||
</dd>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
</dd><?php
|
||||
if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<dt>Org</dt>
|
||||
<dd>
|
||||
<?php echo h($event['Event']['org']); ?>
|
||||
|
@ -34,8 +34,8 @@
|
|||
<dd>
|
||||
<?php echo h($event['User']['email']); ?>
|
||||
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dd><?php
|
||||
endif; ?>
|
||||
<dt>Date</dt>
|
||||
<dd>
|
||||
<?php echo h($event['Event']['date']); ?>
|
||||
|
@ -45,14 +45,14 @@
|
|||
<dd>
|
||||
<?php echo $event['Event']['risk']; ?>
|
||||
|
||||
</dd>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
</dd><?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<dt>Distribution</dt>
|
||||
<dd>
|
||||
<?php echo ($event['Event']['private'])? 'Yes, never upload Event or any Attributes.' : 'No, upload Event and all Attributes except those marked as Private.'; ?>
|
||||
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dd><?php
|
||||
endif; ?>
|
||||
<!-- dt>UUID</dt>
|
||||
<dd>
|
||||
<?php echo $event['Event']['uuid']; ?>
|
||||
|
@ -63,109 +63,102 @@
|
|||
<?php echo nl2br(h($event['Event']['info'])); ?>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<?php if (!empty($relatedEvents)):?>
|
||||
</dl><?php
|
||||
if (!empty($relatedEvents)):?>
|
||||
<div class="related">
|
||||
<h3>Related Events</h3>
|
||||
<ul>
|
||||
<?php foreach ($relatedEvents as $relatedEvent): ?>
|
||||
<li><?php
|
||||
if ('db' == Configure::read('CyDefSIG.correlation')) { // TODO array key
|
||||
$linkText = $relatedEvent['date'] . ' (' . $relatedEvent['id'] . ')';
|
||||
echo $this->Html->link($linkText, array('controller' => 'attributes', 'action' => 'event', $relatedEvent['id']));
|
||||
} else {
|
||||
$linkText = $relatedEvent['Event']['date'] . ' (' . $relatedEvent['Event']['id'] . ')';
|
||||
echo $this->Html->link($linkText, array('controller' => 'attributes', 'action' => 'event', $relatedEvent['Event']['id']));
|
||||
}
|
||||
?></li>
|
||||
<?php endforeach; ?>
|
||||
<ul><?php
|
||||
foreach ($relatedEvents as $relatedEvent): ?>
|
||||
<li><?php
|
||||
if ('db' == Configure::read('CyDefSIG.correlation')) { // TODO array key
|
||||
$linkText = $relatedEvent['date'] . ' (' . $relatedEvent['id'] . ')';
|
||||
echo $this->Html->link($linkText, array('controller' => 'attributes', 'action' => 'event', $relatedEvent['id']));
|
||||
} else {
|
||||
$linkText = $relatedEvent['Event']['date'] . ' (' . $relatedEvent['Event']['id'] . ')';
|
||||
echo $this->Html->link($linkText, array('controller' => 'attributes', 'action' => 'event', $relatedEvent['Event']['id']));
|
||||
}?></li><?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div><?php
|
||||
endif; ?>
|
||||
|
||||
<div class="related">
|
||||
<h3>Attributes</h3>
|
||||
<?php if (!empty($event['Attribute'])):?>
|
||||
<h3>Attributes</h3><?php
|
||||
if (!empty($event['Attribute'])):?>
|
||||
<table cellpadding = "0" cellspacing = "0">
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Type</th>
|
||||
<th>Value</th>
|
||||
<th>Related Events</th>
|
||||
<th <?php echo "title='" . $attrDescriptions['signature']['desc'] . "'";?>>IDS Signature</th>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<th <?php echo "title='" . $attrDescriptions['private']['desc'] . "'";?>>Private</th>
|
||||
<?php endif;?>
|
||||
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<th class="actions">Actions</th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($categories as $category):
|
||||
$first = 1;
|
||||
foreach ($attributes as $attribute):
|
||||
if ($attribute['Attribute']['category'] != $category) continue;
|
||||
?>
|
||||
<th <?php echo "title='" . $attrDescriptions['signature']['desc'] . "'";?>>IDS Signature</th><?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<th <?php echo "title='" . $attrDescriptions['private']['desc'] . "'";?>>Private</th><?php
|
||||
endif;?><?php
|
||||
if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<th class="actions">Actions</th><?php
|
||||
endif;?>
|
||||
</tr><?php
|
||||
foreach ($categories as $category):
|
||||
$first = 1;
|
||||
foreach ($attributes as $attribute):
|
||||
if ($attribute['Attribute']['category'] != $category) continue;?>
|
||||
<tr>
|
||||
<td class="short" title="<?php if ('' != $attribute['Attribute']['category']) echo $categoryDefinitions[$attribute['Attribute']['category']]['desc'];?>"><?php
|
||||
if ($first) {
|
||||
if ('' == $attribute['Attribute']['category']) echo '(no category)';
|
||||
echo $attribute['Attribute']['category'];
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?></td>
|
||||
<td class="short" title="<?php if ('' != $attribute['Attribute']['category']) echo $categoryDefinitions[$attribute['Attribute']['category']]['desc'];?>"><?php
|
||||
if ($first) {
|
||||
if ('' == $attribute['Attribute']['category']) echo '(no category)';
|
||||
echo $attribute['Attribute']['category'];
|
||||
} else {
|
||||
echo ' ';
|
||||
}?></td>
|
||||
<td class="short" title="<?php echo $typeDefinitions[$attribute['Attribute']['type']]['desc'];?>">
|
||||
<?php echo $attribute['Attribute']['type'];?></td>
|
||||
<td><?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ('attachment' == $attribute['Attribute']['type'] ||
|
||||
'malware-sample' == $attribute['Attribute']['type'] ) {
|
||||
$filenameHash = explode('|', h($attribute['Attribute']['value']));
|
||||
echo $this->Html->link($filenameHash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['Attribute']['id']));
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif (strpos($attribute['Attribute']['type'], '|') !== false) {
|
||||
$filenameHash = explode('|', h($attribute['Attribute']['value']));
|
||||
echo $filenameHash[0];
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif ('vulnerability' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, 'http://www.google.com/search?q=' . $sigDisplay, array('target' => '_blank'));
|
||||
} elseif ('link' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?></td>
|
||||
<td class="short" style="text-align: center;">
|
||||
<?php
|
||||
$first = 0;
|
||||
if (isset($relatedAttributes[$attribute['Attribute']['id']]) && (null != $relatedAttributes[$attribute['Attribute']['id']])) {
|
||||
foreach ($relatedAttributes[$attribute['Attribute']['id']] as $relatedAttribute) {
|
||||
if ('db' == Configure::read('CyDefSIG.correlation')) { // TODO array key
|
||||
echo $this->Html->link($relatedAttribute['Correlation']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Correlation']['event_id']));
|
||||
} else {
|
||||
echo $this->Html->link($relatedAttribute['Attribute']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Attribute']['event_id']));
|
||||
}
|
||||
echo ' ';
|
||||
}
|
||||
}
|
||||
?>
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ('attachment' == $attribute['Attribute']['type'] ||
|
||||
'malware-sample' == $attribute['Attribute']['type'] ) {
|
||||
$filenameHash = explode('|', h($attribute['Attribute']['value']));
|
||||
echo $this->Html->link($filenameHash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['Attribute']['id']));
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif (strpos($attribute['Attribute']['type'], '|') !== false) {
|
||||
$filenameHash = explode('|', h($attribute['Attribute']['value']));
|
||||
echo $filenameHash[0];
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif ('vulnerability' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, 'http://www.google.com/search?q=' . $sigDisplay, array('target' => '_blank'));
|
||||
} elseif ('link' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}?></td>
|
||||
<td class="short" style="text-align: center;"><?php
|
||||
$first = 0;
|
||||
if (isset($relatedAttributes[$attribute['Attribute']['id']]) && (null != $relatedAttributes[$attribute['Attribute']['id']])) {
|
||||
foreach ($relatedAttributes[$attribute['Attribute']['id']] as $relatedAttribute) {
|
||||
if ('db' == Configure::read('CyDefSIG.correlation')) { // TODO array key
|
||||
echo $this->Html->link($relatedAttribute['Correlation']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Correlation']['event_id']));
|
||||
} else {
|
||||
echo $this->Html->link($relatedAttribute['Attribute']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Attribute']['event_id']));
|
||||
}
|
||||
echo ' ';
|
||||
}
|
||||
}?>
|
||||
</td>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No';?></td>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['Attribute']['private'] ? 'Private' : ' ';?></td>
|
||||
<?php endif;?>
|
||||
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No';?></td><?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['Attribute']['private'] ? 'Private' : ' ';?></td><?php
|
||||
endif;?><?php
|
||||
if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<td class="actions">
|
||||
<?php
|
||||
echo $this->Html->link(__('Edit', true), array('controller' => 'attributes', 'action' => 'edit', $attribute['Attribute']['id']));
|
||||
echo $this->Form->postLink(__('Delete'), array('controller' => 'attributes', 'action' => 'delete', $attribute['Attribute']['id']), null, __('Are you sure you want to delete this attribute?'));
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</td><?php
|
||||
endif;?>
|
||||
</tr><?php
|
||||
endforeach; ?><?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
|
@ -174,35 +167,34 @@ if (isset($relatedAttributes[$attribute['Attribute']['id']]) && (null != $relate
|
|||
));
|
||||
?> </p>
|
||||
|
||||
<div class="paging">
|
||||
<?php
|
||||
<div class="paging"><?php
|
||||
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
|
||||
echo $this->Paginator->numbers(array('separator' => ''));
|
||||
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
</div><?php
|
||||
endif; ?><?php
|
||||
if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $event['Event']['id']));?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div><?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<ul><?php
|
||||
if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
|
||||
<li><?php echo $this->Html->link(__('Add Attribute', true), array('controller' => 'attributes', 'action' => 'add', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link(__('Add Attachment', true), array('controller' => 'attributes', 'action' => 'add_attachment', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link(__('Edit Event', true), array('controller' => 'events', 'action' => 'edit', $event['Event']['id'])); ?> </li>
|
||||
<li><?php echo $this->Form->postLink(__('Delete Event'), array('controller' => 'events', 'action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id'])); ?></li>
|
||||
<li> </li>
|
||||
<?php endif; ?>
|
||||
<li> </li><?php
|
||||
endif; ?>
|
||||
<?php echo $this->element('actions_menu'); ?>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,14 +1,13 @@
|
|||
<div class="attributes index">
|
||||
<h2><?php echo __('Attributes');?></h2>
|
||||
<?php
|
||||
if ($isSearch==1){
|
||||
echo "<h4>Results for all attributes";
|
||||
if($keywordSearch!=null) echo " with the value containing \"<b>".h($keywordSearch)."</b>\"";
|
||||
if($categorySearch!="ALL") echo " of category \"<b>".h($categorySearch)."</b>\"";
|
||||
if($typeSearch!="ALL") echo " of type \"<b>".h($typeSearch)."</b>\"";
|
||||
echo ":</h4>";
|
||||
}
|
||||
?>
|
||||
if ($isSearch == 1) {
|
||||
echo "<h4>Results for all attributes";
|
||||
if($keywordSearch != null) echo " with the value containing \"<b>" . h($keywordSearch) . "</b>\"";
|
||||
if($categorySearch != "ALL") echo " of category \"<b>" . h($categorySearch) . "</b>\"";
|
||||
if($typeSearch! = "ALL") echo " of type \"<b>" . h($typeSearch) . "</b>\"";
|
||||
echo ":</h4>";
|
||||
} ?>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('event_id');?></th>
|
||||
|
@ -20,7 +19,7 @@
|
|||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($attributes as $attribute): ?>
|
||||
foreach ($attributes as $attribute): ?>
|
||||
<tr>
|
||||
<td class="short">
|
||||
<?php echo $this->Html->link($attribute['Event']['id'], array('controller' => 'events', 'action' => 'view', $attribute['Event']['id'])); ?>
|
||||
|
@ -32,28 +31,30 @@
|
|||
<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
|
||||
<?php echo h($attribute['Attribute']['type']); ?> </td>
|
||||
<td onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
|
||||
<?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ('attachment' == $attribute['Attribute']['type'] || 'malware-sample' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, array('controller' => 'attributes', 'action' => 'download', $attribute['Attribute']['id']));
|
||||
} elseif ('link' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?> </td>
|
||||
<?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ('attachment' == $attribute['Attribute']['type'] || 'malware-sample' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, array('controller' => 'attributes', 'action' => 'download', $attribute['Attribute']['id']));
|
||||
} elseif ('link' == $attribute['Attribute']['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?> </td>
|
||||
<td class="short" style="text-align: center;" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
|
||||
<?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?> </td>
|
||||
<td class="actions"><?php
|
||||
if ($isAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org'] == $me['org'])) {
|
||||
echo $this->Html->link(__('Edit'), array('action' => 'edit', $attribute['Attribute']['id']), null);
|
||||
echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $attribute['Attribute']['id']), null, __('Are you sure you want to delete this attribute?'));
|
||||
}
|
||||
echo $this->Html->link(__('View'), array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']));
|
||||
?>
|
||||
if ($isAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org'] == $me['org'])) {
|
||||
echo $this->Html->link(__('Edit'), array('action' => 'edit', $attribute['Attribute']['id']), null);
|
||||
echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $attribute['Attribute']['id']), null, __('Are you sure you want to delete this attribute?'));
|
||||
}
|
||||
echo $this->Html->link(__('View'), array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<li><?php if ($isAclAdd) echo $this->Html->link(__('New Event', true), array('controller' => 'events', 'action' => 'add')); ?></li>
|
||||
<li><?php
|
||||
if ($isAclAdd) echo $this->Html->link(__('New Event', true), array('controller' => 'events', 'action' => 'add')); ?></li>
|
||||
<li><?php echo $this->Html->link(__('List Events', true), array('controller' => 'events', 'action' => 'index')); ?></li>
|
||||
<li><?php echo $this->Html->link(__('List Attributes', true), array('controller' => 'attributes', 'action' => 'index')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Search Attributes', true), array('controller' => 'attributes', 'action' => 'search')); ?> </li>
|
||||
|
@ -13,13 +14,16 @@
|
|||
<li><?php echo $this->Html->link(__('Terms & Conditions', true), array('controller' => 'users', 'action' => 'terms')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Log out', true), array('controller' => 'users', 'action' => 'logout')); ?> </li>
|
||||
|
||||
<?php if (('true' == Configure::read('CyDefSIG.sync')) && ($isAclSync || $isAdmin)): ?>
|
||||
<?php
|
||||
if (('true' == Configure::read('CyDefSIG.sync')) && ($isAclSync || $isAdmin)): ?>
|
||||
<li> </li>
|
||||
<h3><?php echo __('Sync Actions'); ?></h3>
|
||||
<li><?php echo $this->Html->link(__('List Servers'), array('controller' => 'servers', 'action' => 'index'));?></li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif;?>
|
||||
|
||||
<?php if($isAdmin || $isAclAdmin): ?>
|
||||
<?php
|
||||
if($isAdmin || $isAclAdmin): ?>
|
||||
<li> </li>
|
||||
<h3><?php echo __('Administration'); ?></h3>
|
||||
<li><?php echo $this->Html->link(__('Import Whitelist', true), array('controller' => 'regex', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
|
@ -30,9 +34,12 @@
|
|||
<li><?php echo $this->Html->link(__('New Role', true), array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('List Roles', true), array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li> </li>
|
||||
<?php endif; ?>
|
||||
<?php if($isAdmin || $isAclAudit): ?>
|
||||
<?php
|
||||
endif;?>
|
||||
<?php
|
||||
if($isAdmin || $isAclAudit): ?>
|
||||
<h3><?php echo __('Audit'); ?></h3>
|
||||
<li><?php echo $this->Html->link(__('List Logs', true), array('controller' => 'logs', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Search Logs', true), array('controller' => 'logs', 'action' => 'admin_search', 'admin' => true)); ?> </li>
|
||||
<?php endif;
|
||||
<?php
|
||||
endif;
|
|
@ -36,10 +36,10 @@ You can <?php echo $this->Html->link('reset', array('controller' => 'users', 'ac
|
|||
<h3>Text export</h3>
|
||||
<p>An automatic export of all attributes of a specific type to a plain text file.</p>
|
||||
<p>You can configure your tools to automatically download the following files:</p>
|
||||
<pre>
|
||||
<?php foreach ($sigTypes as $sigType):?>
|
||||
<?php echo Configure::read('CyDefSIG.baseurl');?>/events/text/<?php echo $me['authkey']; ?>/<?php echo $sigType . "\n";?>
|
||||
<?php endforeach;?>
|
||||
<pre><?php
|
||||
foreach ($sigTypes as $sigType):?>
|
||||
<?php echo Configure::read('CyDefSIG.baseurl');?>/events/text/<?php echo $me['authkey']; ?>/<?php echo $sigType . "\n";?><?php
|
||||
endforeach;?>
|
||||
</pre>
|
||||
<p></p>
|
||||
|
||||
|
|
|
@ -2,51 +2,62 @@
|
|||
<h2>Events</h2>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('org');?></th>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th><?php echo $this->Paginator->sort('attribute_count', '#Attr.');?></th>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showowner') || $isAdmin): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.showowner') || $isAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('user_id', 'Email');?></th>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('date');?></th>
|
||||
<th<?php echo ' title="' . $eventDescriptions['risk']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('risk');?></th>
|
||||
<th<?php echo ' title="' . $eventDescriptions['analysis']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('analysis');?></th>
|
||||
<th><?php echo $this->Paginator->sort('info');?></th>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<th<?php echo ' title="' . $eventDescriptions['distribution']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('distribution');?></th>
|
||||
<?php else: ?>
|
||||
<th<?php echo ' title="' . $eventDescriptions['private']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('private');?></th>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($events as $event):
|
||||
?>
|
||||
foreach ($events as $event):?>
|
||||
<tr>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php
|
||||
echo $this->Html->image('orgs/' . h($event['Event']['org']) . '.png', array('alt' => h($event['Event']['org']),'width' => '48','hight' => '48'));
|
||||
?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<td class="short">
|
||||
<?php echo $this->Html->link($event['Event']['id'], array('controller' => 'events', 'action' => 'view', $event['Event']['id'])); ?>
|
||||
</td>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo $event['Event']['attribute_count']; ?> </td>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showowner') || $isAdmin): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.showowner') || $isAdmin): ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo h($event['User']['email']); ?> </td>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo $event['Event']['date']; ?> </td>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
|
@ -55,31 +66,36 @@
|
|||
<?php echo $analysisLevels[$event['Event']['analysis']]; ?> </td>
|
||||
<td onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo nl2br(h($event['Event']['info'])); ?> </td>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo $event['Event']['distribution'] != 'All communities' ? $event['Event']['distribution'] : 'All';?></td>
|
||||
<?php else: ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo ($event['Event']['private']) ? 'Private' : ''; ?> </td>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo $event['Event']['distribution'] != 'All communities' ? $event['Event']['distribution'] : 'All';?></td>
|
||||
<?php
|
||||
else: ?>
|
||||
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
|
||||
<?php echo ($event['Event']['private']) ? 'Private' : ''; ?> </td>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<td class="actions">
|
||||
<?php
|
||||
if (0 == $event['Event']['published'] && ($isAdmin || ($isAclPublish && $event['Event']['org'] == $me['org'])))
|
||||
echo $this->Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), array('action' => 'alert', $event['Event']['id']), 'Are you sure this event is complete and everyone should be informed?');
|
||||
elseif (0 == $event['Event']['published']) echo 'Not published';
|
||||
?>
|
||||
<?php
|
||||
if ($isAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $event['Event']['org'] == $me['org'])) {
|
||||
echo $this->Html->link(__('Edit', true), array('action' => 'edit', $event['Event']['id']), null);
|
||||
echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id']));
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($isAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $event['Event']['org'] == $me['org'])) {
|
||||
echo $this->Html->link(__('Edit', true), array('action' => 'edit', $event['Event']['id']), null);
|
||||
echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id']));
|
||||
}?>
|
||||
<?php echo $this->Html->link(__('View', true), array('controller' => 'events', 'action' => 'view', $event['Event']['id'])); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
|
|
|
@ -32,25 +32,27 @@ $mayPublish = ($isAclPublish && $event['Event']['org'] == $me['org']);
|
|||
<div class="events view">
|
||||
<div class="actions" style="float:right;">
|
||||
<?php if ( 0 == $event['Event']['published'] && ($isAdmin || $mayPublish)):
|
||||
// only show button if alert has not been sent // LATER show the ALERT button in red-ish
|
||||
?>
|
||||
// only show button if alert has not been sent // LATER show the ALERT button in red-ish
|
||||
?>
|
||||
<ul><li><?php
|
||||
if ($isAdmin || $mayPublish) {
|
||||
echo $this->Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?');
|
||||
echo $this->Form->postLink('Publish (no email)', array('action' => 'publish', $event['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!');
|
||||
}
|
||||
if ($isAdmin || $mayPublish) {
|
||||
echo $this->Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?');
|
||||
echo $this->Form->postLink('Publish (no email)', array('action' => 'publish', $event['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!');
|
||||
}
|
||||
?> </li></ul>
|
||||
<?php elseif (0 == $event['Event']['published']): ?>
|
||||
<ul><li>Not published</li></ul>
|
||||
<?php else: ?>
|
||||
<!-- ul><li>Alert already sent</li></ul -->
|
||||
<?php endif; ?>
|
||||
<?php elseif (0 == $event['Event']['published']): ?>
|
||||
<ul><li>Not published</li></ul>
|
||||
<?php else: ?>
|
||||
<!-- ul><li>Alert already sent</li></ul -->
|
||||
<?php
|
||||
endif; ?>
|
||||
<ul><li><?php echo $this->Html->link(__('Contact reporter', true), array('action' => 'contact', $event['Event']['id'])); ?> </li></ul>
|
||||
</div>
|
||||
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
|
||||
<?php echo $this->Html->image('orgs/' . h($event['Event']['org']) . '.png', array('alt' => h($event['Event']['org']),'width' => '48','hight' => '48', 'style' => 'float:right;')); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->Html->image('orgs/' . h($event['Event']['org']) . '.png', array('alt' => h($event['Event']['org']),'width' => '48','hight' => '48', 'style' => 'float:right;')); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<h2>Event</h2>
|
||||
<dl>
|
||||
<dt>ID</dt>
|
||||
|
@ -64,14 +66,16 @@ if ($isAdmin || $mayPublish) {
|
|||
<?php echo h($event['Event']['org']); ?>
|
||||
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.showowner') || $isAdmin): ?>
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
<?php echo h($event['User']['email']); ?>
|
||||
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<dt>Date</dt>
|
||||
<dd>
|
||||
<?php echo h($event['Event']['date']); ?>
|
||||
|
@ -87,21 +91,26 @@ if ($isAdmin || $mayPublish) {
|
|||
<?php echo $analysisLevels[$event['Event']['analysis']]; ?>
|
||||
|
||||
</dd>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<dt>Distribution</dt>
|
||||
<dd>
|
||||
<?php echo $event['Event']['distribution'] . ', ' . strtolower(substr(($distributionDescriptions[$event['Event']['distribution']]['formdesc']), 0, 1)) . substr($distributionDescriptions[$event['Event']['distribution']]['formdesc'], 1) . '.'; ?>
|
||||
|
||||
</dd>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<dt>Private</dt>
|
||||
<dd>
|
||||
<?php echo ($event['Event']['private'])? 'Yes, never upload Event or any Attributes.' : 'No, upload Event and all Attributes except those marked as Private.'; ?>
|
||||
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<!-- dt>UUID</dt>
|
||||
<dd>
|
||||
<?php echo $event['Event']['uuid']; ?>
|
||||
|
@ -113,13 +122,14 @@ if ($isAdmin || $mayPublish) {
|
|||
|
||||
</dd>
|
||||
</dl>
|
||||
<?php
|
||||
<?php
|
||||
$passAlong = array(0, 0);
|
||||
if (!empty($relatedEvents)):?>
|
||||
if (!empty($relatedEvents)):?>
|
||||
<div class="related">
|
||||
<h3>Related Events</h3>
|
||||
<ul>
|
||||
<?php foreach ($relatedEvents as $relatedEvent): ?>
|
||||
<?php
|
||||
foreach ($relatedEvents as $relatedEvent): ?>
|
||||
<li><?php
|
||||
$linkText = $relatedEvent['Event']['date'] . ' (' . $relatedEvent['Event']['id'] . ')';
|
||||
$currentID = $relatedEvent['Event']['id'];
|
||||
|
@ -127,13 +137,16 @@ if ($isAdmin || $mayPublish) {
|
|||
echo "<div id = \"R" . $currentID . "\" onMouseOver=getTitle(" . $passAlong[0] . "," . $passAlong[1] . ") title = \"Loading event info...\">";
|
||||
echo $this->Html->link($linkText, array('controller' => 'events', 'action' => 'view', $relatedEvent['Event']['id']));
|
||||
?></div></li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<div class="related">
|
||||
<h3>Attributes</h3>
|
||||
<?php if (!empty($event['Attribute'])):?>
|
||||
<?php
|
||||
if (!empty($event['Attribute'])):?>
|
||||
<table cellpadding = "0" cellspacing = "0">
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
|
@ -141,115 +154,133 @@ if ($isAdmin || $mayPublish) {
|
|||
<th>Value</th>
|
||||
<th>Related Events</th>
|
||||
<th <?php echo "title='" . $attrDescriptions['signature']['desc'] . "'";?>>IDS Signature</th>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<th <?php echo "title='" . $attrDescriptions['private']['desc'] . "'";?>>Distribution</th>
|
||||
<?php else:?>
|
||||
<?php
|
||||
else:?>
|
||||
<th <?php echo "title='" . $attrDescriptions['private']['desc'] . "'";?>>Private</th>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php if ($isAdmin || $mayModify): ?>
|
||||
<?php
|
||||
endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
<?php
|
||||
if ($isAdmin || $mayModify): ?>
|
||||
<th class="actions">Actions</th>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
</tr><?php
|
||||
$passAlong = array(0, 1, 0);
|
||||
foreach ($categories as $category):
|
||||
$first = 1;
|
||||
foreach ($event['Attribute'] as $attribute):
|
||||
if($attribute['category'] != $category) continue;
|
||||
?>
|
||||
$passAlong = array(0, 1, 0);
|
||||
foreach ($categories as $category):
|
||||
$first = 1;
|
||||
foreach ($event['Attribute'] as $attribute):
|
||||
if ($attribute['category'] != $category) continue;?>
|
||||
<tr>
|
||||
<td class="short" title="<?php if('' != $attribute['category']) echo $categoryDefinitions[$attribute['category']]['desc'];?>"><?php
|
||||
if ($first) {
|
||||
if ('' == $attribute['category']) echo '(no category)';
|
||||
echo $attribute['category'];
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?></td>
|
||||
<td class="short" title="<?php echo $typeDefinitions[$attribute['type']]['desc'];?>"><?php echo $attribute['type'];?></td>
|
||||
if ($first) {
|
||||
if ('' == $attribute['category']) echo '(no category)';
|
||||
echo $attribute['category'];
|
||||
} else {
|
||||
echo ' ';
|
||||
}?></td>
|
||||
<td class="short" title="<?php echo $typeDefinitions[$attribute['type']]['desc'];?>"><?php echo $attribute['type'];?></td>
|
||||
<td><?php
|
||||
$sigDisplay = nl2br(h($attribute['value']));
|
||||
if ('attachment' == $attribute['type'] ||
|
||||
'malware-sample' == $attribute['type'] ) {
|
||||
$filenameHash = explode('|', h($attribute['value']));
|
||||
if (strrpos($filenameHash[0], '\\')) {
|
||||
$filepath = substr($filenameHash[0], 0, strrpos($filenameHash[0], '\\'));
|
||||
$filename = substr($filenameHash[0], strrpos($filenameHash[0], '\\'));
|
||||
echo $filepath;
|
||||
echo $this->Html->link($filename, array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
|
||||
} else {
|
||||
echo $this->Html->link($filenameHash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
|
||||
}
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif (strpos($attribute['type'], '|') !== false) {
|
||||
$filenameHash = explode('|', h($attribute['value']));
|
||||
echo $filenameHash[0];
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif ('vulnerability' == $attribute['type']) {
|
||||
echo $this->Html->link($sigDisplay, 'http://www.google.com/search?q=' . $sigDisplay, array('target' => '_blank'));
|
||||
} elseif ('link' == $attribute['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
$sigDisplay = nl2br(h($attribute['value']));
|
||||
if ('attachment' == $attribute['type'] || 'malware-sample' == $attribute['type'] ) {
|
||||
$filenameHash = explode('|', h($attribute['value']));
|
||||
if (strrpos($filenameHash[0], '\\')) {
|
||||
$filepath = substr($filenameHash[0], 0, strrpos($filenameHash[0], '\\'));
|
||||
$filename = substr($filenameHash[0], strrpos($filenameHash[0], '\\'));
|
||||
echo $filepath;
|
||||
echo $this->Html->link($filename, array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
|
||||
} else {
|
||||
echo $this->Html->link($filenameHash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
|
||||
}
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif (strpos($attribute['type'], '|') !== false) {
|
||||
$filenameHash = explode('|', h($attribute['value']));
|
||||
echo $filenameHash[0];
|
||||
if (isset($filenameHash[1])) echo ' | ' . $filenameHash[1];
|
||||
} elseif ('vulnerability' == $attribute['type']) {
|
||||
echo $this->Html->link($sigDisplay, 'http://www.google.com/search?q=' . $sigDisplay, array('target' => '_blank'));
|
||||
} elseif ('link' == $attribute['type']) {
|
||||
echo $this->Html->link($sigDisplay, $sigDisplay);
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?></td>
|
||||
<td class="short" style="text-align: center;">
|
||||
<?php
|
||||
$first = 0;
|
||||
if (isset($relatedAttributes[$attribute['id']]) && (null != $relatedAttributes[$attribute['id']])) {
|
||||
foreach ($relatedAttributes[$attribute['id']] as $relatedAttribute) {
|
||||
$passAlong[0] = $relatedAttribute['Attribute']['event_id'];
|
||||
echo "<span id = \"A" . $passAlong[0] . "X" . $passAlong[2] . "\" onMouseOver=getTitle(" . $passAlong[0] . "," . $passAlong[1] . "," . $passAlong[2] . ") title = \"Loading event info...\">";
|
||||
echo $this->Html->link($relatedAttribute['Attribute']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Attribute']['event_id']));
|
||||
echo "</span>";
|
||||
echo ' ';
|
||||
$passAlong[2]++;
|
||||
}
|
||||
}
|
||||
$first = 0;
|
||||
if (isset($relatedAttributes[$attribute['id']]) && (null != $relatedAttributes[$attribute['id']])) {
|
||||
foreach ($relatedAttributes[$attribute['id']] as $relatedAttribute) {
|
||||
$passAlong[0] = $relatedAttribute['Attribute']['event_id'];
|
||||
echo "<span id = \"A" . $passAlong[0] . "X" . $passAlong[2] . "\" onMouseOver=getTitle(" . $passAlong[0] . "," . $passAlong[1] . "," . $passAlong[2] . ") title = \"Loading event info...\">";
|
||||
echo $this->Html->link($relatedAttribute['Attribute']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedAttribute['Attribute']['event_id']));
|
||||
echo "</span>";
|
||||
echo ' ';
|
||||
$passAlong[2]++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['to_ids'] ? 'Yes' : 'No';?></td>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['distribution'] != 'All communities' ? $attribute['distribution'] : 'All';?></td>
|
||||
<?php else:?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['private'] ? 'Private' : ' ';?></td>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php if ($isAdmin || $mayModify): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.sync')): ?>
|
||||
<?php
|
||||
if ('true' == Configure::read('CyDefSIG.private')): ?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['distribution'] != 'All communities' ? $attribute['distribution'] : 'All';?></td>
|
||||
<?php
|
||||
else:?>
|
||||
<td class="short" style="text-align: center;"><?php echo $attribute['private'] ? 'Private' : ' ';?></td>
|
||||
<?php
|
||||
endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
<?php
|
||||
if ($isAdmin || $mayModify): ?>
|
||||
<td class="actions">
|
||||
<?php
|
||||
echo $this->Html->link(__('Edit', true), array('controller' => 'attributes', 'action' => 'edit', $attribute['id']));
|
||||
echo $this->Form->postLink(__('Delete'), array('controller' => 'attributes', 'action' => 'delete', $attribute['id']), null, __('Are you sure you want to delete this attribute?'));
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php if ($isAdmin || $mayModify): ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
if ($isAdmin || $mayModify): ?>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $event['Event']['id']));?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<?php if ($isAdmin || $mayModify): ?>
|
||||
<?php
|
||||
if ($isAdmin || $mayModify): ?>
|
||||
<li><?php echo $this->Html->link(__('Add Attribute', true), array('controller' => 'attributes', 'action' => 'add', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link(__('Add Attachment', true), array('controller' => 'attributes', 'action' => 'add_attachment', $event['Event']['id']));?> </li>
|
||||
<li><?php echo $this->Html->link(__('Edit Event', true), array('action' => 'edit', $event['Event']['id'])); ?> </li>
|
||||
<li><?php echo $this->Form->postLink(__('Delete Event'), array('action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id'])); ?></li>
|
||||
<li> </li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php echo $this->element('actions_menu'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,23 +6,27 @@
|
|||
<th><?php echo $this->Paginator->sort('pull');?></th>
|
||||
<th><?php echo $this->Paginator->sort('url');?></th>
|
||||
<th>From</th>
|
||||
<?php if ($isAdmin): ?>
|
||||
<?php
|
||||
if ($isAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('org');?></th>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<th>Last Pulled ID</th>
|
||||
<th>Last Pushed ID</th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($servers as $server): ?>
|
||||
foreach ($servers as $server): ?>
|
||||
<tr>
|
||||
<td class="short" style="text-align: center;"><?php echo ($server['Server']['push'])? 'Yes' : 'No'; ?> </td>
|
||||
<td class="short" style="text-align: center;"><?php echo ($server['Server']['pull'])? 'Yes' : 'No'; ?> </td>
|
||||
<td><?php echo h($server['Server']['url']); ?> </td>
|
||||
<td><?php echo h($server['Server']['organization']); ?> </td>
|
||||
<?php if ($isAdmin): ?>
|
||||
<?php
|
||||
if ($isAdmin): ?>
|
||||
<td class="short"><?php echo h($server['Server']['org']); ?> </td>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<td class="short"><?php echo $server['Server']['lastpulledid']; ?></td>
|
||||
<td class="short"><?php echo $server['Server']['lastpushedid']; ?></td>
|
||||
<td class="actions">
|
||||
|
@ -38,7 +42,8 @@
|
|||
<?php if ($server['Server']['push']) echo $this->Form->postLink(__('Push All'), array('action' => 'push', $server['Server']['id'], 'full') ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
|
|
|
@ -1,20 +1,26 @@
|
|||
<div class="servers index">
|
||||
<h2>Failed pulls</h2>
|
||||
<?php if (0 == count($fails)):?>
|
||||
<?php
|
||||
if (0 == count($fails)):?>
|
||||
<p>No failed pulls</p>
|
||||
<?php else:?>
|
||||
<?php
|
||||
else:?>
|
||||
<ul>
|
||||
<?php foreach ($fails as $key => $value) echo '<li>' . $key . ' : ' . h($value) . '</li>'; ?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
<h2>Succeeded pulls</h2>
|
||||
<?php if (0 == count($successes)):?>
|
||||
<?php
|
||||
if (0 == count($successes)):?>
|
||||
<p>No succeeded pulls</p>
|
||||
<?php else:?>
|
||||
<?php
|
||||
else:?>
|
||||
<ul>
|
||||
<?php foreach ($successes as $success) echo '<li>' . $success . '</li>'; ?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
|
|
|
@ -1,20 +1,26 @@
|
|||
<div class="servers index">
|
||||
<h2>Failed pushes</h2>
|
||||
<?php if (0 == count($fails)):?>
|
||||
<?php
|
||||
if (0 == count($fails)):?>
|
||||
<p>No failed pushes</p>
|
||||
<?php else:?>
|
||||
<?php
|
||||
else:?>
|
||||
<ul>
|
||||
<?php foreach ($fails as $key => $value) echo '<li>' . $key . ' : ' . h($value) . '</li>'; ?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
<h2>Succeeded pushes</h2>
|
||||
<?php if (0 == count($successes)):?>
|
||||
<?php
|
||||
if (0 == count($successes)):?>
|
||||
<p>No succeeded pushes</p>
|
||||
<?php else:?>
|
||||
<?php
|
||||
else:?>
|
||||
<ul>
|
||||
<?php foreach ($successes as $success) echo '<li>' . $success . '</li>'; ?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
endif;?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
|
|
|
@ -37,7 +37,7 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
<dt><?php echo __('Autoalert'); ?></dt>
|
||||
<dd>
|
||||
<?php
|
||||
echo (h($user['User']['autoalert'])==0)? 'No' : 'Yes' ;
|
||||
echo (h($user['User']['autoalert']) == 0)? 'No' : 'Yes';
|
||||
?>
|
||||
|
||||
</dd>
|
||||
|
@ -54,12 +54,11 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
<dt><?php echo __('Gpgkey'); ?></dt>
|
||||
<dd>
|
||||
<?php
|
||||
if (h($user['User']['gpgkey'])!=0){
|
||||
echo "<code>".nl2br(h($user['User']['gpgkey']))."</code>";
|
||||
}else{
|
||||
if (h($user['User']['gpgkey']) != 0) {
|
||||
echo "<code>" . nl2br(h($user['User']['gpgkey'])) . "</code>";
|
||||
} else {
|
||||
echo "N/A";
|
||||
}
|
||||
?>
|
||||
}?>
|
||||
</dd>
|
||||
<dt><?php echo __('Nids Sid'); ?></dt>
|
||||
<dd>
|
||||
|
@ -69,12 +68,11 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
<dt><?php echo __('Termsaccepted'); ?></dt>
|
||||
<dd>
|
||||
<?php
|
||||
if (h($user['User']['termsaccepted']) == 1){
|
||||
if (h($user['User']['termsaccepted']) == 1) {
|
||||
echo "Yes";
|
||||
}else{
|
||||
} else {
|
||||
echo "No";
|
||||
}
|
||||
?>
|
||||
}?>
|
||||
|
||||
</dd>
|
||||
<dt><?php echo __('Newsread'); ?></dt>
|
||||
|
@ -86,10 +84,12 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<?php if ($isAclModify): ?>
|
||||
<?php
|
||||
if ($isAclModify): ?>
|
||||
<li><?php echo $this->Html->link(__('Edit User', true), array('admin' => 'true', 'action' => 'edit', $user['User']['id'])); ?></li>
|
||||
<li> </li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php echo $this->element('actions_menu'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -109,8 +109,8 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($user['Event'] as $event): ?>
|
||||
$i = 0;
|
||||
foreach ($user['Event'] as $event): ?>
|
||||
<tr>
|
||||
<td><?php echo h($event['id']);?></td>
|
||||
<td><?php echo h($event['org']);?></td>
|
||||
|
@ -129,8 +129,10 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
|
|||
<?php echo $this->Html->link(__('View'), array('controller' => 'events', 'action' => 'view', $event['id'])); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</div>
|
|
@ -6,14 +6,14 @@
|
|||
<th># of members</th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($orgs as $org):
|
||||
?>
|
||||
foreach ($orgs as $org):?>
|
||||
<tr>
|
||||
<td><?php echo $org['User']['org']; ?> </td>
|
||||
<td><?php echo $org[0]['num_members']; ?> </td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
|
||||
<h2>Attribute Types Histogram</h2>
|
||||
|
@ -92,15 +92,15 @@ foreach ($graphData as $row) {
|
|||
<th>Amount</th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($typesHistogram as $item):
|
||||
?>
|
||||
foreach ($typesHistogram as $item):?>
|
||||
<tr>
|
||||
<td><?php echo $item['Event']['org']; ?> </td>
|
||||
<td><?php echo $item['Attribute']['type']; ?> </td>
|
||||
<td><?php echo $item['0']['num_types']; ?> </td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table -->
|
||||
|
||||
</div>
|
||||
|
|
|
@ -48,11 +48,11 @@
|
|||
<dt><?php echo __('GPG Key'); ?></dt>
|
||||
<dd>
|
||||
<?php
|
||||
if (h($user['User']['gpgkey'])!=0){
|
||||
echo "<code>"+nl2br(h($user['User']['gpgkey']))+"</code>";
|
||||
}else{
|
||||
echo "N/A";
|
||||
}
|
||||
if (h($user['User']['gpgkey']) != 0) {
|
||||
echo "<code>" + nl2br(h($user['User']['gpgkey'])) + "</code>";
|
||||
} else {
|
||||
echo "N/A";
|
||||
}
|
||||
?>
|
||||
|
||||
</dd>
|
||||
|
@ -60,10 +60,12 @@
|
|||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<?php if ($isAclModify): ?>
|
||||
<?php
|
||||
if ($isAclModify): ?>
|
||||
<li><?php echo $this->Html->link(__('Edit User', true), array('action' => 'edit', $user['User']['id'])); ?></li>
|
||||
<li> </li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php echo $this->element('actions_menu'); ?>
|
||||
</ul>
|
||||
</div>
|
|
@ -7,7 +7,7 @@
|
|||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($whitelists as $whitelist): ?>
|
||||
foreach ($whitelists as $whitelist): ?>
|
||||
<tr>
|
||||
<td class="short"><?php echo h($whitelist['Whitelist']['id']); ?> </td>
|
||||
<td class="short"><?php echo h($whitelist['Whitelist']['name']); ?> </td>
|
||||
|
@ -16,7 +16,8 @@
|
|||
<?php echo $this->Form->postLink(__('Delete'), array('admin' => true, 'action' => 'delete', $whitelist['Whitelist']['id']), null, __('Are you sure you want to delete # %s?', $whitelist['Whitelist']['id'])); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue