mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [trackers] fix pgp yara tracker
This commit is contained in:
parent
9b2e8718d7
commit
e365555905
2 changed files with 10 additions and 4 deletions
|
@ -108,8 +108,11 @@ class AbstractDaterangeObject(AbstractObject, ABC):
|
||||||
sparkline.append(self.get_nb_seen_by_date(date))
|
sparkline.append(self.get_nb_seen_by_date(date))
|
||||||
return sparkline
|
return sparkline
|
||||||
|
|
||||||
def get_content(self):
|
def get_content(self, r_type='str'):
|
||||||
return self.id
|
if r_type == 'str':
|
||||||
|
return self.id
|
||||||
|
elif r_type == 'bytes':
|
||||||
|
return self.id.encode()
|
||||||
|
|
||||||
def _add_create(self):
|
def _add_create(self):
|
||||||
r_object.sadd(f'{self.type}:all', self.id)
|
r_object.sadd(f'{self.type}:all', self.id)
|
||||||
|
|
|
@ -116,8 +116,11 @@ class AbstractSubtypeObject(AbstractObject, ABC):
|
||||||
if date > last_seen:
|
if date > last_seen:
|
||||||
self.set_last_seen(date)
|
self.set_last_seen(date)
|
||||||
|
|
||||||
def get_content(self):
|
def get_content(self, r_type='str'):
|
||||||
return self.id
|
if r_type == 'str':
|
||||||
|
return self.id
|
||||||
|
if r_type == 'bytes':
|
||||||
|
return self.id.encode()
|
||||||
|
|
||||||
def get_sparkline(self):
|
def get_sparkline(self):
|
||||||
sparkline = []
|
sparkline = []
|
||||||
|
|
Loading…
Reference in a new issue