Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- handshake = '\x0f\x00\x04\t127.0.0.1\xde\x02'.encode("utf-8")
- user = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
- def getRandomChar():
- return str(user[random.randint(0, len(user)-1)])
- def getRandomUsername():
- username = ''
- for x in range(0,9):
- username = username + getRandomChar()
- return username
- def chat(msg):
- return (chr(len(msg)+2) + '\x01' + chr(len(msg)) + msg).encode('utf-8')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement