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