Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
fixes #52
Browse files Browse the repository at this point in the history
  • Loading branch information
wesyoung committed Jan 12, 2017
1 parent 1b86b4d commit 9302018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions csirtg_indicator/indicator.py
Expand Up @@ -64,6 +64,7 @@ def __init__(self, indicator=None, version=PROTOCOL_VERSION, **kwargs):
self.itype = kwargs.get('itype')
self.protocol = kwargs.get('protocol')
self.portlist = kwargs.get('portlist')
self.dest = kwargs.get('dest')
self.tags = kwargs.get('tags')
self.application = kwargs.get('application')
self.reference = kwargs.get('reference')
Expand Down Expand Up @@ -186,6 +187,7 @@ def __repr__(self):
i = {
"version": self.version,
"indicator": self.indicator,
'dest': self.dest,
"itype": self.itype,
"tlp": self.tlp,
"provider": self.provider,
Expand Down Expand Up @@ -260,6 +262,7 @@ def __repr__(self):
i['asn_desc'] = unicode(i['asn_desc'].decode('latin-1'))
return json.dumps(i, indent=indent, sort_keys=sort_keys, separators=(',', ': '))


def main():
p = ArgumentParser(
description=textwrap.dedent('''\
Expand Down
5 changes: 5 additions & 0 deletions test/test_indicator.py
Expand Up @@ -64,3 +64,8 @@ def test_format_indicator():

i = i.format_keys()
assert i.altid == 'https://csirtg.io/search?q=example.com'


def test_indicator_dest():
i = Indicator(indicator='192.168.1.1', dest='10.0.0.1', portlist="23", protocol="tcp")
assert i.dest

0 comments on commit 9302018

Please sign in to comment.