Exemplo n.º 1
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, A102, SNAME)
   self.telnetobj.msg('sending IAC WILL A102', mtype='A102')
   self.telnetobj.addtooutbuffer(IAC + WILL + A102, True)
Exemplo n.º 2
0
 def __init__(self, telnetobj):
     """
 initialize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, A102, SNAME)
     self.telnetobj.msg('sending IAC WILL A102', mtype='A102')
     self.telnetobj.addtooutbuffer(IAC + WILL + A102, True)
Exemplo n.º 3
0
 def __init__(self, telnetobj):
     """
 initalize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, GMCP, SNAME)
     #self.telnetobj.debug_types.append('GMCP')
     self.telnetobj.msg('sending IAC WILL GMCP', mtype='GMCP')
     self.telnetobj.addtooutbuffer("".join([IAC, WILL, GMCP]), True)
Exemplo n.º 4
0
 def __init__(self, telnetobj):
     """
 initialize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, TTYPE, SNAME)
     #self.telnetobj.debug_types.append('TTYPE')
     self.telnetobj.msg('sending IAC WILL TTYPE', mtype='TTYPE')
     self.telnetobj.addtooutbuffer("".join([IAC, DO, TTYPE]), True)
Exemplo n.º 5
0
 def reset(self, onclose=False):
     """
 reset the opt
 """
     self.telnetobj.msg('resetting', mtype='TTYPE')
     if not onclose:
         self.telnetobj.addtooutbuffer("".join([IAC, DONT, TTYPE]), True)
     BaseTelnetOption.reset(self)
Exemplo n.º 6
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, MCCP2)
   #self.telnetobj.debug_types.append('MCCP2')
   self.orig_readdatafromsocket = None
   self.zlib_decomp = None
Exemplo n.º 7
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, TTYPE)
   #self.telnetobj.debug_types.append('TTYPE')
   self.telnetobj.msg('TTYPE: sending IAC WILL TTYPE', mtype='TTYPE')
   self.telnetobj.addtooutbuffer(IAC + DO + TTYPE, True)
Exemplo n.º 8
0
 def reset(self, onclose=False):
   """
   reset the opt
   """
   self.telnetobj.msg('TTYPE: resetting', mtype='TTYPE')
   if not onclose:
     self.telnetobj.addtooutbuffer(IAC + DONT + TTYPE, True)
   BaseTelnetOption.reset(self)
Exemplo n.º 9
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, TTYPE, SNAME)
   #self.telnetobj.debug_types.append('TTYPE')
   self.telnetobj.msg('sending IAC WILL TTYPE', mtype='TTYPE')
   self.telnetobj.addtooutbuffer("".join([IAC, DO, TTYPE]), True)
Exemplo n.º 10
0
 def __init__(self, telnetobj):
   """
   initalize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, GMCP, SNAME)
   #self.telnetobj.debug_types.append('GMCP')
   self.telnetobj.msg('sending IAC WILL GMCP', mtype='GMCP')
   self.telnetobj.addtooutbuffer("".join([IAC, WILL, GMCP]), True)
Exemplo n.º 11
0
 def reset(self, onclose=False):
   """
   reset the opt
   """
   self.telnetobj.msg('resetting', mtype='TTYPE')
   if not onclose:
     self.telnetobj.addtooutbuffer("".join([IAC, DONT, TTYPE]), True)
   BaseTelnetOption.reset(self)
Exemplo n.º 12
0
 def __init__(self, telnetobj):
   """
   initalize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, GMCP)
   #self.telnetobj.debug_types.append('GMCP')
   self.telnetobj.msg('GMCP: sending IAC WILL GMCP', mtype='GMCP')
   self.telnetobj.addtooutbuffer(IAC + WILL + GMCP, True)
   self.cmdqueue = []
Exemplo n.º 13
0
 def __init__(self, telnetobj):
     """
 initalize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, GMCP)
     #self.telnetobj.debug_types.append('GMCP')
     self.telnetobj.msg('GMCP: sending IAC WILL GMCP', mtype='GMCP')
     self.telnetobj.addtooutbuffer(IAC + WILL + GMCP, True)
     self.cmdqueue = []
Exemplo n.º 14
0
 def reset(self, onclose=False):
   """
   resetting the option
   """
   self.telnetobj.msg('MCCP: resetting', mtype='MCCP2')
   self.telnetobj.addtooutbuffer(IAC + DONT + MCCP2, True)
   self.telnetobj.rawq = self.zlib_decomp.decompress(self.telnetobj.rawq)
   setattr(self.telnetobj, 'readdatafromsocket',
           self.orig_readdatafromsocket)
   BaseTelnetOption.reset(self)
Exemplo n.º 15
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, MCCP2)
   #self.telnetobj.debug_types.append('MCCP2')
   self.orig_convert_outdata = None
   self.zlib_comp = None
   self.telnetobj.msg('MCCP2: sending IAC WILL MCCP2', mtype='MCCP2')
   self.telnetobj.send(IAC + WILL + MCCP2)
Exemplo n.º 16
0
 def reset(self, onclose=False):
   """
   reset the option
   """
   self.telnetobj.msg('MCCP: resetting', mtype='MCCP2')
   if not onclose:
     self.telnetobj.addtooutbuffer(IAC + DONT + MCCP2, True)
   setattr(self.telnetobj, 'convert_outdata', self.orig_convert_outdata)
   self.telnetobj.outbuffer = \
                       self.zlib_comp.uncompress(self.telnetobj.outbuffer)
   BaseTelnetOption.reset(self)
Exemplo n.º 17
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, GMCP)
Exemplo n.º 18
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, TTYPE)
Exemplo n.º 19
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, A102)
   self.telnetobj.debug_types.append('A102')
Exemplo n.º 20
0
 def __init__(self, telnetobj):
     """
 initialize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, GMCP, SNAME)
Exemplo n.º 21
0
 def __init__(self, telnetobj):
     """
 initialize the instance
 """
     BaseTelnetOption.__init__(self, telnetobj, A102)
     self.telnetobj.debug_types.append('A102')
Exemplo n.º 22
0
 def __init__(self, telnetobj):
   """
   initialize the instance
   """
   BaseTelnetOption.__init__(self, telnetobj, TTYPE, SNAME)