Last active
December 15, 2015 19:19
-
-
Save edwardgeorge/5310096 to your computer and use it in GitHub Desktop.
wstest -m fuzzingclient -s fuzzingclient.json -d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"options": {"failByDrop": false}, | |
"outdir": "./reports/servers", | |
"servers": [ | |
{"agent": "MyAwesomeServer", | |
"url": "ws://localhost:7000", | |
"options": {"version": 18}} | |
], | |
"cases": ["*"], | |
"exclude-cases": [], | |
"exclude-agent-cases": {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import eventlet | |
from eventlet import wsgi | |
from eventlet import websocket | |
print websocket.__file__ | |
@websocket.WebSocketWSGI | |
def handle(ws): | |
while True: | |
m = ws.wait() | |
if m is None: | |
break | |
ws.send(m) | |
def dispatch(environ, start_response): | |
""" This resolves to the web page or the websocket depending on | |
the path.""" | |
if environ['PATH_INFO'] == '/echo': | |
return handle(environ, start_response) | |
else: | |
start_response('200 OK', [('content-type', 'text/html')]) | |
return [open(os.path.join( | |
os.path.dirname(__file__), | |
'websocket.html')).read()] | |
if __name__ == '__main__': | |
listener = eventlet.listen(('127.0.0.1', 7000)) | |
print "\nVisit http://localhost:7000/ in your websocket-capable browser.\n" | |
wsgi.server(listener, handle) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment