for each in cursor fetchall login segment name street bnum apart each

1
2
3
4
5
6
7
8
for each in cursor.fetchall():
login,segment,name,street,bnum,apart = each
if bin2ip(segment).startswith('192.168.33.'):
output = ""
if bin2ip(segment).startswith('195.22.105.') and int(bin2ip(segment).split('.')[-1]) > 100:
output = ""
output = login + ";" + bin2ip(segment) + ";" + name + ";" + street + " " + bnum + "-" + apart
print output.encode('utf8')