def __init__(self, executor, browser): Protocol.__init__(self, executor, browser) self.webdriver_binary = executor.webdriver_binary self.webdriver_args = executor.webdriver_args self.capabilities = self.executor.capabilities self.session_config = None self.server = None
def __init__(self, worker, server): """Connect to the specified worker""" Protocol.__init__(self) self.server = server self.register_command('taskcomplete', self.complete_task) self.register_command('ready', lambda x, y: self.initialize_worker()) # Create connection logging.debug("Connecting to worker %s:%d..." % worker) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.connect(worker)
def __init__(self, conn): Protocol.__init__(self, conn) self.mapfn = self.reducefn = None self.register_command('mapfn', self.set_mapfn) self.register_command('reducefn', self.set_reducefn) self.register_command('map', self.call_mapfn) self.register_command('reduce', self.call_reducefn) self.send_command('ready')
def __init__(self): Protocol.__init__(self) # Module-specific attributes self.attributes = { "NAME": 'ftp', "MODULE_SPEAKS_PROTOCOL": True, "PROTOCOL_DEFAULT_PORTS": [21], "PROTOCOL_SPEAKS_FIRST": True, "PATTERN": r"\d{3}(\s|-).*" } self.compile_pattern()
def __init__(self): Protocol.__init__(self) # Module-specific attributes self.attributes = { "NAME": 'http', "MODULE_SPEAKS_PROTOCOL": True, "PROTOCOL_DEFAULT_PORTS": [80, 1080, 8080], "PROTOCOL_SPEAKS_FIRST": False, "PATTERN": r"^HTTP.+?\s\d{3}\s.+?" } self.compile_pattern()
def __init__(self): Protocol.__init__(self) # Module-specific attributes self.attributes = { "NAME": 'socks5', "MODULE_SPEAKS_PROTOCOL": True, "PROTOCOL_DEFAULT_PORTS": [1080, 8080], "PROTOCOL_SPEAKS_FIRST": False, "PATTERN": r"" } self.compile_pattern()
def __init__(self): Protocol.__init__(self) # Module-specific attributes self.attributes = { "NAME": 'irc', "MODULE_SPEAKS_PROTOCOL": True, "PROTOCOL_DEFAULT_PORTS": [6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7000], "PROTOCOL_SPEAKS_FIRST": True, "PATTERN": r"[0-9A-Z:a-z-\s*._]+?:[0-9A-Z:a-z-\s*._]+?" } self.compile_pattern() self.unprocessed = '' self.registered = False
def __init__(self, **args): # Here we are going to intercept the original _defineParams function # and replace by an empty one, this is to postpone the definition of # params until the protocol is set and then self.protocol can be used # for a more dynamic definition object.__setattr__(self, '_defineParamsBackup', self._defineParams) object.__setattr__(self, '_defineParams', self._defineParamsEmpty) Protocol.__init__(self, **args) Viewer.__init__(self, **args) self.allowHeader.set(False) self.showPlot = True # This flag will be used to display a plot or return the plotter self._tkRoot = None self.formWindow = None self.setWorkingDir(self.getProject().getTmpPath())
def __init__(self, attacker=Eve()): Protocol.__init__(self, DH_Alice(), DH_Bob(), attacker)
def __init__(self, name, port): Protocol.__init__(self, name, port)
def __init__(self, **args): Protocol.__init__(self, **args) self.stepsExecutionMode = STEPS_PARALLEL
def __init__(self): Protocol.__init__(self, Client(), Server())
def __init__(self, **args): Protocol.__init__(self, **args) self.name = params.String(args.get('name', None))