Beispiel #1
0
 def __init__(self,zone,origin="",ttl=0):
     self.l = WordLexer(zone)
     self.l.commentchars = ';'
     self.l.nltok = ('NL',None)
     self.l.spacetok = ('SPACE',None)
     self.i = iter(self.l)
     if type(origin) is DNSLabel:
         self.origin = origin
     else:
         self.origin= DNSLabel(origin)
     self.ttl = ttl
     self.label = DNSLabel("")
     self.prev = None
Beispiel #2
0
 def __init__(self,dig,debug=False):
     self.debug = debug
     self.l = WordLexer(dig)
     self.l.commentchars = ';'
     self.l.nltok = ('NL',None)
     self.i = iter(self.l)