3 """This is a very simple client for the backdoor daemon. This is intended more
4 for testing rather than normal use. See bd_serv.py """
7 import sys, time, select
10 r,w,e = select.select([s.fileno()],[],[], 2)
13 #cols = int(s.recv(4))
14 #rows = int(s.recv(4))
17 packet_size = cols * rows * 2 # double it for good measure
18 return s.recv(packet_size)
20 #HOST = '' #'localhost' # The remote host
21 #PORT = 1664 # The same port as used by the server
22 s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
23 s.connect(sys.argv[1])#(HOST, PORT))
26 #s.send('COMMAND' + '\x01' + sys.argv[1])
27 s.send(':sendline ' + sys.argv[2])
32 # data = recv_wrapper(s)
35 # sys.stdout.write (data)