diff --git a/CHANGELOG b/CHANGELOG index 5321cd46..ce5066b9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,8 @@ jc changelog -20210209 v1.14.3 +202102010 v1.14.3 - Add hciconfig parser tested on linux +- Update dig parser to simplify answer data logic 20210205 v1.14.2 - Update dig parser to fix cases where there are spaces in the answer data (e.g. TXT records) diff --git a/jc/parsers/dig.py b/jc/parsers/dig.py index 3eb23d9c..93ffdbc8 100644 --- a/jc/parsers/dig.py +++ b/jc/parsers/dig.py @@ -333,7 +333,7 @@ import jc.utils class info(): - version = '1.4' + version = '1.5' description = 'dig command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -521,12 +521,12 @@ def parse_authority(authority): def parse_answer(answer): # www.cnn.com. 5 IN CNAME turner-tls.map.fastly.net. - answer = answer.split() + answer = answer.split(maxsplit=4) answer_name = answer[0] answer_class = answer[2] answer_type = answer[3] answer_ttl = answer[1] - answer_data = ' '.join(answer[4:]) + answer_data = answer[4] # remove surrounding quotation marks from answer_data if they exist if answer_data.startswith('"') and answer_data.endswith('"'):