Show More
@@ -535,7 +535,7 b' class DNSIncoming(object):' | |||
|
535 | 535 | |
|
536 | 536 | def readString(self, len): |
|
537 | 537 | """Reads a string of a given length from the packet""" |
|
538 |
format = '!' |
|
|
538 | format = '!%ds' % len | |
|
539 | 539 | length = struct.calcsize(format) |
|
540 | 540 | info = struct.unpack(format, |
|
541 | 541 | self.data[self.offset:self.offset + length]) |
@@ -613,7 +613,7 b' class DNSIncoming(object):' | |||
|
613 | 613 | |
|
614 | 614 | def readName(self): |
|
615 | 615 | """Reads a domain name from the packet""" |
|
616 | result = '' | |
|
616 | result = r'' | |
|
617 | 617 | off = self.offset |
|
618 | 618 | next = -1 |
|
619 | 619 | first = off |
@@ -625,7 +625,7 b' class DNSIncoming(object):' | |||
|
625 | 625 | break |
|
626 | 626 | t = len & 0xC0 |
|
627 | 627 | if t == 0x00: |
|
628 | result = ''.join((result, self.readUTF(off, len) + '.')) | |
|
628 | result = r''.join((result, self.readUTF(off, len) + r'.')) | |
|
629 | 629 | off += len |
|
630 | 630 | elif t == 0xC0: |
|
631 | 631 | if next < 0: |
General Comments 0
You need to be logged in to leave comments.
Login now