Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding: utf-8
- import io
- import re
- import sys
- import socks
- import time
- sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='cp932', errors='replace')
- host_addr = 'monachat.dyndns.org'
- host_port = 9095
- proxy_addr = '166.111.54.40'
- proxy_port = 1081
- room = 1
- name = 'Dante'.encode('utf-8')
- ihash = '未設定(設定不可)'.encode('utf-8')
- trip = 'トリプ'.encode('utf-8')
- char = 'shodai'.encode('utf-8')
- red = 100
- green = 100
- blue = 100
- x = 250
- y = 0
- scl = 100
- stat = '通常'.encode('utf-8')
- buffer = 1024
- time_t = time.time()
- send_t = time_t + 25
- response = ''.encode('utf-8')
- room.to_bytes(2, 'big')
- red.to_bytes(2, 'big')
- green.to_bytes(2, 'big')
- blue.to_bytes(2, 'big')
- x.to_bytes(2, 'big')
- y.to_bytes(2, 'big')
- scl.to_bytes(2, 'big')
- sock = socks.socksocket()
- sock.set_proxy(socks.SOCKS5, proxy_addr, proxy_port)
- sock.connect((host_addr, host_port))
- sock.send(b'MojaChat\0')
- enter = '<ENTER room="/MONA8094/%d" Name="%s" IHASH="%s" Trip="%s" type="%s" r="%d" g="%d" b="%d" \
- x="%d" y="%d" scl="%d" stat="%s" />\0' % (room, name, ihash, trip, char, red, green, blue, x, y, scl, stat)
- sock.send(bytes(enter, 'utf-8'))
- while True :
- time_t = time.time()
- if send_t < time_t :
- sock.send(b'<NOP />\0')
- send_t = time_t + 25
- response = sock.recv(buffer)
- print(response.decode(), flush = True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement