def __init__(self, spec): debug = spec.get("debug", False) debugCodePaths = spec.get("debugCodePaths", False) if spec.get("enable-ssl", False): from twisted.internet import ssl self.contextFactory = ssl.ClientContextFactory() else: self.contextFactory = None WebSocketClientFactory.__init__(self, debug=debug, debugCodePaths=debugCodePaths) FuzzingFactory.__init__(self, debug=debug, outdir=spec.get("outdir", "./reports/servers/")) self.spec = spec self.specCases = parseSpecCases(self.spec) self.specExcludeAgentCases = parseExcludeAgentCases(self.spec) print "Autobahn WebSockets %s Fuzzing Client" % autobahn.version print "Ok, will run %d test cases against %d servers" % (len(self.specCases), len(spec["servers"])) print "Cases = %s" % str(self.specCases) print "Servers = %s" % str([x["url"] + "@" + x["agent"] for x in spec["servers"]]) self.currServer = -1 if self.nextServer(): if self.nextCase(): connectWS(self, contextFactory=self.contextFactory)
def __init__(self, spec): debug = spec.get("debug", False) debugCodePaths = spec.get("debugCodePaths", False) if spec.get("enable-ssl", False): from twisted.internet import ssl self.contextFactory = ssl.ClientContextFactory() else: self.contextFactory = None WebSocketClientFactory.__init__(self, debug=debug, debugCodePaths=debugCodePaths) FuzzingFactory.__init__(self, debug=debug, outdir=spec.get("outdir", "./reports/servers/")) self.spec = spec self.specCases = parseSpecCases(self.spec) self.specExcludeAgentCases = parseExcludeAgentCases(self.spec) print "Autobahn WebSockets %s Fuzzing Client" % autobahn.version print "Ok, will run %d test cases against %d servers" % (len( self.specCases), len(spec["servers"])) print "Cases = %s" % str(self.specCases) print "Servers = %s" % str( [x["url"] + "@" + x["agent"] for x in spec["servers"]]) self.currServer = -1 if self.nextServer(): if self.nextCase(): connectWS(self, contextFactory=self.contextFactory)
def __init__(self, url, debug=False, debugCodePaths=False, debugWamp=False): WebSocketClientFactory.__init__(self, url, protocols=["wamp"], debug=debug, debugCodePaths=debugCodePaths) self.debugWamp = debugWamp
def __init__(self, spec, debug = False, outdir = "reports/servers"): WebSocketClientFactory.__init__(self, debug = debug) FuzzingFactory.__init__(self, debug = debug, outdir = outdir) self.spec = spec self.specCases = parseSpecCases(self.spec) print "Autobahn WebSockets %s Fuzzing Client" % autobahn.version print "Ok, will run %d test cases against %d servers" % (len(self.specCases), len(spec["servers"])) print "Cases = %s" % str(self.specCases) print "Servers = %s" % str([x["agent"] + "@" + x["hostname"] + ":" + str(x["port"]) for x in spec["servers"]]) self.currServer = -1 if self.nextServer(): if self.nextCase(): reactor.connectTCP(self.hostname, self.port, self)
def __init__(self, spec, debug=False, outdir="reports/servers"): WebSocketClientFactory.__init__(self, debug=debug) FuzzingFactory.__init__(self, debug=debug, outdir=outdir) self.spec = spec self.specCases = parseSpecCases(self.spec) print "Autobahn WebSockets %s Fuzzing Client" % autobahn.version print "Ok, will run %d test cases against %d servers" % (len( self.specCases), len(spec["servers"])) print "Cases = %s" % str(self.specCases) print "Servers = %s" % str([ x["agent"] + "@" + x["hostname"] + ":" + str(x["port"]) for x in spec["servers"] ]) self.currServer = -1 if self.nextServer(): if self.nextCase(): reactor.connectTCP(self.hostname, self.port, self)
def __init__(self, spec, debug = False, outdir = "reports/servers"): WebSocketClientFactory.__init__(self, debug = debug) FuzzingFactory.__init__(self, debug = debug, outdir = outdir) self.spec = spec self.specCases = [] for c in self.spec["cases"]: if c.find('*') >= 0: s = c.replace('.', '\.').replace('*', '.*') p = re.compile(s) t = [] for x in CasesIndices.keys(): if p.match(x): t.append(caseIdtoIdTuple(x)) for h in sorted(t): self.specCases.append(caseIdTupletoId(h)) else: self.specCases.append(c) print "Ok, will run %d test cases against %d servers" % (len(self.specCases), len(spec["servers"])) self.currServer = -1 if self.nextServer(): if self.nextCase(): reactor.connectTCP(self.hostname, self.port, self)
def __init__(self, url, debug = False, debugCodePaths = False, debugWamp = False): WebSocketClientFactory.__init__(self, url, protocols = ["wamp"], debug = debug, debugCodePaths = debugCodePaths) self.debugWamp = debugWamp
def __init__(self, debug = False, debug_autobahn = False): WebSocketClientFactory.__init__(self, debug = debug) self.debug_autobahn = debug_autobahn