Show More
@@ -560,7 +560,7 b' class DNSIncoming(object):' | |||
|
560 | 560 | # |
|
561 | 561 | #print "UNKNOWN TYPE = " + str(info[0]) |
|
562 | 562 | #raise BadTypeInNameException |
|
563 | pass | |
|
563 | break | |
|
564 | 564 | |
|
565 | 565 | if rec is not None: |
|
566 | 566 | self.answers.append(rec) |
@@ -575,11 +575,7 b' class DNSIncoming(object):' | |||
|
575 | 575 | |
|
576 | 576 | def readUTF(self, offset, len): |
|
577 | 577 | """Reads a UTF-8 string of a given length from the packet""" |
|
578 |
re |
|
|
579 | try: | |
|
580 | return result.decode('utf-8') | |
|
581 | except UnicodeDecodeError: | |
|
582 | return result.decode('utf-16') | |
|
578 | return self.data[offset:offset+len].decode('utf-8') | |
|
583 | 579 | |
|
584 | 580 | def readName(self): |
|
585 | 581 | """Reads a domain name from the packet""" |
General Comments 0
You need to be logged in to leave comments.
Login now