mirror of https://github.com/MISP/MISP
new: [freetext import] Added detection for AS
parent
c0f1e80465
commit
cefab3e01c
|
@ -228,7 +228,7 @@ class ComplexTypeTool
|
|||
);
|
||||
|
||||
// algorithms to run through in order
|
||||
private $__checks = array('Hashes', 'Email', 'IP', 'DomainOrFilename', 'SimpleRegex');
|
||||
private $__checks = array('Hashes', 'Email', 'IP', 'DomainOrFilename', 'SimpleRegex', 'AS');
|
||||
|
||||
private function __resolveType($raw_input)
|
||||
{
|
||||
|
@ -258,6 +258,14 @@ class ComplexTypeTool
|
|||
return false;
|
||||
}
|
||||
|
||||
private function __checkForAS($input)
|
||||
{
|
||||
if (preg_match('#^as[0-9]+$#i', $input['raw'])) {
|
||||
$input['raw'] = strtoupper($input['raw']);
|
||||
return array('types' => array('AS'), 'to_ids' => false, 'default_type' => 'AS', 'value' => $input['raw']);
|
||||
}
|
||||
}
|
||||
|
||||
private function __checkForHashes($input)
|
||||
{
|
||||
// handle prepared composite values with the filename|hash format
|
||||
|
|
Loading…
Reference in New Issue