added TimestampConstant
parent
513b172a5c
commit
fb75de47c5
|
@ -37,7 +37,7 @@ from .patterns import (AndBooleanExpression, AndObservationExpression,
|
|||
OrObservationExpression, ParentheticalExpression,
|
||||
QualifiedObservationExpression,
|
||||
ReferenceObjectPathComponent, RepeatQualifier,
|
||||
StartStopQualifier, StringConstant, WithinQualifier)
|
||||
StartStopQualifier, StringConstant, TimestampConstant, WithinQualifier)
|
||||
from .sdo import (AttackPattern, Campaign, CourseOfAction, CustomObject,
|
||||
Identity, Indicator, IntrusionSet, Malware, ObservedData,
|
||||
Report, ThreatActor, Tool, Vulnerability)
|
||||
|
@ -47,6 +47,7 @@ from .version import __version__
|
|||
|
||||
OBJ_MAP = {
|
||||
'attack-pattern': AttackPattern,
|
||||
'bundle': Bundle,
|
||||
'campaign': Campaign,
|
||||
'course-of-action': CourseOfAction,
|
||||
'identity': Identity,
|
||||
|
|
|
@ -19,6 +19,15 @@ class StringConstant(_Constant):
|
|||
return "'%s'" % escape_quotes_and_backslashes(self.value)
|
||||
|
||||
|
||||
class TimestampConstant(_Constant):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return "'%s'" % escape_quotes_and_backslashes(self.value)
|
||||
|
||||
|
||||
|
||||
class IntegerConstant(_Constant):
|
||||
def __init__(self, value):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue