Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import socket  

def buscar(matriz, elemento):
	pos = []
	for i in range(6):
		for j in range(6):
			if elemento == matriz[i][j]:
				pos.append((i, j))
	return pos

def buscar_en_pos(posiciones, matriz, elemento):
	x = []
	for i in posiciones:
		if elemento == matriz[i[0]][i[1]]:
			x.append(i)
	return x	
		
def procesar(recibido):	
	pri = []
	seg = []
	ter = []
	cua = []
	d = recibido.split("\n")

	if (len(d) > 37):
		d = d[1:]	#ignore banner message for first try
	else:
		if (len(d) < 35):
			print recibido
			return ""
	n = 0
	while (n<37):
		t = d[n]
		if (n>1 and n<8):
			pri.append([x for x in t.split(" ") if x.isdigit() ]) #ignore color codes only get the numbers
		if (n>11 and n<18):
			seg.append([x for x in t.split(" ") if x.isdigit() ])		
		if (n>21 and n<28):
			ter.append([x for x in t.split(" ") if x.isdigit() ])		
		if (n>29 and n<36):
			cua.append([x for x in t.split(" ") if x.isdigit() ])		
		if n == 8:
			psel = [x for x in t.split(" ") if x.isdigit() ]
		if n == 18:
			ssel = [x for x in t.split(" ") if x.isdigit() ]
		if n == 28:
			tsel = [x for x in t.split(" ") if x.isdigit() ]	
		n+=1
	p1 = buscar_en_pos(buscar(pri, psel[0]), seg, ssel[0])
	p1 = buscar_en_pos(p1, ter, tsel[0])
	p2 = buscar_en_pos(buscar(pri, psel[1]), seg, ssel[1])
	p2 = buscar_en_pos(p2, ter, tsel[1])
	p3 = buscar_en_pos(buscar(pri, psel[2]), seg, ssel[2])
	p3 = buscar_en_pos(p3, ter, tsel[2])	
	p4 = buscar_en_pos(buscar(pri, psel[3]), seg, ssel[3])
	p4 = buscar_en_pos(p4, ter, tsel[3])
	return cua[p1[0][0]][p1[0][1]]+" "+cua[p2[0][0]][p2[0][1]]+" "+cua[p3[0][0]][p3[0][1]]+" "+ cua[p4[0][0]][p4[0][1]]
		
s = socket.socket()  
s.connect(("140.197.217.85", 10435))
s.send("5fd78efc6620f6\n")
while(True):
	recibido = s.recv(1024)  
	if ("NOVABANK ATM menu" in recibido):
		recibido = recibido + s.recv(1024)  
		recibido = recibido + s.recv(1024) 
		print recibido
		s.close()
		exit()
	recibido = recibido + s.recv(1024)  
	recibido = recibido + s.recv(1024)  
	recibido = recibido + s.recv(1024)  
	d = recibido.split("\n")
	x = procesar(recibido)+"\n"
	print x
	s.send(x)
s.close()
exit()