This file contains 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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
from ws4py.client.threadedclient import WebSocketClient | |
import binascii | |
class WSClient(WebSocketClient): | |
def __init__(self, url, text, filename): |
This file contains 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
# -*- coding: utf-8 -*- | |
import ipaddress | |
import json | |
import sys | |
import struct | |
def bytes2long(a, b, c, d): | |
return convert(a) << 24 | convert(b) << 16 | convert(c) << 8 | convert(d) |