Exemplo n.º 1
0
 def __init__(self,name,attrs={},logger=None,logpath='./'):
     self.sutname=name
     self.attrs=attrs        
     command = attrs.get('CMD')
     if not attrs.get('TIMEOUT'):
         self.attrs.update({'TIMEOUT':int(30)})
     else:
         self.attrs.update({'TIMEOUT':int(attrs.get('TIMEOUT'))})
     #spawn.__init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup)
     import os
     log = os.path.abspath(logpath)
     log= '%s%s%s'%(log,os.path.sep,'%s.log'%name)
     if self.attrs.get('LOGIN'):
         from common import csvstring2array
         self.loginstep= csvstring2array(self.attrs['LOGIN'])
      
     self.seslog = open(log, "wb")
     CSession.__init__(self, name, attrs,logger, logpath)
Exemplo n.º 2
0
    def __init__(self, name, attrs={}, logger=None, logpath='./'):
        self.sutname = name
        self.attrs = attrs
        command = attrs.get('CMD')
        if not attrs.get('TIMEOUT'):
            self.attrs.update({'TIMEOUT': int(30)})
        else:
            self.attrs.update({'TIMEOUT': int(attrs.get('TIMEOUT'))})
        #spawn.__init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup)
        import os
        log = os.path.abspath(logpath)
        log = '%s%s%s' % (log, os.path.sep, '%s.log' % name)
        if self.attrs.get('LOGIN'):
            from common import csvstring2array
            self.loginstep = csvstring2array(self.attrs['LOGIN'])

        self.seslog = open(log, "wb")
        CSession.__init__(self, name, attrs, logger, logpath)
 def __init__(self, url, para):
     Session.__init__(self)
     self._url = url
     self._para = para
     pass
Exemplo n.º 4
0
 def __init__(self, name):
     Session.__init__(self, name)
Exemplo n.º 5
0
 def __init__(self, name):
     Session.__init__(self, name, protocol='tcp')
     return
Exemplo n.º 6
0
 def __init__(self, name):
     Session.__init__(self, name, protocol='tcp')
     return
Exemplo n.º 7
0
 def __init__(self, name):
     Session.__init__(self, name)
Exemplo n.º 8
0
 def __init__(self, name):
     Session.__init__(self, name)
     self.default_precision = "03"