Skip to content

Commit

Permalink
Added UTF-8 decode to output of asnget.py so that non-English charact…
Browse files Browse the repository at this point in the history
…ers are in Splunk's default encoding.
  • Loading branch information
Trusted Subject committed Apr 2, 2017
1 parent 5c84bfd commit e47296d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/asngen.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ def generate(self):
elif diff<2**30:
mask = 2

yield {'ip': ip + "/" + str(mask), 'start': line[0], 'end': line[1], 'asn': line[2], 'autonomous_system': line[3]}
yield {'ip': ip + "/" + str(mask), 'start': line[0], 'end': line[1], 'asn': line[2], 'autonomous_system': line[3].decode('utf-8', 'ignore')}

dispatch(ASNGenCommand, sys.argv, sys.stdin, sys.stdout, __name__)

0 comments on commit e47296d

Please sign in to comment.